From 85f005888cadeb4b1d957b57a86cbad6cc9ea313 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 23 Mar 2023 11:37:29 -0700 Subject: Fix scope fixing for address insts. (#2724) Co-authored-by: Yong He --- source/slang/slang-emit-c-like.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-emit-c-like.cpp') diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index a31c16505..356f1c7ce 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -2835,7 +2835,7 @@ void CLikeSourceEmitter::emitFunctionBody(IRGlobalValueWithCode* code) // storage for derived structures like the region tree (and logic // for invalidating them when a transformation would break them). // - fixValueScoping(regionTree); + fixValueScoping(regionTree, [this](IRInst* inst) {return shouldFoldInstIntoUseSites(inst); }); // Now emit high-level code from that structured region tree. // -- cgit v1.2.3