summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-09-30 20:51:52 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-09-30 20:51:52 +0000
commiteb12f49fb7e3be3d49629b21dd712605175b0db7 (patch)
treef5e378fd166ac85bf19a1a3ce3fdc6051a1ceeff /llvm/lib/Transforms
parent78f8d4eaf04dec1e5e5f21ce37ada4ee52ad2bc1 (diff)
downloadbcm5719-llvm-eb12f49fb7e3be3d49629b21dd712605175b0db7.tar.gz
bcm5719-llvm-eb12f49fb7e3be3d49629b21dd712605175b0db7.zip
Try again to disable critical edge splitting in CodeGenPrepare.
The bug that broke i386 linux has been fixed in r115191. llvm-svn: 115204
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp6
1 files changed, 5 insertions, 1 deletions
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<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");
}
OpenPOWER on IntegriCloud