vc4: Make qir_for_each_inst_inorder() safe against removal.
authorEric Anholt <eric@anholt.net>
Wed, 23 Nov 2016 20:23:55 +0000 (12:23 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 29 Nov 2016 16:38:59 +0000 (08:38 -0800)
The dead code elimination wants it to be safe, and I actually got
segfaults due to it being unsafe with the new coalescing pass.

src/gallium/drivers/vc4/vc4_qir.h

index a8f90cfe7af29c7422343c99f269fc42daf70e55..28d33449391a05b056686efda04e6fa3380fc004 100644 (file)
@@ -887,6 +887,6 @@ qir_BRANCH(struct vc4_compile *c, uint8_t cond)
 
 #define qir_for_each_inst_inorder(inst, c)                              \
         qir_for_each_block(_block, c)                                   \
-                qir_for_each_inst(inst, _block)
+                qir_for_each_inst_safe(inst, _block)
 
 #endif /* VC4_QIR_H */