summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-11-10 14:19:20 -0800
committerGitHub <noreply@github.com>2022-11-10 14:19:20 -0800
commit0b05fe33c82ee301c134f5b9a87a596aa47121c8 (patch)
tree61869daaf5cad2609efcdf239f31c203d64f39b1 /source/slang/slang-emit.cpp
parent10834e69b1e483be4116d85b00d4bc0b861da822 (diff)
Fix inlining pass. (#2506)
* Fix inlining pass. * Add more check against corner cases. * Revise comments. * Fixes. * Fix premake script. * Fixes. Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit.cpp')
-rw-r--r--source/slang/slang-emit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp
index 9c72f1d63..de9d23e97 100644
--- a/source/slang/slang-emit.cpp
+++ b/source/slang/slang-emit.cpp
@@ -401,8 +401,6 @@ Result linkAndOptimizeIR(
if (sink->getErrorCount() != 0)
return SLANG_FAIL;
- eliminateMultiLevelBreak(irModule);
-
// TODO(DG): There are multiple DCE steps here, which need to be changed
// so that they don't just throw out any non-entry point code
// Debugging code for IR transformations...
@@ -804,6 +802,8 @@ Result linkAndOptimizeIR(
LivenessUtil::addVariableRangeStarts(irModule, livenessMode);
}
+ eliminateMultiLevelBreak(irModule);
+
// As a late step, we need to take the SSA-form IR and move things *out*
// of SSA form, by eliminating all "phi nodes" (block parameters) and
// introducing explicit temporaries instead. Doing this at the IR level