summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-10-11 23:14:41 -0700
committerGitHub <noreply@github.com>2022-10-11 23:14:41 -0700
commit5128de89a9a8da09587f20e8fb5bc324ea14e0df (patch)
tree292d6488ee966eedcff9736f22511038f9bdc84b /source/slang/slang-emit.cpp
parent8c43a19d2fd8f9d1bd9d5854a4b1e64d5231bc41 (diff)
Small IR cleanups. (#2441)
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.