summaryrefslogtreecommitdiff
path: root/source/slang/slang-lower-to-ir.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-10-13 20:31:30 -0700
committerGitHub <noreply@github.com>2022-10-13 20:31:30 -0700
commit09408e32d7c0ccebf38fe31b5d2ddf4b1cd128e4 (patch)
tree65e0f711de39f2d095aed8f15798668975375e08 /source/slang/slang-lower-to-ir.cpp
parent27d7961db15ed5890d2ad0eff1218e26dcdaf82c (diff)
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 <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
-rw-r--r--source/slang/slang-lower-to-ir.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index bd724aa9d..b03f3ae62 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -8102,6 +8102,11 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
getBuilder()->addDecoration(irFunc, kIROp_UnsafeForceInlineEarlyDecoration);
}
+ if (decl->findModifier<ForceInlineAttribute>())
+ {
+ getBuilder()->addDecoration(irFunc, kIROp_ForceInlineDecoration);
+ }
+
if (auto attr = decl->findModifier<CustomJVPAttribute>())
{
auto loweredVal = lowerLValueExpr(this->context, attr->funcDeclRef);