Drop the access group and alias analysis attribute related
strings that should be obsolete now that the attributes
can be accessed using the AccessGroupOpInterface
or the AliasAnalysisOpInterface.
Details
Details
- Reviewers
ftynse nicolasvasilache frgossen
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
@frgossen I believe now that there are interfaces to access both access groups and all the alias analysis attributes it may time to remove the strings?
Comment Actions
Could you share a reference use of these interfaces? I'm not very familiar with this myself, just remember that it broke our tests last time.
Comment Actions
Sure for setting an alias related attribute you can for example do:
auto iface = dyn_cast<AliasAnalysisOpInterface>(op); if (!iface) return failure(); iface.setAliasScopes(/* put the alias scope attribute here */);
If you want to read an alias scopes this can be done as follows:
AliasAnalysisOpInterface op = loadOp; ArrayAttr aliasRefs = op.getAliasScopesOrNull();
The access groups can be accessed using the AccessGroupOpInterface.
There is no hurry with this PR and keeping the strings is fine worst case. The interfaces are much nicer though since some error handling can be dropped (e.g. https://reviews.llvm.org/D145044)
The interface definitions are here:
/llvm-project/mlir/include/mlir/Dialect/LLVMIR/LLVMInterfaces.td