[flang-commits] [flang] [flang] Use fir.declare/fir.dummy_scope for TBAA tags attachments. (PR #92472)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Wed May 22 03:42:58 PDT 2024
================
@@ -30,8 +30,15 @@ using namespace mlir;
static bool isDummyArgument(mlir::Value v) {
auto blockArg{mlir::dyn_cast<mlir::BlockArgument>(v)};
- if (!blockArg)
+ if (!blockArg) {
+ auto defOp = v.getDefiningOp();
+ if (defOp) {
+ if (auto declareOp = mlir::dyn_cast<fir::DeclareOp>(defOp))
+ if (declareOp.getDummyScope())
+ return true;
----------------
tblah wrote:
This will work for TBAA because of the separate trees.
I'm worried users of `fir::AliasAnalysis::alias` might get confused here. It will see a dummy argument and then say it doesn't alias, but that dummy argument will definitely alias with something in the function into which it was inlined.
https://github.com/llvm/llvm-project/pull/92472
More information about the flang-commits
mailing list