Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaebaek Seo <jaebaek@google.com>2020-10-29 20:06:30 +0300
committerGitHub <noreply@github.com>2020-10-29 20:06:30 +0300
commit56d0f50357a192602216bfc4873e714905323e35 (patch)
treeb261602e0bc76daa3bca2367f567205d0c9edd30 /BUILD.gn
parent7403dfafd8a4b7216343dd9be891e540a5f30240 (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 'BUILD.gn')
-rw-r--r--BUILD.gn2
1 files changed, 0 insertions, 2 deletions
diff --git a/BUILD.gn b/BUILD.gn
index de4e48ef8..55eb9ada7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -654,8 +654,6 @@ static_library("spvtools_opt") {
"source/opt/passes.h",
"source/opt/private_to_local_pass.cpp",
"source/opt/private_to_local_pass.h",
- "source/opt/process_lines_pass.cpp",
- "source/opt/process_lines_pass.h",
"source/opt/propagator.cpp",
"source/opt/propagator.h",
"source/opt/reduce_load_size.cpp",