[flang-commits] [flang] [flang] AliasAnalysis: Handle fir.load on fir.alloca (PR #117785)
Renaud Kauffmann via flang-commits
flang-commits at lists.llvm.org
Fri Jan 31 19:19:31 PST 2025
================
@@ -522,6 +546,12 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v,
.Case<fir::AllocaOp, fir::AllocMemOp>([&](auto op) {
// Unique memory allocation.
type = SourceKind::Allocate;
+ // If there's no DeclareOp, then we need to get the pointer attribute
+ // from the type. TODO: That case occurs in our test suite
+ // (alias-analysis-2.fir), but does flang currently generate such
+ // code?
+ if (isPointerReference(ty))
+ attributes.set(Attribute::Pointer);
----------------
Renaud-K wrote:
T3 and T4 of course belong in a separate PR along with all discussions around changing the definition of data versus non-data. I can see that there would be much to discuss about changing this definition and we would need time to think things through. You have been provided with a solution and very reasonable and actionable feedback to move forward.
https://github.com/llvm/llvm-project/pull/117785
More information about the flang-commits
mailing list