diff options
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index a38c4f3..eb4e076 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -129,7 +129,7 @@ bool BranchFolderPass::runOnMachineFunction(MachineFunction &MF) { // HW that requires structurized CFG. bool EnableTailMerge = !MF.getTarget().requiresStructuredCFG() && PassConfig->getEnableTailMerge(); - BranchFolder::MBFIWrapper MBBFreqInfo( + MBFIWrapper MBBFreqInfo( getAnalysis<MachineBlockFrequencyInfo>()); BranchFolder Folder(EnableTailMerge, /*CommonHoist=*/true, MBBFreqInfo, getAnalysis<MachineBranchProbabilityInfo>(), @@ -501,42 +501,6 @@ BranchFolder::MergePotentialsElt::operator<(const MergePotentialsElt &o) const { #endif } -BlockFrequency -BranchFolder::MBFIWrapper::getBlockFreq(const MachineBasicBlock *MBB) const { - auto I = MergedBBFreq.find(MBB); - - if (I != MergedBBFreq.end()) - return I->second; - - return MBFI.getBlockFreq(MBB); -} - -void BranchFolder::MBFIWrapper::setBlockFreq(const MachineBasicBlock *MBB, - BlockFrequency F) { - MergedBBFreq[MBB] = F; -} - -raw_ostream & -BranchFolder::MBFIWrapper::printBlockFreq(raw_ostream &OS, - const MachineBasicBlock *MBB) const { - return MBFI.printBlockFreq(OS, getBlockFreq(MBB)); -} - -raw_ostream & -BranchFolder::MBFIWrapper::printBlockFreq(raw_ostream &OS, - const BlockFrequency Freq) const { - return MBFI.printBlockFreq(OS, Freq); -} - -void BranchFolder::MBFIWrapper::view(const Twine &Name, bool isSimple) { - MBFI.view(Name, isSimple); -} - -uint64_t -BranchFolder::MBFIWrapper::getEntryFreq() const { - return MBFI.getEntryFreq(); -} - /// CountTerminators - Count the number of terminators in the given /// block and set I to the position of the first non-terminator, if there /// is one, or MBB->end() otherwise. @@ -591,7 +555,7 @@ ProfitableToMerge(MachineBasicBlock *MBB1, MachineBasicBlock *MBB2, MachineBasicBlock *PredBB, DenseMap<const MachineBasicBlock *, int> &EHScopeMembership, bool AfterPlacement, - BranchFolder::MBFIWrapper &MBBFreqInfo, + MBFIWrapper &MBBFreqInfo, ProfileSummaryInfo *PSI) { // It is never profitable to tail-merge blocks from two different EH scopes. if (!EHScopeMembership.empty()) { |