From 852d84e36ed7a3db0ff4719f44a12b6bc09d35f3 Mon Sep 17 00:00:00 2001 From: Tres Popp Date: Fri, 21 Oct 2022 13:08:51 +0200 Subject: [PATCH] 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. --- mlir/lib/Transforms/Inliner.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/mlir/lib/Transforms/Inliner.cpp b/mlir/lib/Transforms/Inliner.cpp index 1e6f211..83e8530 100644 --- a/mlir/lib/Transforms/Inliner.cpp +++ b/mlir/lib/Transforms/Inliner.cpp @@ -639,17 +639,10 @@ private: } // namespace InlinerPass::InlinerPass() : InlinerPass(defaultInlinerOptPipeline) {} -InlinerPass::InlinerPass(std::function defaultPipeline) - : defaultPipeline(std::move(defaultPipeline)) { +InlinerPass::InlinerPass( + std::function 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 defaultPipeline, -- 2.7.4