Skip to content

Commit

Permalink
[MachineCSE][NFC] Use 'profitable' rather than 'beneficial' to name m…
Browse files Browse the repository at this point in the history
…ethod.

llvm-svn: 368124
  • Loading branch information
bzEq committed Aug 7, 2019
1 parent 29688f4 commit 02b8056
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions llvm/lib/CodeGen/MachineCSE.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 02b8056

Please sign in to comment.