SymbolOpInterface overrides the base classof to provide support
for optionally implementing the interface. This is currently placed
in the extraClassDeclarations, but that is kind of awkard given that
it requires underlying knowledge of how the base classof is implemented.
This commit adds a proper "extraClassOf" field to allow interfaces to
implement this, which abstracts away the default classof logic.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/IR/OpBase.td | ||
---|---|---|
2052 | This is not arbitrary logic, this requires to end in a return that reports whether a given op implements this interface. Here we rely on -> for accessing the operation being checked and so need nothing else like $_op ? it may be good to document this. It feels partially weird/unsafe to say its an optional interface which you check if implemented by calling functions on that interface. |
This is not arbitrary logic, this requires to end in a return that reports whether a given op implements this interface.
Here we rely on -> for accessing the operation being checked and so need nothing else like $_op ? it may be good to document this. It feels partially weird/unsafe to say its an optional interface which you check if implemented by calling functions on that interface.