================
@@ -392,12 +392,27 @@ class OpenACCClauseCIREmitter final
CIRGenFunction::AutoVarEmission tempDeclEmission,
mlir::acc::FirstprivateRecipeOp recipe, const VarDecl *varRecipe,
const VarDecl *temporary) {
- builder.createBlock(&recipe.getCopyRegion(), recipe.getCopyRegion().end(),
- {mainOp.getType(), mainOp.getType()}, {loc, loc});
+ mlir::Block *block = builder.createBlock(
+ &recipe.getCopyRegion(), recipe.getCopyRegion().end(),
+ {mainOp.getType(), mainOp.getType()}, {loc, loc});
builder.setInsertionPointToEnd(&recipe.getCopyRegion().back());
- // TODO: OpenACC: Implement this copy to actually do something.
+ mlir::BlockArgument fromArg = block->getArgument(0);
+ mlir::BlockArgument toArg = block->getArgument(1);
+
+ mlir::Type elementTy =
+ mlir::cast<cir::PointerType>(mainOp.getType()).getPointee();
+
+ // Set the address of the emission to be the argument, so that we
initialize
+ // that instead of the variable in the other block.
+ tempDeclEmission.setAllocatedAddress(
----------------
andykaylor wrote:
Where is the memory for this actually allocated? Does that happen during
lowering to some other dialect?
https://github.com/llvm/llvm-project/pull/154150
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits