[Mlir-commits] [mlir] [mlir][llvm] support -new-struct-path-tbaa (PR #119698)

Tobias Gysi llvmlistbot at llvm.org
Thu Feb 27 10:50:22 PST 2025


================
@@ -58,7 +58,15 @@ mlir::LLVM::detail::verifyAliasAnalysisOpInterface(Operation *op) {
   ArrayAttr tags = iface.getTBAATagsOrNull();
   if (!tags)
     return success();
-
+  if (tags.size() > 0) {
----------------
gysit wrote:

Ok I understand. I would suggest to extend the AliasAnalysisOpInterface. It currently has one function that returns the TBAA tags. How about implementing two functions:
```
iface.getTBBATagsOrNull()
```
and
```
iface.getTBBAAccessTagsOrNull()
```
This could potentially be implemented by having two arrays stored on the alias operations. Or by checking if the array contains the old or the new kind of TBAA attributes. That way the verifier can use the existing logic for the two cases separately. And to users of the exiting TBAA attributes don't need to understand the new kind of TBAA metadata.

WDYT?



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


More information about the Mlir-commits mailing list