mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01: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. llvm-svn: 307351
This commit is contained in:
parent
94e6e7207c
commit
3df3235c8d
@ -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