aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-03-11 19:30:30 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-03-11 19:30:30 +0000
commit950d3db5f478a84242a90cafce0d8dfc4f8b1152 (patch)
tree88826e3fe1fc3cb62f89d113c8722abf9479bc95 /lib/Transforms/Scalar/CodeGenPrepare.cpp
parent4839ded3bdf83a47c581b818e295669533cc9a9b (diff)
Revert r127459, "Optimize trivial branches in CodeGenPrepare, which often get
created from the", it broke some GCC test suite tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r--lib/Transforms/Scalar/CodeGenPrepare.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp
index f0babcccee..887fa9f004 100644
--- a/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/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;
}