[flang-commits] [flang] [flang] Use fir.declare/fir.dummy_scope for TBAA tags attachments. (PR #92472)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Wed May 22 15:07:06 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;
----------------
vzakhari wrote:

I am not sure I understand the concern.  `AliasAnalysis::alias` works on two memory references that are being accessed at a certain point in MLIR - from my point of view, the reply is only valid for these two memory references at this point in MLIR.

https://github.com/llvm/llvm-project/pull/92472


More information about the flang-commits mailing list