summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_phi_builder.c
Commit message (Collapse)AuthorAgeFilesLines
* nir/phi_builder: Don't recurse in value_get_block_defJason Ekstrand2016-08-251-29/+36
| | | | | | | | | | | | | In some programs, we can have very deep dominance trees and the recursion can cause us to risk stack overflows. Instead, we replace the recursion with a pair of loops, one at the start and one at the end. This is functionally equivalent to what we had before and it's actually a bit easier to read in the new form without the recursion. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97225 Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* nir/phi_builder: fixup for new foreach_block()Connor Abbott2016-04-281-9/+3
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* nir: rename nir_foreach_block*() to nir_foreach_block*_call()Connor Abbott2016-04-201-1/+1
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* nir: add bit_size info to nir_ssa_undef_instr_create()Samuel Iglesias Gonsálvez2016-04-111-1/+2
| | | | | | | | v2: - Make the users to give the right bit_sizes as arguments (Jason). Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* nir: Add a phi node placement helperJason Ekstrand2016-03-241-0/+295
Right now, we have phi placement code in two places and there are other places where it would be nice to be able to do this analysis. Instead of repeating it all over the place, this commit adds a helper for placing all of the needed phi nodes for a value. v2: Add better documentation Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>