================ @@ -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) ---------------- tblah wrote:
So, if I understand correctly, it *is* safe for me to proceed treating these `Direct` source kinds as globals (I already handle pointer/target elsewhere)? The information I am encoding in TBAA is roughly "if it is a pointer, target, or if I don't know what it is then assume it could alias with any other data access". I think this covers both the reflective and non-reflective cases: 1. `rhsSrc.isTargetOrPointer()` -> rhs may alias with any data access and so it would alias with lhsSrc no matter what lhsSrc is 2. `lhsSrc.isTargetOrPointer()` -> lhs will alias with rhs, no matter what rhs is. This is less precise than `fir::AliasAnalysis::alias` but it shouldn't produce incorrect results. https://github.com/llvm/llvm-project/pull/68727 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits