From 09408e32d7c0ccebf38fe31b5d2ddf4b1cd128e4 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 13 Oct 2022 20:31:30 -0700 Subject: Allow multi-level breaks to break out of `switch` statements. (#2451) * Allow multi-level breaks to break out of `switch` statements. * Rename loop->region. * Add `[ForceInline]` attribute. Co-authored-by: Yong He --- source/slang/slang-emit.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/slang/slang-emit.cpp') diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 6d85e1ce0..4666e80d8 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -386,10 +386,8 @@ Result linkAndOptimizeIR( #endif validateIRModuleIfEnabled(codeGenContext, irModule); - // Inline calls to any functions marked with [__unsafeInlineEarly] again, - // since we may be missing out cases prevented by the generic constructs - // that we just lowered out. - performMandatoryEarlyInlining(irModule); + // Inline calls to any functions marked with [__unsafeInlineEarly] or [ForceInline]. + performForceInlining(irModule); // Specialization can introduce dead code that could trip // up downstream passes like type legalization, so we -- cgit v1.2.3