File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
mlir/lib/Dialect/OpenMP/Transforms Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -252,11 +252,11 @@ class PrepareForOMPOffloadPrivatizationPass
252252 // variable, rewrite all the uses of the original variable with
253253 // the heap-allocated variable.
254254 rewriter.setInsertionPoint (targetOp);
255- mapInfoOp = cloneModifyAndErase (mapInfoOp);
256- rewriter.setInsertionPoint (mapInfoOp );
255+ auto clonedOp = cast<omp::MapInfoOp>( cloneModifyAndErase (mapInfoOp) );
256+ rewriter.setInsertionPoint (clonedOp );
257257
258258 // Fix any members that may use varPtr to now use heapMem
259- for (auto member : mapInfoOp .getMembers ()) {
259+ for (auto member : clonedOp .getMembers ()) {
260260 auto memberMapInfoOp = cast<omp::MapInfoOp>(member.getDefiningOp ());
261261 if (!usesVarPtr (memberMapInfoOp))
262262 continue ;
@@ -276,7 +276,7 @@ class PrepareForOMPOffloadPrivatizationPass
276276 // targetOp.
277277 if (isPrivatizedByValue) {
278278 rewriter.setInsertionPoint (targetOp);
279- auto newPrivVar = LLVM::LoadOp::create (rewriter, mapInfoOp .getLoc (),
279+ auto newPrivVar = LLVM::LoadOp::create (rewriter, clonedOp .getLoc (),
280280 varType, heapMem);
281281 newPrivVars.push_back (newPrivVar);
282282 }
You can’t perform that action at this time.
0 commit comments