David Neto
8c3d5b4b6c
SPIR-V: Aggressively prune unreachable merge, continue target
...
More aggressively prune unreachable code as follows.
When no control flow edges reach a merge block or continue target:
- delete their contents so that:
- a merge block becomes OpLabel, then OpUnreachable
- a continue target becomes OpLabel, then an OpBranch back to the
loop header
- any basic block which is dominated by such a merge block or continue
target is removed as well.
- decorations targeting the removed instructions are removed.
Enables the SPIR-V builder post-processing step the GLSLANG_WEB case.
2019-10-29 15:33:54 -04:00
Lei Zhang
2840f63fbc
Use unordered_set in ReadableOrderTraverser.
...
Previously we are using unordered_map to map to bool, which can
be simplified with unordered_set.
2017-05-11 20:48:34 -04:00
John Kessenich
927608b393
Non-functional: White space after "//", mostly for copyrights.
2017-01-06 12:34:14 -07:00
John Kessenich
d3d3ce7160
Comments only.
2016-05-06 13:06:11 -06:00
rdb
32084e889d
Fix compilation issues with MSVC 2010
...
(mostly by eliminating use of range-based for loops and std::tie)
2016-02-23 22:17:38 +01:00
Dejan Mircevski
f3c63cc359
Move continue-block to after all branches.
2016-01-19 16:56:45 -05:00
Dejan Mircevski
159b59faa7
Reformat to better match existing style.
2016-01-19 14:52:31 -05:00
Dejan Mircevski
cce6a8acaf
(C) Google
2016-01-19 14:50:12 -05:00
Dejan Mircevski
a7e734962e
Remove a redundant check before visit(succ).
2016-01-19 11:49:37 -05:00
Dejan Mircevski
57bbde4a99
Add copyright, remove unused #includes.
2016-01-19 11:44:53 -05:00
Dejan Mircevski
38d039d063
Rework inReadableOrder() as a recursive descent.
...
Add a test for unreachable merge block.
Update test results with the new order: mainly delaying merge blocks and
removing unreachable ones.
2016-01-19 10:14:50 -05:00
Dejan Mircevski
9c591487ad
Fix spv.branch-return.vert.
2016-01-19 10:11:34 -05:00
Dejan Mircevski
baa55a1591
Add spv.branch-return.vert and fix inReadableOrder().
2016-01-19 10:11:34 -05:00
Dejan Mircevski
44bfb0d0cd
Implement inReadableOrder().
2016-01-19 10:11:34 -05:00