summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit.cpp')
-rw-r--r--source/slang/slang-emit.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp
index a916d0d63..6d85e1ce0 100644
--- a/source/slang/slang-emit.cpp
+++ b/source/slang/slang-emit.cpp
@@ -830,6 +830,9 @@ Result linkAndOptimizeIR(
}
}
+ // Run a final round of DCE to clean up unused things after phi-elimination.
+ eliminateDeadCode(irModule);
+
// We include one final step to (optionally) dump the IR and validate
// it after all of the optimization passes are complete. This should
// reflect the IR that code is generated from as closely as possible.