Commit 085f57ee by Chris Forbes

Run spirv-opt pass to eliminate dead functions after inlining

The inliner leaves the original functions. If we want the simplicity of not thinking about functions, we have to remove them. Change-Id: I0d0c7f8d3de21095b52d86a4c62015287eda32cc Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27272Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 5ceec2c3
......@@ -206,6 +206,7 @@ std::vector<uint32_t> preprocessSpirv(
});
opt.RegisterPass(spvtools::CreateInlineExhaustivePass());
opt.RegisterPass(spvtools::CreateEliminateDeadFunctionsPass());
// If the pipeline uses specialization, apply the specializations before freezing
if (specializationInfo)
......
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