[Downstream Change][flang][OpenMP] Resolve private array source from block-arg owner in alias analysis - #984
Conversation
…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
|
This pull review modifies files outside of the |
|
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. |
This one yes, but we have a few more in the pipeline, and some of them go beyond that. |
This is a cherry-pick of PR #208227 from the LLVM's main branch.
Part of #208086.
fir::AliasAnalysis::getSourcefails to recognize an OpenMP private array as anAllocatesource when itshlfir.declareis nested inside an omp.loop_nest, and conservatively returnsMayAlias. This changesgetSourceto 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: CopilotDownstream issue: #988