aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_control_flow.c
Commit message (Collapse)AuthorAgeFilesLines
* nir: remove unused variableTimothy Arceri2016-09-031-2/+0
| | | | | | This was let over from aad4f15506c Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Remove fake edges in the CF handling codeJason Ekstrand2016-09-021-57/+2
| | | | | | | | | | | | | | | | When NIR was first introduced, Connor added this fake-edge hack to work around issues related to unreachable blocks. Thanks to GLSL IR's jump lowering code, the only unreachable code you can have is a block after an infinite loop. With SPIR-V, we didn't have the jump lowering code so we could also end up with the "if (...) { break; } else { continue; }" case which generates an unreachable block after the if. Because of this, most of NIR had to be fixed up for handling unreachable blocks. The only remaining case of not handling unreachable blocks was specifically the block-after-infinite-loop case in dead_cf which was fixed by the previous commit. We can now delete the fake edge hack. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir: Switch the arguments to nir_foreach_phi_srcJason Ekstrand2016-04-281-2/+2
| | | | | | | | | | | This matches the "foreach x in container" pattern found in many other programming languages. Generated by the following regular expression: s/nir_foreach_phi_src(\([^,]*\),\s*\([^,]*\))/nir_foreach_phi_src(\2, \1)/ and a similar expression for nir_foreach_phi_src_safe. Reviewed-by: Eduardo Lima Mitev <[email protected]>
* nir: Switch the arguments to nir_foreach_instrJason Ekstrand2016-04-281-6/+6
| | | | | | | | | | | This matches the "foreach x in container" pattern found in many other programming languages. Generated by the following regular expression: s/nir_foreach_instr(\([^,]*\),\s*\([^,]*\))/nir_foreach_instr(\2, \1)/ and similar expressions for nir_foreach_instr_safe etc. Reviewed-by: Ian Romanick <[email protected]>
* nir: add bit_size info to nir_ssa_undef_instr_create()Samuel Iglesias Gonsálvez2016-04-111-2/+4
| | | | | | | | v2: - Make the users to give the right bit_sizes as arguments (Jason). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir/cf: Make extracting or re-inserting nothing a no-opJason Ekstrand2016-03-241-0/+9
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir/cf: Handle relinking top-level blocksJason Ekstrand2016-03-241-2/+5
| | | | | | | | This can happen if a function ends in a return instruction and you remove the return. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir: move to compiler/Emil Velikov2016-01-261-0/+808
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>