From 4c4826d47eeef4675daae4ae53ff76f4d5ebd84a Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 16 Feb 2023 13:55:32 -0800 Subject: Overhaul global inst deduplication and cpp/cuda backend. (#2654) * Overhaul global inst deduplication and cpp/cuda backend. * Update IR documentation. --------- Co-authored-by: Yong He --- source/slang/slang-ir-inline.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (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 7fc977170..643acdbb8 100644 --- a/source/slang/slang-ir-inline.cpp +++ b/source/slang/slang-ir-inline.cpp @@ -53,10 +53,8 @@ struct InliningPassBase // so that even if `child` gets removed (because of inlining) // we automatically start at the next instruction after it. // - IRInst* next = nullptr; - for( auto child = inst->getFirstChild(); child; child = next ) + for (auto child : inst->getModifiableChildren()) { - next = child->getNextInst(); changed |= considerAllCallSitesRec(child); } return changed; -- cgit v1.2.3