[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineBasicBlock.h
    Alkis Evlogimenos 
    alkis at niobe.cs.uiuc.edu
       
    Mon Feb 23 12:15:07 PST 2004
    
    
  
Changes in directory llvm/include/llvm/CodeGen:
MachineBasicBlock.h updated: 1.21 -> 1.22
---
Log message:
Refactor rewinding code for finding the first terminator of a basic
block into MachineBasicBlock::getFirstTerminator().
This also fixes a bug in the implementation of the above in both
RegAllocLocal and InstrSched, where instructions where added after the
terminator if the basic block's only instruction was a terminator (it
shouldn't matter for RegAllocLocal since this case never occurs in
practice).
---
Diffs of the changes:  (+5 -0)
Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h
diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.21 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.22
--- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.21	Thu Feb 19 10:13:54 2004
+++ llvm/include/llvm/CodeGen/MachineBasicBlock.h	Mon Feb 23 12:14:48 2004
@@ -95,6 +95,11 @@
   reverse_iterator       rend  ()       { return Insts.rend();   }
   const_reverse_iterator rend  () const { return Insts.rend();   }
 
+  /// getFirstTerminator - returns an iterator to the first terminator
+  /// instruction of this basic block. If a terminator does not exist,
+  /// it returns end()
+  iterator getFirstTerminator();
+
   void push_back(MachineInstr *MI) { Insts.push_back(MI); }
   template<typename IT>
   void insert(iterator I, IT S, IT E) { Insts.insert(I, S, E); }
    
    
More information about the llvm-commits
mailing list