[llvm-commits] CVS: llvm/include/llvm/CodeGen/RegisterScavenging.h
Dale Johannesen
dalej at apple.com
Mon Mar 26 15:24:14 PDT 2007
Changes in directory llvm/include/llvm/CodeGen:
RegisterScavenging.h updated: 1.11 -> 1.12
---
Log message:
Fix reversed logic in getRegsUsed. Rename RegStates to RegsAvailable to
hopefully forestall similar errors.
---
Diffs of the changes: (+8 -8)
RegisterScavenging.h | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
Index: llvm/include/llvm/CodeGen/RegisterScavenging.h
diff -u llvm/include/llvm/CodeGen/RegisterScavenging.h:1.11 llvm/include/llvm/CodeGen/RegisterScavenging.h:1.12
--- llvm/include/llvm/CodeGen/RegisterScavenging.h:1.11 Tue Mar 20 16:35:06 2007
+++ llvm/include/llvm/CodeGen/RegisterScavenging.h Mon Mar 26 17:23:54 2007
@@ -47,10 +47,10 @@
///
const TargetRegisterClass *ScavengedRC;
- /// RegStates - The current state of all the physical registers immediately
+ /// RegsAvailable - The current state of all the physical registers immediately
/// before MBBI. One bit per physical register. If bit is set that means it's
/// available, unset means the register is currently being used.
- BitVector RegStates;
+ BitVector RegsAvailable;
public:
RegScavenger()
@@ -88,18 +88,18 @@
/// isUsed / isUsed - Test if a register is currently being used.
///
- bool isUsed(unsigned Reg) const { return !RegStates[Reg]; }
- bool isUnused(unsigned Reg) const { return RegStates[Reg]; }
+ bool isUsed(unsigned Reg) const { return !RegsAvailable[Reg]; }
+ bool isUnused(unsigned Reg) const { return RegsAvailable[Reg]; }
/// getRegsUsed - return all registers currently in use in used.
void getRegsUsed(BitVector &used, bool includeReserved);
/// setUsed / setUnused - Mark the state of one or a number of registers.
///
- void setUsed(unsigned Reg) { RegStates.reset(Reg); }
- void setUsed(BitVector Regs) { RegStates &= ~Regs; }
- void setUnused(unsigned Reg) { RegStates.set(Reg); }
- void setUnused(BitVector Regs) { RegStates |= Regs; }
+ void setUsed(unsigned Reg) { RegsAvailable.reset(Reg); }
+ void setUsed(BitVector Regs) { RegsAvailable &= ~Regs; }
+ void setUnused(unsigned Reg) { RegsAvailable.set(Reg); }
+ void setUnused(BitVector Regs) { RegsAvailable |= Regs; }
/// FindUnusedReg - Find a unused register of the specified register class
/// from the specified set of registers. It return 0 is none is found.
More information about the llvm-commits
mailing list