broadcom/compiler: Emit uniform loops using uniform control flow

Similarly to if statements, uniform loops are now emitted without
predication, using simple branches for breaks and continues. The
uniformity of the loop is determined by running the
nir_divergence_analysis pass.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
This commit is contained in:
Arcady Goldmints-Orlov
2020-12-24 10:24:56 -06:00
committed by Marge Bot
parent 6643bdbd53
commit 79bde75131
3 changed files with 85 additions and 15 deletions

View File

@@ -456,6 +456,12 @@ struct qblock {
/** Offset within the uniform stream of the branch instruction */
uint32_t branch_uniform;
/**
* Has the terminating branch of this block already been emitted
* by a break or continue?
*/
bool branch_emitted;
/** @{ used by v3d_vir_live_variables.c */
BITSET_WORD *def;
BITSET_WORD *defin;