[flang-commits] [flang] [OpenMP][Flang] Enable alias analysis inside omp target region (PR #111670)
Dominik Adamski via flang-commits
flang-commits at lists.llvm.org
Thu Oct 10 04:47:02 PDT 2024
================
@@ -319,6 +330,32 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v,
breakFromLoop = true;
})
.Case<hlfir::DeclareOp, fir::DeclareOp>([&](auto op) {
+ // If declare operation is inside omp target region,
+ // continue alias analysis outside the target region
+ if (llvm::isa<omp::TargetOp>(op->getParentOp())) {
+ omp::TargetOp targetOp =
+ llvm::cast<omp::TargetOp>(op->getParentOp());
+ auto mapClauseOwner =
+ llvm::dyn_cast<omp::MapClauseOwningOpInterface>(
+ targetOp.getOperation());
+ if (!mapClauseOwner) {
----------------
DominikAdamski wrote:
I modified PR becuase of https://github.com/llvm/llvm-project/pull/109808
https://github.com/llvm/llvm-project/pull/111670
More information about the flang-commits
mailing list