This patch moves the 'printOp' functionality to the public API of
AsmPrinter. No 'parseOp' seems to be needed at this time as existing
APIs are able to parse operations producing results where results are
omitted in the textual form (the LHS of an operation is redundant
when it comes to building the operation itself as it only contains
the result names).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/IR/AsmPrinter.cpp | ||
---|---|---|
2674 | We have too many similar print methods for Operation *. We should rename them but I prefer to get your feedback first. |
Can you add a test in the TestDialect?
mlir/lib/IR/AsmPrinter.cpp | ||
---|---|---|
2674 | Yeah, it'd be nice to rename them to be explicit about how they are printing. The current ones are really hard to reason about. |
mlir/lib/IR/AsmPrinter.cpp | ||
---|---|---|
2665 | I guess it refers to the location context but we only have indentation and location for now. I'll remove the etc. part. | |
2666 | I kept print because I saw another print method for blocks but I now see it's the only one? I can rename it to printFullOpWithIndent or printFullOpWithIndentAndLoc but I'm not sure if this will scale well if we add more information to be printed. Perhaps something like printFullOpInContext or something like that? |
mlir/lib/IR/AsmPrinter.cpp | ||
---|---|---|
2666 | I don't have any more comments. Please feel free to go with what you think is better. |
What exactly is "etc." here?