Unverified Commit ed8bd045 by Jaebaek Seo Committed by GitHub

Do not use PropagateLineInfoPass and RedundantLineInfoElimPass (#2440)

* Do not use PropagateLineInfoPass and RedundantLineInfoElimPass Since spirv-opt will remove PropagateLineInfoPass and RedundantLineInfoElimPass, glslang should not use it. spirv-opt will propagate the line instructions and eliminate the redundant lines by default in IR loading/emission. * Update known_good.json for spirv-tool
parent 142cb87f
...@@ -174,10 +174,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector ...@@ -174,10 +174,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
// line information into all SPIR-V instructions. This avoids loss of // line information into all SPIR-V instructions. This avoids loss of
// information when instructions are deleted or moved. Later, remove // information when instructions are deleted or moved. Later, remove
// redundant information to minimize final SPRIR-V size. // redundant information to minimize final SPRIR-V size.
if (options->generateDebugInfo) { if (options->stripDebugInfo) {
optimizer.RegisterPass(spvtools::CreatePropagateLineInfoPass());
}
else if (options->stripDebugInfo) {
optimizer.RegisterPass(spvtools::CreateStripDebugInfoPass()); optimizer.RegisterPass(spvtools::CreateStripDebugInfoPass());
} }
optimizer.RegisterPass(spvtools::CreateWrapOpKillPass()); optimizer.RegisterPass(spvtools::CreateWrapOpKillPass());
...@@ -207,9 +204,6 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector ...@@ -207,9 +204,6 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
} }
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass()); optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
optimizer.RegisterPass(spvtools::CreateCFGCleanupPass()); optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
if (options->generateDebugInfo) {
optimizer.RegisterPass(spvtools::CreateRedundantLineInfoElimPass());
}
spvtools::OptimizerOptions spvOptOptions; spvtools::OptimizerOptions spvOptOptions;
optimizer.SetTargetEnv(MapToSpirvToolsEnv(intermediate.getSpv(), logger)); optimizer.SetTargetEnv(MapToSpirvToolsEnv(intermediate.getSpv(), logger));
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"site" : "github", "site" : "github",
"subrepo" : "KhronosGroup/SPIRV-Tools", "subrepo" : "KhronosGroup/SPIRV-Tools",
"subdir" : "External/spirv-tools", "subdir" : "External/spirv-tools",
"commit" : "a1d38174b1f7d2651c718ae661886d606cb50a32" "commit" : "56d0f50357a192602216bfc4873e714905323e35"
}, },
{ {
"name" : "spirv-tools/external/spirv-headers", "name" : "spirv-tools/external/spirv-headers",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment