diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-09-23 06:55:34 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-09-23 06:55:34 +0000 |
| commit | fa1b938bff8c7ce106f4032ac12662e7e1cfd7e9 (patch) | |
| tree | 1e4f45201128bd530872c474dc800e6f8f8a04e5 /lib/Transforms | |
| parent | d64d18815e1b650b7f547fd9da766c151f3bd6ef (diff) | |
| download | external_llvm-fa1b938bff8c7ce106f4032ac12662e7e1cfd7e9.zip external_llvm-fa1b938bff8c7ce106f4032ac12662e7e1cfd7e9.tar.gz external_llvm-fa1b938bff8c7ce106f4032ac12662e7e1cfd7e9.tar.bz2 | |
Disable codegen prepare critical edge splitting. Machine instruction passes now
break critical edges on demand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114633 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
| -rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 3221e14..880a4e5 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/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<bool> 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"); } |
