From 5128de89a9a8da09587f20e8fb5bc324ea14e0df Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 11 Oct 2022 23:14:41 -0700 Subject: Small IR cleanups. (#2441) --- source/slang/slang-emit.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/slang/slang-emit.cpp') 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. -- cgit v1.2.3