[llvm] r368124 - [MachineCSE][NFC] Use 'profitable' rather than 'beneficial' to name method.
Kai Luo via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 22:40:21 PDT 2019
Author: lkail
Date: Tue Aug 6 22:40:21 2019
New Revision: 368124
URL: http://llvm.org/viewvc/llvm-project?rev=368124&view=rev
Log:
[MachineCSE][NFC] Use 'profitable' rather than 'beneficial' to name method.
Modified:
llvm/trunk/lib/CodeGen/MachineCSE.cpp
Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=368124&r1=368123&r2=368124&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Tue Aug 6 22:40:21 2019
@@ -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(Machine
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(Machin
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");
More information about the llvm-commits
mailing list