diff options
author | Jaebaek Seo <jaebaek@google.com> | 2020-10-29 20:06:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 20:06:30 +0300 |
commit | 56d0f50357a192602216bfc4873e714905323e35 (patch) | |
tree | b261602e0bc76daa3bca2367f567205d0c9edd30 /Android.mk | |
parent | 7403dfafd8a4b7216343dd9be891e540a5f30240 (diff) |
Propagate OpLine to all applied instructions in spirv-opt (#3951)
Based on the OpLine spec, an OpLine instruction must be applied to
the instructions physically following it up to the first occurrence
of the next end of block, the next OpLine instruction, or the next
OpNoLine instruction.
```
OpLine %file 0 0
OpNoLine
OpLine %file 1 1
OpStore %foo %int_1
%value = OpLoad %int %foo
OpLine %file 2 2
```
For the above code, the current spirv-opt keeps three line
instructions `OpLine %file 0 0`, `OpNoLine`, and `OpLine %file 1 1`
in `std::vector<Instruction> dbg_line_insts_` of Instruction class
for `OpStore %foo %int_1`. It does not put any line instruction to
`std::vector<Instruction> dbg_line_insts_` of
`%value = OpLoad %int %foo` even though `OpLine %file 1 1` must be
applied to `%value = OpLoad %int %foo` based on the spec.
This results in the missing line information for
`%value = OpLoad %int %foo` while each spirv-opt pass optimizes the
code. We have to put `OpLine %file 1 1` to
`std::vector<Instruction> dbg_line_insts_` of
both `%value = OpLoad %int %foo` and `OpStore %foo %int_1`.
This commit conducts the line instruction propagation and skips
emitting the eliminated line instructions at the end, which are the same
with PropagateLineInfoPass and RedundantLineInfoElimPass. This
commit removes PropagateLineInfoPass and RedundantLineInfoElimPass.
KhronosGroup/glslang#2440 is a related PR that stop using
PropagateLineInfoPass and RedundantLineInfoElimPass from glslang.
When the code in this PR applied, the glslang tests will pass.
Diffstat (limited to 'Android.mk')
-rw-r--r-- | Android.mk | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk index 54360f0d6..0b64ea6d6 100644 --- a/Android.mk +++ b/Android.mk @@ -149,7 +149,6 @@ SPVTOOLS_OPT_SRC_FILES := \ source/opt/pass.cpp \ source/opt/pass_manager.cpp \ source/opt/private_to_local_pass.cpp \ - source/opt/process_lines_pass.cpp \ source/opt/propagator.cpp \ source/opt/reduce_load_size.cpp \ source/opt/redundancy_elimination.cpp \ |