[llvm-commits] CVS: llvm/lib/CodeGen/MachineBasicBlock.cpp

Evan Cheng evan.cheng at apple.com
Sat Feb 17 03:11:07 PST 2007



Changes in directory llvm/lib/CodeGen:

MachineBasicBlock.cpp updated: 1.39 -> 1.40
---
Log message:

Added removeLiveIn.

---
Diffs of the changes:  (+7 -1)

 MachineBasicBlock.cpp |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/MachineBasicBlock.cpp
diff -u llvm/lib/CodeGen/MachineBasicBlock.cpp:1.39 llvm/lib/CodeGen/MachineBasicBlock.cpp:1.40
--- llvm/lib/CodeGen/MachineBasicBlock.cpp:1.39	Fri Feb  9 20:38:19 2007
+++ llvm/lib/CodeGen/MachineBasicBlock.cpp	Sat Feb 17 05:10:48 2007
@@ -118,7 +118,7 @@
   const MRegisterInfo *MRI = MF->getTarget().getRegisterInfo();  
   if (livein_begin() != livein_end()) {
     OS << "Live Ins:";
-    for (livein_iterator I = livein_begin(), E = livein_end(); I != E; ++I)
+    for (const_livein_iterator I = livein_begin(),E = livein_end(); I != E; ++I)
       OutputReg(OS, *I, MRI);
     OS << "\n";
   }
@@ -144,6 +144,12 @@
   }
 }
 
+void MachineBasicBlock::removeLiveIn(unsigned Reg) {
+  livein_iterator I = std::find(livein_begin(), livein_end(), Reg);
+  assert(I != livein_end() && "Not a live in!");
+  LiveIns.erase(I);
+}
+
 void MachineBasicBlock::moveBefore(MachineBasicBlock *NewAfter) {
   MachineFunction::BasicBlockListType &BBList =getParent()->getBasicBlockList();
   getParent()->getBasicBlockList().splice(NewAfter, BBList, this);






More information about the llvm-commits mailing list