[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
Fri May 31 03:11: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:

Thanks for your explanation and for baring with me while I figure out that this is correct. I think this is good as it is.

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


More information about the flang-commits mailing list