ac: make use of if/loop build helpers
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 7 Mar 2018 00:10:54 +0000 (11:10 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 7 Mar 2018 23:12:34 +0000 (10:12 +1100)
commit99cdc019bf6fe11c135b7544ef6daf4ac964fa24
tree40c2b6fd0acbe946a293316acfaef532b61bb6de
parent6e1a142863b368a032e333f09feb107241446053
ac: make use of if/loop build helpers

These helpers insert the basic block in the same order as they
appear in NIR making it easier to follow LLVM IR dumps. The helpers
also insert more useful labels onto the blocks.

TGSI use the line number of the corresponding opcode in the TGSI
dump as the label id, here we use the corresponding block index
from NIR.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_nir_to_llvm.c