[flang-commits] [flang] [flang] [NFCI] Using getSource instead of getOriginalDef (PR #128984)
Renaud Kauffmann via flang-commits
flang-commits at lists.llvm.org
Tue Mar 4 17:50:44 PST 2025
================
@@ -621,38 +587,34 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v,
if (mlir::isa<fir::PointerType>(boxTy.getEleTy()))
attributes.set(Attribute::Pointer);
- auto def = getOriginalDef(op.getMemref(), attributes,
- isCapturedInInternalProcedure,
- approximateSource);
- if (auto addrOfOp = def.template getDefiningOp<fir::AddrOfOp>()) {
- global = addrOfOp.getSymbol();
-
- if (hasGlobalOpTargetAttr(def, addrOfOp))
- attributes.set(Attribute::Target);
+ auto boxSrc = getSource(op.getMemref());
----------------
Renaud-K wrote:
It is the drawback and the reason why I preferred `getOrginalDef`.
Though, since it is not following data, it should return an indirect source kind and the load op as the source.
I could add a test, I guess.
https://github.com/llvm/llvm-project/pull/128984
More information about the flang-commits
mailing list