- Changes hooks to operate on Operation* instead of ModuleOp.
- Adds a TranslateFromMLIRRegistration optional parserFunction argument allowing the parser to be configured (i.e. to build a custom top-level operation).
- This allowed the removal of some top-level op munging in the SPIRV translations (verified by tests that required no modification).
- As discussed in https://llvm.discourse.group/t/de-privileging-moduleop-in-translation-apis/3733
Details
Details
- Reviewers
antiagainst ftynse rriddle
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
mlir/include/mlir/Translation.h | ||
---|---|---|
80 | It would be nice if users could pass in a translate function that took Op Foo, and have it automatically do the type checking. | |
mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp | ||
29 | nit: Drop trivial braces. | |
mlir/lib/Target/SPIRV/TranslateRegistration.cpp | ||
131–132 | Can you add a constructor for OwningOpRef<Operation *> that allows for taking in OwningOpRef<Foo> &&? (You should be able to write it just using std::is_convertible<OpTy, Foo>). That would remove all of these weird conversion dances. |
It would be nice if users could pass in a translate function that took Op Foo, and have it automatically do the type checking.