History log of /external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ffa4ba71d91396f7323affedb21618d183a28443 24-Dec-2016 Jason Ekstrand <jason.ekstrand@intel.com> nir/opt_peephole_select: Pass around the actual nir_shader

Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
ae032e5ea61dac3c63d74056174939e5ec091629 06-Oct-2016 Jason Ekstrand <jason.ekstrand@intel.com> nir: Remove some no longer needed asserts

Now that the NIR casting functions have type assertions, we have a bunch of
assertions that aren't needed anymore.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
2ed17d46de045404042f13c6591895a1cf31b167 06-Oct-2016 Jason Ekstrand <jason.ekstrand@intel.com> nir: Make nir_foo_first/last_cf_node return a block instead

One of NIR's invariants is that control flow lists always start and end
with blocks. There's no good reason why we should return a cf_node from
these functions since we know that it's always a block. Making it a block
lets us remove a bunch of code.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
36f0f0318275f65f8744ec6f9471702e2f58e6d5 07-Sep-2016 Eric Anholt <eric@anholt.net> nir: Allow opt_peephole_sel to be more aggressive in flattening IFs.

VC4 was running into a major performance regression from enabling control
flow in the glmark2 conditionals test, because of short if statements
containing an ffract.

This pass seems like it was was trying to ensure that we only flattened
IFs that should be entirely a win by guaranteeing that there would be
fewer bcsels than there were MOVs otherwise. However, if the number of
ALU ops is small, we can avoid the overhead of branching (which itself
costs cycles) and still get a win, even if it means moving real
instructions out of the THEN/ELSE blocks.

For now, just turn on aggressive flattening on vc4. i965 will need some
tuning to avoid regressions. It does looks like this may be useful to
replace freedreno code.

Improves glmark2 -b conditionals:fragment-steps=5:vertex-steps=0 from 47
fps to 95 fps on vc4.

vc4 shader-db:
total instructions in shared programs: 101282 -> 99543 (-1.72%)
instructions in affected programs: 17365 -> 15626 (-10.01%)
total uniforms in shared programs: 31295 -> 31172 (-0.39%)
uniforms in affected programs: 3580 -> 3457 (-3.44%)
total estimated cycles in shared programs: 225182 -> 223746 (-0.64%)
estimated cycles in affected programs: 26085 -> 24649 (-5.51%)

v2: Update shader-db output.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
9128acfb5781c43abd3ffe3ef74ee1d32138f6bc 28-Jul-2016 Eric Anholt <eric@anholt.net> nir: Allow opt_peephole_select to work on empty blocks.

nir_opt_peephole_select has the job of removing IF statements with no side
effects. However, if the IF statement's successor didn't have any
instructions in it, we were skipping it, which occurred in mupen64 on vc4
with glsl_to_nir enabled:

instructions in affected programs: 6134 -> 4120 (-32.83%)
total uniforms in shared programs: 38268 -> 38219 (-0.13%)

No changes on Haswell shader-db.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
5015260a0598ada4865b2c6086fc669505f64749 27-Apr-2016 Jason Ekstrand <jason.ekstrand@intel.com> nir: Switch the arguments to nir_foreach_use and friends

This matches the "foreach x in container" pattern found in many other
programming languages. Generated by the following regular expression:

s/nir_foreach_use(\([^,]*\),\s*\([^,]*\))/nir_foreach_use(\2, \1)/

and similar expressions for nir_foreach_use_safe, etc.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
9464d8c49813aba77285e7465b96e92a91ed327c 27-Apr-2016 Jason Ekstrand <jason.ekstrand@intel.com> nir: Switch the arguments to nir_foreach_function

This matches the "foreach x in container" pattern found in many other
programming languages. Generated by the following regular expression:

s/nir_foreach_function(\([^,]*\),\s*\([^,]*\))/nir_foreach_function(\2, \1)/

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
8564916d01b31ca5665a27366e483738541ba5a3 27-Apr-2016 Jason Ekstrand <jason.ekstrand@intel.com> nir: Switch the arguments to nir_foreach_phi_src

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 <elima@igalia.com>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
707e72f13bb78869ee95d3286980bf1709cba6cf 27-Apr-2016 Jason Ekstrand <jason.ekstrand@intel.com> nir: Switch the arguments to nir_foreach_instr

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 <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
480a182ccd50a084e260f154b4f288b6de1c2d2f 12-Apr-2016 Connor Abbott <cwabbott0@gmail.com> nir/opt_peephole_select: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
b6dc940ec273252678d40707d300851fa1c85ea5 13-Apr-2016 Connor Abbott <cwabbott0@gmail.com> nir: rename nir_foreach_block*() to nir_foreach_block*_call()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
3124ce699bb3844e793f00e00bfbea5c91744f90 17-Nov-2015 Connor Abbott <connor.w.abbott@intel.com> nir: add a bit_size parameter to nir_ssa_dest_init

v2: Squash multiple commits addressing the new parameter in different
files so we don't break the build (Iago)

v3: Fix tgsi (Samuel)

v4: Fix nir_clone.c (Samuel)

v5: Fix vc4 and freedreno (Iago)

v6 (Sam)
- Fix build errors in nir_lower_indirect_derefs
- Use helper to get type size from nir_alu_type.

Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c
a39a8fbbaa129f4e52f2a3ad2747182e9a74d910 17-Jan-2016 Emil Velikov <emil.velikov@collabora.com> nir: move to compiler/

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/compiler/nir/nir_opt_peephole_select.c