There may not be a previous block. In this case, there's no real work
to do, so just continue on to the next one.
v2: Update for bblock->prev() API change.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
foreach_block_safe (block, s->cfg) {
bblock_t *prev_block = block->prev();
+
+ if (!prev_block)
+ continue;
+
backend_instruction *const inst = block->start();
backend_instruction *const prev_inst = prev_block->end();