[flang-commits] [flang] [Flang][OpenMP] Align map clause generation and fix issue with non-shared allocations for assumed shape/size descriptor types (PR #97855)
via flang-commits
flang-commits at lists.llvm.org
Mon Jul 8 09:01:32 PDT 2024
================
@@ -970,25 +970,21 @@ bool ClauseProcessor::processMap(
object.ref(), clauseLocation, asFortran, bounds,
treatIndexAsSection);
- auto origSymbol = converter.getSymbolAddress(*object.sym());
- mlir::Value symAddr = info.addr;
- if (origSymbol && fir::isTypeWithDescriptor(origSymbol.getType()))
- symAddr = origSymbol;
-
// Explicit map captures are captured ByRef by default,
// optimisation passes may alter this to ByCopy or other capture
// types to optimise
+ mlir::Value baseOp = info.rawInput;
----------------
agozillon wrote:
> I concur with Tom. If you are not directly mapping this "raw" value to the symbol in the OpenMP context, and are not using hlfir tools with this value, you are fine.
Thank you very much @jeanPerier! In this case, as the target region is IFA, there's a block argument generation and symbol rebinding that occurs for all map.info operations to corresponding block arguments (that correspond to symbols used inside of the region). However, this binding only extends for the scope of the target region and seems to not pose a problem when utilising the "raw" value as the map input. Would this be something you think would cause an issue?
https://github.com/llvm/llvm-project/pull/97855
More information about the flang-commits
mailing list