mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-23 11:49:50 +00:00
LiveRegUnits: Rename accumulateBackward()->accumulate()
Contrary to the stepForward()/stepBackward() method accumulate() doesn't have a direction as defs, uses and clobbers all have the same effect. Also improve the documentation comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307351 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a81793582b
commit
a819fad865
@ -95,10 +95,10 @@ public:
|
||||
/// Updates liveness when stepping backwards over the instruction \p MI.
|
||||
void stepBackward(const MachineInstr &MI);
|
||||
|
||||
/// Mark all register units live during instruction \p MI.
|
||||
/// This can be used to accumulate live/unoccupied registers over a range of
|
||||
/// instructions.
|
||||
void accumulateBackward(const MachineInstr &MI);
|
||||
/// Adds all register units used, defined or clobbered in \p MI.
|
||||
/// This is useful when walking over a range of instruction to find registers
|
||||
/// unused over the whole range.
|
||||
void accumulate(const MachineInstr &MI);
|
||||
|
||||
/// Adds registers living out of block \p MBB.
|
||||
/// Live out registers are the union of the live-in registers of the successor
|
||||
|
@ -67,7 +67,7 @@ void LiveRegUnits::stepBackward(const MachineInstr &MI) {
|
||||
}
|
||||
}
|
||||
|
||||
void LiveRegUnits::accumulateBackward(const MachineInstr &MI) {
|
||||
void LiveRegUnits::accumulate(const MachineInstr &MI) {
|
||||
// Add defs, uses and regmask clobbers to the set.
|
||||
for (ConstMIBundleOperands O(MI); O.isValid(); ++O) {
|
||||
if (O->isReg()) {
|
||||
|
@ -388,7 +388,7 @@ findSurvivorBackwards(const MachineRegisterInfo &MRI,
|
||||
for (MachineBasicBlock::iterator I = From;; --I) {
|
||||
const MachineInstr &MI = *I;
|
||||
|
||||
Used.accumulateBackward(MI);
|
||||
Used.accumulate(MI);
|
||||
|
||||
if (I == To) {
|
||||
// See if one of the registers in RC wasn't used so far.
|
||||
|
@ -509,7 +509,7 @@ int AArch64A57FPLoadBalancing::scavengeRegister(Chain *G, Color C,
|
||||
assert(ChainBegin != ChainEnd && "Chain should contain instructions");
|
||||
do {
|
||||
--I;
|
||||
Units.accumulateBackward(*I);
|
||||
Units.accumulate(*I);
|
||||
} while (I != ChainBegin);
|
||||
|
||||
// Make sure we allocate in-order, to get the cheapest registers first.
|
||||
|
Loading…
Reference in New Issue
Block a user