[PATCH] D22124: [PM] Port UnreachableBlockElim to the new Pass Manager
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 7 17:18:16 PDT 2016
davide accepted this revision.
davide added a comment.
This revision is now accepted and ready to land.
LGTM with nits.
================
Comment at: lib/CodeGen/UnreachableBlockElim.cpp:44
@@ -49,1 +43,3 @@
+class UnreachableBlockElimLegacyPass : public FunctionPass {
+ bool runOnFunction(Function &F) override;
----------------
The body of `runOnFunction()` can probably be inlined here.
================
Comment at: lib/CodeGen/UnreachableBlockElim.cpp:102
@@ +101,3 @@
+PreservedAnalyses UnreachableBlockElimPass::run(Function &F,
+ FunctionAnalysisManager &AM) {
+ bool Changed = eliminateUnreachableBlock(F);
----------------
AnalysisManager<Function>
================
Comment at: lib/CodeGen/UnreachableBlockElim.cpp:102
@@ +101,3 @@
+PreservedAnalyses UnreachableBlockElimPass::run(Function &F,
+ FunctionAnalysisManager &AM) {
+ bool Changed = eliminateUnreachableBlock(F);
----------------
davide wrote:
> AnalysisManager<Function>
Maybe AnalysisManager<Function> ?
================
Comment at: test/CodeGen/X86/unreachableblockelim.ll:1
@@ +1,2 @@
+; RUN: opt -S < %s -unreachableblockelim | FileCheck %s
+; RUN: opt -S < %s -passes=unreachableblockelim | FileCheck %s
----------------
So this pass wasn't tested before?
Repository:
rL LLVM
http://reviews.llvm.org/D22124
More information about the llvm-commits
mailing list