From 0b05fe33c82ee301c134f5b9a87a596aa47121c8 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 10 Nov 2022 14:19:20 -0800 Subject: 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 --- source/slang/slang-emit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-emit.cpp') 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 -- cgit v1.2.3