[all-commits] [llvm/llvm-project] 6cd86d: [flang] Use fir.declare/fir.dummy_scope for TBAA t...
Slava Zakharin via All-commits
all-commits at lists.llvm.org
Tue Jun 4 08:34:02 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6cd86d0fae8cbb752a713860f131b9b759b2cbb8
https://github.com/llvm/llvm-project/commit/6cd86d0fae8cbb752a713860f131b9b759b2cbb8
Author: Slava Zakharin <szakharin at nvidia.com>
Date: 2024-06-04 (Tue, 04 Jun 2024)
Changed paths:
M flang/include/flang/Optimizer/Analysis/AliasAnalysis.h
M flang/include/flang/Optimizer/Analysis/TBAAForest.h
M flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
M flang/lib/Optimizer/CodeGen/TBAABuilder.cpp
M flang/lib/Optimizer/Dialect/FIROps.cpp
M flang/lib/Optimizer/Transforms/AddAliasTags.cpp
M flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
A flang/test/Transforms/tbaa-with-dummy-scope.fir
M flang/test/Transforms/tbaa.fir
M flang/test/Transforms/tbaa2.fir
Log Message:
-----------
[flang] Use fir.declare/fir.dummy_scope for TBAA tags attachments. (#92472)
With MLIR inlining (e.g. `flang-new -mmlir -inline-all=true`)
the current TBAA tags attachment is suboptimal, because
we may lose information about the callee's dummy arguments
(by bypassing fir.declare in AliasAnalysis::getSource).
This is a conservative first step to improve the situation.
This patch makes AddAliasTagsPass to account for fir.dummy_scope
hierarchy after MLIR inlining and use it to place the TBAA tags
into TBAA trees corresponding to different function scopes.
The pass uses special mode of AliasAnalysis to find the instantiation
point of a Fortran variable (a [hl]fir.decalre) when searching
for the source of a memory reference. In this mode, AliasAnalysis
will always stop at fir.declare operations that have dummy_scope
operands - there should not be a reason to past throught it
for the purpose of TBAA tags attachment.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list