Skip to content

Commit 852d84e

Browse files
committed
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.
1 parent 451b1b1 commit 852d84e

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

mlir/lib/Transforms/Inliner.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -639,17 +639,10 @@ class InlinerPass : public impl::InlinerBase<InlinerPass> {
639639
} // namespace
640640

641641
InlinerPass::InlinerPass() : InlinerPass(defaultInlinerOptPipeline) {}
642-
InlinerPass::InlinerPass(std::function<void(OpPassManager &)> defaultPipeline)
643-
: defaultPipeline(std::move(defaultPipeline)) {
642+
InlinerPass::InlinerPass(
643+
std::function<void(OpPassManager &)> defaultPipelineArg)
644+
: defaultPipeline(std::move(defaultPipelineArg)) {
644645
opPipelines.push_back({});
645-
646-
// Initialize the pass options with the provided arguments.
647-
if (defaultPipeline) {
648-
OpPassManager fakePM("__mlir_fake_pm_op");
649-
defaultPipeline(fakePM);
650-
llvm::raw_string_ostream strStream(defaultPipelineStr);
651-
fakePM.printAsTextualPipeline(strStream);
652-
}
653646
}
654647

655648
InlinerPass::InlinerPass(std::function<void(OpPassManager &)> defaultPipeline,

0 commit comments

Comments
 (0)