freedreno/ir3: allow block->predecessors to be null
This way we can also use ir3_print from computerator, which mostly bypasses the ir3_block construct (since it doesn't need to do scheduling, etc) Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3926>
This commit is contained in:
parent
f87d412f08
commit
568e948d1f
|
@ -273,7 +273,10 @@ print_block(struct ir3_block *block, int lvl)
|
|||
{
|
||||
tab(lvl); printf("block%u {\n", block_id(block));
|
||||
|
||||
if (block->predecessors->entries > 0) {
|
||||
/* computerator (ir3 assembler) doesn't really use blocks for flow
|
||||
* control, so block->predecessors will be null.
|
||||
*/
|
||||
if (block->predecessors && block->predecessors->entries > 0) {
|
||||
unsigned i = 0;
|
||||
tab(lvl+1);
|
||||
printf("pred: ");
|
||||
|
|
Loading…
Reference in New Issue