[flang-commits] [flang] [flang] AliasAnalysis: Handle fir.load on fir.alloca (PR #117785)
Joel E. Denny via flang-commits
flang-commits at lists.llvm.org
Wed Jan 29 12:13:40 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);
----------------
jdenny-ornl wrote:
I've restored C1+C2 so that all tests pass again.
Given that you're opposed to C1 but we so far have no other solution that doesn't [cause apparent regressions](https://github.com/llvm/llvm-project/pull/117785#discussion_r1924405040), what do you feel is the path forward?
https://github.com/llvm/llvm-project/pull/117785
More information about the flang-commits
mailing list