- Adds a new MlirOpPrintingFlags type and supporting accessors.
- Changes the signature of mlirOperationPrint. I believe that we are still experimental enough that making such a breaking change is the best thing to do.
- Adds a full featured python Operation.print method with all options and the ability to print directly to files/stdout in text or binary.
- Adds an Operation.get_asm which delegates to print and returns a str or bytes.
- Reworks Operation.str to be based on get_asm.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/IR/OperationSupport.h | ||
---|---|---|
567 | Thanks for fixing this! |
mlir/include/mlir-c/IR.h | ||
---|---|---|
259 | intptr_t for size-like argument? | |
268 | I was going to ask if we want a bool argument that enables/disables this, but then found that C++ doesn't have such a flag either. Not sure if we want to add one. | |
336 | How about having mlirOperationPrint that always uses the default flags and mlirOperationPrintWithOptions that additionally takes options. This would remove the need for mlirOpPrintingFlagsGetDefault that relies on implicit conversions from NULL to llvm::None to OpPrintingFlags, which is a bit too much for my taste. | |
mlir/lib/Bindings/Python/IRModules.cpp | ||
74 | What's the default behavior / which value disables the limit? | |
2085 | Nit: with get_asm method |
intptr_t for size-like argument?