@@ -1001,7 +1001,7 @@ class OpenACCClauseCIREmitter final
10011001 OpenACCRecipeBuilder<mlir::acc::PrivateRecipeOp>(cgf, builder)
10021002 .getOrCreateRecipe (
10031003 cgf.getContext (), recipeInsertLocation, varExpr,
1004- varRecipe.AllocaDecl , varRecipe. InitExpr ,
1004+ varRecipe.AllocaDecl ,
10051005 /* temporary=*/ nullptr , OpenACCReductionOperator::Invalid,
10061006 Decl::castToDeclContext (cgf.curFuncDecl ), opInfo.origType ,
10071007 opInfo.bounds .size (), opInfo.boundTypes , opInfo.baseType ,
@@ -1036,20 +1036,13 @@ class OpenACCClauseCIREmitter final
10361036
10371037 {
10381038 mlir::OpBuilder::InsertionGuard guardCase (builder);
1039- // TODO: OpenACC: At the moment this is a bit of a hacky way of doing
1040- // this, and won't work when we get to bounds/etc. Do this for now to
1041- // limit the scope of this refactor.
1042- VarDecl *allocaDecl = varRecipe.AllocaDecl ;
1043- allocaDecl->setInit (varRecipe.InitExpr );
1044- allocaDecl->setInitStyle (VarDecl::CallInit);
10451039
10461040 auto recipe =
10471041 OpenACCRecipeBuilder<mlir::acc::FirstprivateRecipeOp>(cgf,
10481042 builder)
10491043 .getOrCreateRecipe (
10501044 cgf.getContext (), recipeInsertLocation, varExpr,
1051- varRecipe.AllocaDecl , varRecipe.InitExpr ,
1052- varRecipe.InitFromTemporary ,
1045+ varRecipe.AllocaDecl , varRecipe.InitFromTemporary ,
10531046 OpenACCReductionOperator::Invalid,
10541047 Decl::castToDeclContext (cgf.curFuncDecl ), opInfo.origType ,
10551048 opInfo.bounds .size (), opInfo.boundTypes , opInfo.baseType ,
@@ -1086,18 +1079,12 @@ class OpenACCClauseCIREmitter final
10861079
10871080 {
10881081 mlir::OpBuilder::InsertionGuard guardCase (builder);
1089- // TODO: OpenACC: At the moment this is a bit of a hacky way of doing
1090- // this, and won't work when we get to bounds/etc. Do this for now to
1091- // limit the scope of this refactor.
1092- VarDecl *allocaDecl = varRecipe.AllocaDecl ;
1093- allocaDecl->setInit (varRecipe.InitExpr );
1094- allocaDecl->setInitStyle (VarDecl::CallInit);
10951082
10961083 auto recipe =
10971084 OpenACCRecipeBuilder<mlir::acc::ReductionRecipeOp>(cgf, builder)
10981085 .getOrCreateRecipe (
10991086 cgf.getContext (), recipeInsertLocation, varExpr,
1100- varRecipe.AllocaDecl , varRecipe. InitExpr ,
1087+ varRecipe.AllocaDecl ,
11011088 /* temporary=*/ nullptr , clause.getReductionOp (),
11021089 Decl::castToDeclContext (cgf.curFuncDecl ), opInfo.origType ,
11031090 opInfo.bounds .size (), opInfo.boundTypes , opInfo.baseType ,
0 commit comments