- The binding for Type is trivial and should be non-controversial.
- The way that I define the IntegerType should serve as a pattern for what I want to do next.
- I propose defining the rest of the standard types in this fashion and then generalizing for dialect types as necessary.
- Essentially, creating/accessing a concrete Type (vs interacting with the string form) is done by "casting" to the concrete type (i.e. IntegerType can be constructed with a Type and will throw if the cast is illegal).
- This deviates from some of our previous discussions about global objects but I think produces a usable API and we should go this way.
Details
Details
- Reviewers
ftynse - Commits
- rGd29d1e2ffd61: Add python bindings for Type and IntegerType.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
We usually avoid this in MLIR code. Many useful containers are re-exported in the mlir namespace.