[flang-commits] [flang] [Flang][OpenMP] Align map clause generation and fix issue with non-shared allocations for assumed shape/size descriptor types (PR #97855)
Sergio Afonso via flang-commits
flang-commits at lists.llvm.org
Mon Jul 29 07:34:26 PDT 2024
================
@@ -75,14 +83,26 @@ class OMPMapInfoFinalizationPass
// perform an alloca and then store to it and retrieve the data from the new
// alloca.
if (mlir::isa<fir::BaseBoxType>(descriptor.getType())) {
- mlir::OpBuilder::InsertPoint insPt = builder.saveInsertionPoint();
- mlir::Block *allocaBlock = builder.getAllocaBlock();
- assert(allocaBlock && "No alloca block found for this top level op");
- builder.setInsertionPointToStart(allocaBlock);
- auto alloca = builder.create<fir::AllocaOp>(loc, descriptor.getType());
- builder.restoreInsertionPoint(insPt);
- builder.create<fir::StoreOp>(loc, descriptor, alloca);
- descriptor = alloca;
+ // if we have already created a local allocation for this BoxType,
----------------
skatrak wrote:
```suggestion
// If we have already created a local allocation for this BoxType,
```
https://github.com/llvm/llvm-project/pull/97855
More information about the flang-commits
mailing list