From 62d0e64e9e6b2b630d21f6fb9e6d6dd2183770ea Mon Sep 17 00:00:00 2001 From: Dehao Chen Date: Tue, 18 Oct 2016 23:11:20 +0000 Subject: revert r284541. llvm-svn: 284544 --- llvm/lib/CodeGen/MachineSink.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'llvm/lib/CodeGen/MachineSink.cpp') 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 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(); AU.addRequired(); AU.addRequired(); - AU.addRequired(); AU.addPreserved(); AU.addPreserved(); AU.addPreserved(); @@ -295,7 +283,6 @@ bool MachineSinking::runOnMachineFunction(MachineFunction &MF) { PDT = &getAnalysis(); LI = &getAnalysis(); MBFI = UseBlockFreqInfo ? &getAnalysis() : nullptr; - MBPI = &getAnalysis(); AA = &getAnalysis().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. -- cgit v1.2.3