diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-03-11 19:30:30 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-03-11 19:30:30 +0000 |
commit | 94ccb27b43552fbc5459e0572dc73a505eca88bf (patch) | |
tree | 4d06fbfec389f9d3840c122f83a3be0a3f6ccfbd /llvm/lib | |
parent | c77f85b4b0fed17f3c46357b3d4a833e2a54ee1e (diff) | |
download | bcm5719-llvm-94ccb27b43552fbc5459e0572dc73a505eca88bf.tar.gz bcm5719-llvm-94ccb27b43552fbc5459e0572dc73a505eca88bf.zip |
Revert r127459, "Optimize trivial branches in CodeGenPrepare, which often get
created from the", it broke some GCC test suite tests.
llvm-svn: 127477
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index f0babcccee0..887fa9f004b 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -58,10 +58,6 @@ STATISTIC(NumMemoryInsts, "Number of memory instructions whose address " STATISTIC(NumExtsMoved, "Number of [s|z]ext instructions combined with loads"); STATISTIC(NumExtUses, "Number of uses of [s|z]ext instructions optimized"); -static cl::opt<bool> DisableBranchOpts( - "disable-cgp-branch-opts", cl::Hidden, cl::init(false), - cl::desc("Disable branch optimizations in CodeGenPrepare")); - namespace { class CodeGenPrepare : public FunctionPass { /// TLI - Keep a pointer of a TargetLowering to consult for determining @@ -134,16 +130,6 @@ bool CodeGenPrepare::runOnFunction(Function &F) { SunkAddrs.clear(); - if (!DisableBranchOpts) { - MadeChange = false; - for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) - MadeChange |= ConstantFoldTerminator(BB); - - if (MadeChange && DT) - DT->DT->recalculate(F); - EverMadeChange |= MadeChange; - } - return EverMadeChange; } |