[Mlir-commits] [mlir] 852d84e - Delete dead code in Inliner

Tres Popp llvmlistbot at llvm.org
Fri Oct 21 04:12:08 PDT 2022


Author: Tres Popp
Date: 2022-10-21T13:11:58+02:00
New Revision: 852d84e36ed7a3db0ff4719f44a12b6bc09d35f3

URL: https://github.com/llvm/llvm-project/commit/852d84e36ed7a3db0ff4719f44a12b6bc09d35f3
DIFF: https://github.com/llvm/llvm-project/commit/852d84e36ed7a3db0ff4719f44a12b6bc09d35f3.diff

LOG: Delete dead code in Inliner

This code, on all platforms was a use-after-move violation that resulted
in the if-statement always returning false. As several core tests specifically
tested that this code did not execute, we assume that is the intent and
match behavior to existing behavior without relying on use-after-move
results.

Added: 
    

Modified: 
    mlir/lib/Transforms/Inliner.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Transforms/Inliner.cpp b/mlir/lib/Transforms/Inliner.cpp
index 1e6f211fe296a..83e85306adaee 100644
--- a/mlir/lib/Transforms/Inliner.cpp
+++ b/mlir/lib/Transforms/Inliner.cpp
@@ -639,17 +639,10 @@ class InlinerPass : public impl::InlinerBase<InlinerPass> {
 } // namespace
 
 InlinerPass::InlinerPass() : InlinerPass(defaultInlinerOptPipeline) {}
-InlinerPass::InlinerPass(std::function<void(OpPassManager &)> defaultPipeline)
-    : defaultPipeline(std::move(defaultPipeline)) {
+InlinerPass::InlinerPass(
+    std::function<void(OpPassManager &)> defaultPipelineArg)
+    : defaultPipeline(std::move(defaultPipelineArg)) {
   opPipelines.push_back({});
-
-  // Initialize the pass options with the provided arguments.
-  if (defaultPipeline) {
-    OpPassManager fakePM("__mlir_fake_pm_op");
-    defaultPipeline(fakePM);
-    llvm::raw_string_ostream strStream(defaultPipelineStr);
-    fakePM.printAsTextualPipeline(strStream);
-  }
 }
 
 InlinerPass::InlinerPass(std::function<void(OpPassManager &)> defaultPipeline,


        


More information about the Mlir-commits mailing list