[flang-commits] [flang] DRAFT: [flang][TBAA] refine TARGET/POINTER encoding (PR #169544)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Tue Nov 25 17:56:03 PST 2025


================
@@ -716,7 +719,12 @@ void AddAliasTagsPass::runOnAliasInterface(fir::FirAliasTagOpInterface op,
                << "Found reference to global " << globalName.str() << " at "
                << *op << "\n");
     if (source.isPointer()) {
+      // Pointers can alias with any pointer or target.
       tag = state.getFuncTreeWithScope(func, scopeOp).targetDataTree.getTag();
+    } else if (source.isTarget()) {
+      // Targets could alias with any pointer but not with eachother.
----------------
vzakhari wrote:

```suggestion
      // Targets could alias with any pointer but not with each other
      // (except for TARGET dummy arguments).
```

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


More information about the flang-commits mailing list