[flang-commits] [flang] [flang] AliasAnalysis: distinguish addr of arg vs. addr in arg (PR #87723)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Thu Apr 18 09:56:40 PDT 2024
================
@@ -171,10 +171,28 @@ void AddAliasTagsPass::runOnAliasInterface(fir::FirAliasTagOpInterface op,
<< " at " << *op << "\n");
tag = state.getFuncTree(func).directDataTree.getTag(name);
} else {
- // SourceKind::Direct is likely to be extended to cases which are not a
- // SymbolRefAttr in the future
- LLVM_DEBUG(llvm::dbgs().indent(2) << "Can't get name for direct "
- << source << " at " << *op << "\n");
+ bool sourceIsDummyArgument = false;
+ if (auto blockArg =
+ source.u.get<mlir::Value>().dyn_cast<mlir::BlockArgument>())
+ sourceIsDummyArgument = blockArg.getOwner()->isEntryBlock();
----------------
tblah wrote:
The changes look good to me. Thanks for updating!
https://github.com/llvm/llvm-project/pull/87723
More information about the flang-commits
mailing list