[llvm-commits] CVS: llvm/include/llvm/CodeGen/RegisterScavenging.h

Evan Cheng evan.cheng at apple.com
Mon Feb 26 17:59:05 PST 2007



Changes in directory llvm/include/llvm/CodeGen:

RegisterScavenging.h updated: 1.1 -> 1.2
---
Log message:

forward() should not increment internal iterator. Its client may insert instruction between now and next forward() call.

---
Diffs of the changes:  (+6 -0)

 RegisterScavenging.h |    6 ++++++
 1 files changed, 6 insertions(+)


Index: llvm/include/llvm/CodeGen/RegisterScavenging.h
diff -u llvm/include/llvm/CodeGen/RegisterScavenging.h:1.1 llvm/include/llvm/CodeGen/RegisterScavenging.h:1.2
--- llvm/include/llvm/CodeGen/RegisterScavenging.h:1.1	Thu Feb 22 19:01:19 2007
+++ llvm/include/llvm/CodeGen/RegisterScavenging.h	Mon Feb 26 19:58:48 2007
@@ -27,6 +27,7 @@
 class RegScavenger {
   MachineBasicBlock *MBB;
   MachineBasicBlock::iterator MBBI;
+  bool MBBIInited;
   unsigned NumPhysRegs;
 
   /// RegStates - The current state of all the physical registers immediately
@@ -42,6 +43,11 @@
   void forward();
   void backward();
 
+  /// forward / backward - Move the internal MBB iterator and update register
+  /// states until it has reached but not processed the specific iterator.
+  void forward(MachineBasicBlock::iterator I);
+  void backward(MachineBasicBlock::iterator I);
+
   /// isReserved - Returns true if a register is reserved. It is never "unused".
   bool isReserved(unsigned Reg) const { return ReservedRegs[Reg]; }
 






More information about the llvm-commits mailing list