[clang] [OpenACC] 'reduction' init lowering for +, |, ^, || (PR #155924)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 28 16:58:28 PDT 2025


================
@@ -425,6 +425,7 @@ class OpenACCClauseCIREmitter final
         &recipe.getCopyRegion(), recipe.getCopyRegion().end(),
         {mainOp.getType(), mainOp.getType()}, {loc, loc});
     builder.setInsertionPointToEnd(&recipe.getCopyRegion().back());
+    CIRGenFunction::LexicalScope ls(cgf, loc, block);
----------------
andykaylor wrote:

Does this also need a `cir::ScopeOp` or is that already handled by some existing region? I have the same question about other places you inserted a `LexicalScope` below. That is, what is the purpose of the `LexicalScope` here?

https://github.com/llvm/llvm-project/pull/155924


More information about the cfe-commits mailing list