From 794aaa79e2104a158b59e9aab8f8dbe8b47cde2e Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 23 Sep 2010 06:55:34 +0000 Subject: Disable codegen prepare critical edge splitting. Machine instruction passes now break critical edges on demand. llvm-svn: 114633 --- llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp') diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index 3221e143476..880a4e5eb89 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -31,6 +31,7 @@ #include "llvm/Transforms/Utils/BuildLibCalls.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallSet.h" +#include "llvm/ADT/Statistic.h" #include "llvm/Assembly/Writer.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/CommandLine.h" @@ -42,10 +43,12 @@ using namespace llvm; using namespace llvm::PatternMatch; +STATISTIC(NumElim, "Number of blocks eliminated"); + static cl::opt CriticalEdgeSplit("cgp-critical-edge-splitting", cl::desc("Split critical edges during codegen prepare"), - cl::init(true), cl::Hidden); + cl::init(false), cl::Hidden); namespace { class CodeGenPrepare : public FunctionPass { @@ -302,6 +305,7 @@ void CodeGenPrepare::EliminateMostlyEmptyBlock(BasicBlock *BB) { PFI->removeEdge(ProfileInfo::getEdge(BB, DestBB)); } BB->eraseFromParent(); + ++NumElim; DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n"); } -- cgit v1.2.3