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

Chris Lattner sabre at nondot.org
Tue Oct 3 12:19:14 PDT 2006



Changes in directory llvm/include/llvm/CodeGen:

MachineFunction.h updated: 1.61 -> 1.62
---
Log message:

Provide a function that ensures MBB numbering is dense and inorder.  This 
can be used by MachineFunctionPasses who need this property.


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

 MachineFunction.h |    8 ++++++++
 1 files changed, 8 insertions(+)


Index: llvm/include/llvm/CodeGen/MachineFunction.h
diff -u llvm/include/llvm/CodeGen/MachineFunction.h:1.61 llvm/include/llvm/CodeGen/MachineFunction.h:1.62
--- llvm/include/llvm/CodeGen/MachineFunction.h:1.61	Thu Sep 14 01:40:48 2006
+++ llvm/include/llvm/CodeGen/MachineFunction.h	Tue Oct  3 14:18:57 2006
@@ -224,8 +224,16 @@
   }
 
   /// getNumBlockIDs - Return the number of MBB ID's allocated.
+  ///
   unsigned getNumBlockIDs() const { return MBBNumbering.size(); }
   
+  /// RenumberBlocks - This discards all of the MachineBasicBlock numbers and
+  /// recomputes them.  This guarantees that the MBB numbers are sequential,
+  /// dense, and match the ordering of the blocks within the function.  If a
+  /// specific MachineBasicBlock is specified, only that block and those after
+  /// it are renumbered.
+  void RenumberBlocks(MachineBasicBlock *MBBFrom = 0);
+  
   /// print - Print out the MachineFunction in a format suitable for debugging
   /// to the specified stream.
   ///






More information about the llvm-commits mailing list