From: Kai Luo Date: Wed, 7 Aug 2019 05:40:21 +0000 (+0000) Subject: [MachineCSE][NFC] Use 'profitable' rather than 'beneficial' to name method. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=193998e8d8153d248e819674e5f598b9c845ed21;p=llvm [MachineCSE][NFC] Use 'profitable' rather than 'beneficial' to name method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368124 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineCSE.cpp b/lib/CodeGen/MachineCSE.cpp index bb844ced456..8f5778a51ac 100644 --- a/lib/CodeGen/MachineCSE.cpp +++ b/lib/CodeGen/MachineCSE.cpp @@ -137,11 +137,11 @@ namespace { bool isPRECandidate(MachineInstr *MI); bool ProcessBlockPRE(MachineDominatorTree *MDT, MachineBasicBlock *MBB); bool PerformSimplePRE(MachineDominatorTree *DT); - /// Heuristics to see if it's beneficial to move common computations of MBB + /// Heuristics to see if it's profitable to move common computations of MBB /// and MBB1 to CandidateBB. - bool isBeneficalToHoistInto(MachineBasicBlock *CandidateBB, - MachineBasicBlock *MBB, - MachineBasicBlock *MBB1); + bool isProfitableToHoistInto(MachineBasicBlock *CandidateBB, + MachineBasicBlock *MBB, + MachineBasicBlock *MBB1); }; } // end anonymous namespace @@ -809,7 +809,7 @@ bool MachineCSE::ProcessBlockPRE(MachineDominatorTree *DT, if (!CMBB->isLegalToHoistInto()) continue; - if (!isBeneficalToHoistInto(CMBB, MBB, MBB1)) + if (!isProfitableToHoistInto(CMBB, MBB, MBB1)) continue; // Two instrs are partial redundant if their basic blocks are reachable @@ -864,9 +864,9 @@ bool MachineCSE::PerformSimplePRE(MachineDominatorTree *DT) { return Changed; } -bool MachineCSE::isBeneficalToHoistInto(MachineBasicBlock *CandidateBB, - MachineBasicBlock *MBB, - MachineBasicBlock *MBB1) { +bool MachineCSE::isProfitableToHoistInto(MachineBasicBlock *CandidateBB, + MachineBasicBlock *MBB, + MachineBasicBlock *MBB1) { if (CandidateBB->getParent()->getFunction().hasMinSize()) return true; assert(DT->dominates(CandidateBB, MBB) && "CandidateBB should dominate MBB");