Issue 60960
Summary mlir::Inliner textual representation doesn't canonicalize
Labels new issue
Assignees
Reporter changm
    The [mlir::createInlinerPass()](https://github.com/llvm/llvm-project/blob/main/mlir/lib/Transforms/Inliner.cpp#L824) by default creates a pipline that always runs [canonicalization](https://source.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/lib/Transforms/Inliner.cpp;l=39?q=inliner.cpp). When this pass is dumped to text for MLIR reproduction, it is output as such:

`inline{default-pipeline= max-iterations=4 }`

When the pass is recreated with [MLIROptMain](https://github.com/llvm/llvm-project/blob/main/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp), the Canonicalizer is not run, so there's a slight difference in how the pass works when created with dumped pipelines versus what happens when the pipeline is created programatically.

Example program is attached:
[inliner.txt](https://github.com/llvm/llvm-project/files/10818693/inliner.txt)

This seems to be happening because the [defaultPipeline](https://source.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/mlir/lib/Transforms/Inliner.cpp;l=810?q=inliner.cpp) gets erased when the flag `default-pipeline` exists, but the `default-pipeline` doesn't dump `canonicalize`, but I could be way off :). Thanks!

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to