From 453683bf44f2112719802eaac2b332d49eebd640 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 19 Aug 2024 15:03:56 -0700 Subject: Tuple swizzling, concat, comparison and `countof`. (#4856) * Tuple swizzling and element access. * Update proposal status. * Cleanup. * Fix merrge error. * Address review. --- source/slang/slang-ir-inline.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/slang/slang-ir-inline.cpp') diff --git a/source/slang/slang-ir-inline.cpp b/source/slang/slang-ir-inline.cpp index 0d5cb1c70..9b2b59cd9 100644 --- a/source/slang/slang-ir-inline.cpp +++ b/source/slang/slang-ir-inline.cpp @@ -277,6 +277,17 @@ struct InliningPassBase if(!isDefinition(calleeFunc)) return false; + // We cannot inline a call inside an `IRExpand`. + // Because this will make the cfg inside the `IRExpand` too complex, + // and our expand specialization logic isn't general enough to deal + // with that yet. + for (auto parent = call->getParent(); parent; parent = parent->getParent()) + { + if (as(parent)) + return false; + if (as(parent)) + break; + } return true; } -- cgit v1.2.3