summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineSink.cpp
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2016-10-18 23:11:20 +0000
committerDehao Chen <dehao@google.com>2016-10-18 23:11:20 +0000
commit62d0e64e9e6b2b630d21f6fb9e6d6dd2183770ea (patch)
tree1f39ce794278413cbe09d9f72b31a85c0896a216 /llvm/lib/CodeGen/MachineSink.cpp
parent6b87504973d34b87c3af454145a793cfd30861dc (diff)
downloadbcm5719-llvm-62d0e64e9e6b2b630d21f6fb9e6d6dd2183770ea.tar.gz
bcm5719-llvm-62d0e64e9e6b2b630d21f6fb9e6d6dd2183770ea.zip
revert r284541.
llvm-svn: 284544
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineSink.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp
index 690ecc6baf2..d2650dbb9af 100644
--- a/llvm/lib/CodeGen/MachineSink.cpp
+++ b/llvm/lib/CodeGen/MachineSink.cpp
@@ -24,7 +24,6 @@
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
-#include "llvm/CodeGen/MachineBranchProbabilityInfo.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
@@ -61,15 +60,6 @@ UseBlockFreqInfo("machine-sink-bfi",
cl::desc("Use block frequency info to find successors to sink"),
cl::init(true), cl::Hidden);
-static cl::opt<unsigned> SplitEdgeProbabilityThreshold(
- "machine-sink-split-probability-threshold",
- cl::desc(
- "Percentage threshold for splitting single-instruction critical edge. "
- "If the branch threshold is higher than this threshold, we allow "
- "speculative execution of up to 1 instruction to avoid branching to "
- "splitted critical edge"),
- cl::init(40), cl::Hidden);
-
STATISTIC(NumSunk, "Number of machine instructions sunk");
STATISTIC(NumSplit, "Number of critical edges split");
STATISTIC(NumCoalesces, "Number of copies coalesced");
@@ -84,7 +74,6 @@ namespace {
MachinePostDominatorTree *PDT; // Machine post dominator tree
MachineLoopInfo *LI;
const MachineBlockFrequencyInfo *MBFI;
- const MachineBranchProbabilityInfo *MBPI;
AliasAnalysis *AA;
// Remember which edges have been considered for breaking.
@@ -116,7 +105,6 @@ namespace {
AU.addRequired<MachineDominatorTree>();
AU.addRequired<MachinePostDominatorTree>();
AU.addRequired<MachineLoopInfo>();
- AU.addRequired<MachineBranchProbabilityInfo>();
AU.addPreserved<MachineDominatorTree>();
AU.addPreserved<MachinePostDominatorTree>();
AU.addPreserved<MachineLoopInfo>();
@@ -295,7 +283,6 @@ bool MachineSinking::runOnMachineFunction(MachineFunction &MF) {
PDT = &getAnalysis<MachinePostDominatorTree>();
LI = &getAnalysis<MachineLoopInfo>();
MBFI = UseBlockFreqInfo ? &getAnalysis<MachineBlockFrequencyInfo>() : nullptr;
- MBPI = &getAnalysis<MachineBranchProbabilityInfo>();
AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
bool EverMadeChange = false;
@@ -396,10 +383,6 @@ bool MachineSinking::isWorthBreakingCriticalEdge(MachineInstr &MI,
if (!MI.isCopy() && !TII->isAsCheapAsAMove(MI))
return true;
- if (MBPI->getEdgeProbability(From, To) <=
- BranchProbability(SplitEdgeProbabilityThreshold, 100))
- return true;
-
// MI is cheap, we probably don't want to break the critical edge for it.
// However, if this would allow some definitions of its source operands
// to be sunk then it's probably worth it.
OpenPOWER on IntegriCloud