Skip to content

[Downstream Change][flang][OpenMP] Resolve private array source from block-arg owner in alias analysis - #984

Merged
pawosm-arm merged 1 commit into
release/arm-software/23.xfrom
users/pawosm-arm/atfl-release23-performance-pick-1
Aug 6, 2026
Merged

[Downstream Change][flang][OpenMP] Resolve private array source from block-arg owner in alias analysis#984
pawosm-arm merged 1 commit into
release/arm-software/23.xfrom
users/pawosm-arm/atfl-release23-performance-pick-1

Conversation

@pawosm-arm

@pawosm-arm pawosm-arm commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This is a cherry-pick of PR #208227 from the LLVM's main branch.

Part of #208086. fir::AliasAnalysis::getSource fails to recognize an OpenMP private array as an Allocate source when its hlfir.declare is nested inside an omp.loop_nest, and conservatively returns MayAlias. This changes getSource to resolve the clause-carrying OpenMP op from the private block argument's owner region, so the private is correctly classified and does not spuriously alias other objects. Assisted-by: Copilot

Downstream issue: #988

…alias analysis (#208227)

Part of #208086. `fir::AliasAnalysis::getSource` fails to recognize an
OpenMP private array as an `Allocate` source when its `hlfir.declare` is
nested inside an omp.loop_nest, and conservatively returns `MayAlias`.
This changes `getSource` to resolve the clause-carrying OpenMP op from
the private block argument's owner region, so the private is correctly
classified and does not spuriously alias other objects. Assisted-by: Copilot
@pawosm-arm
pawosm-arm requested review from bipmis and tblah August 5, 2026 10:53
@pawosm-arm
pawosm-arm requested review from a team as code owners August 5, 2026 10:53
@github-actions github-actions Bot added the downstream-change Downstream change to LLVM tree label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

This pull review modifies files outside of the arm-software directory, so please ensure it follows the Downstream Patch Policy.
An automated check will test if the tagging requirements have been met. Please wait for approving reviews from both Arm Toolchain for Embedded and Arm Toolchain for Linux teams before merging.

@pawosm-arm

Copy link
Copy Markdown
Contributor Author

Looking at this PR and #966 we can clearly see a conflict of (performance) interest between ATfE and ATfL. Considering we plan to introduce more cherry-picks like that, I think we need to call an emergency meeting on how can we immediately decouple ATfL and ATfE repositories to avoid problems in this and any future releases.

@tblah tblah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Low risk backport. LGTM.

This is fortran-only so it shouldn't have any impact on ATfE

@pawosm-arm

Copy link
Copy Markdown
Contributor Author

This is fortran-only so it shouldn't have any impact on ATfE

This one yes, but we have a few more in the pipeline, and some of them go beyond that.

@pawosm-arm pawosm-arm changed the title [flang][OpenMP] Resolve private array source from block-arg owner in alias analysis [Downstream Change][flang][OpenMP] Resolve private array source from block-arg owner in alias analysis Aug 5, 2026
@pawosm-arm
pawosm-arm merged commit 1557164 into release/arm-software/23.x Aug 6, 2026
1 of 3 checks passed
@pawosm-arm
pawosm-arm deleted the users/pawosm-arm/atfl-release23-performance-pick-1 branch August 6, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

downstream-change Downstream change to LLVM tree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants