SPIRV-Tools/test/opt/loop_optimizations
Steven Perron 1254335d13
Don't unswitch the latch block. (#2205)
Loop unswitching is unswitching the conditional branch that creates the
back-edge. In the version of the loop, where the bachedge is not taken,
there is no back-edge. This is what causes the validator to complain.

The solution I will go with will be to now unswitch a condition with a
back-edge. At this time we do not now if loop unswitching is used. We do
not include it in the optimization sets provided, nor is it used in
glslang's set. When there are opportunities and no breaks from the loop,
the loop with either be a single iteration loop, or an infinite loop.
There is no performance advantage to performing loop unswitching in
either of those cases. If there is a break, maintaining structured
control flow will be tricky. Unless we see a clear advantage to handling
these case, I would go with the safer simpler solution.

Fixes #2201.
2018-12-18 18:15:00 +00:00
..
CMakeLists.txt Enable precompiled headers for spirv-tools(-shared) and some unit tests (#2026) 2018-11-06 09:26:23 -05:00
dependence_analysis_helpers.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
dependence_analysis.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
fusion_compatibility.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
fusion_illegal.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
fusion_legal.cpp Fix bug in construct block calculation (#1964) 2018-10-10 11:14:01 -04:00
fusion_pass.cpp Make EFFCEE required (#1943) 2018-10-04 10:00:11 -04:00
hoist_all_loop_types.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
hoist_double_nested_loops.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
hoist_from_independent_loops.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
hoist_simple_case.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
hoist_single_nested_loops.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
hoist_without_preheader.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
lcssa.cpp Make EFFCEE required (#1943) 2018-10-04 10:00:11 -04:00
loop_descriptions.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
loop_fission.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
nested_loops.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
pch_test_opt_loop.cpp Enable precompiled headers for spirv-tools(-shared) and some unit tests (#2026) 2018-11-06 09:26:23 -05:00
pch_test_opt_loop.h Enable precompiled headers for spirv-tools(-shared) and some unit tests (#2026) 2018-11-06 09:26:23 -05:00
peeling_pass.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
peeling.cpp Add base and core bindless validation instrumentation classes (#2014) 2018-11-08 13:54:54 -05:00
unroll_assumptions.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
unroll_simple.cpp Make EFFCEE required (#1943) 2018-10-04 10:00:11 -04:00
unswitch.cpp Don't unswitch the latch block. (#2205) 2018-12-18 18:15:00 +00:00