[flang-commits] [flang] [flang] add tbaa tags to global variables (PR #68727)

Renaud Kauffmann via flang-commits flang-commits at lists.llvm.org
Wed Oct 11 14:00:06 PDT 2023


================
@@ -406,7 +406,7 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v) {
         attributes.set(Attribute::Pointer);
     }
 
-  if (type == SourceKind::Global)
+  if (type == SourceKind::Global || type == SourceKind::Direct)
----------------
Renaud-K wrote:

I am still struggling a bit with heap data being marked global.

What would make sense for me is:

A direct with no pointer/target would have its own TBAA node.
A global with no target would have its own TBBA node.
Anything else would point to the "Any Data Access" node?



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


More information about the flang-commits mailing list