Add a NextMBBNumber field w/ incrementing accessor method, for
authorBrian Gaeke <gaeke@uiuc.edu>
Wed, 12 May 2004 21:35:21 +0000 (21:35 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Wed, 12 May 2004 21:35:21 +0000 (21:35 +0000)
function-level unique numbering of MBBs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13513 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineFunction.h

index 2c443967ee07eca8a612df124fbed6d64f89179a..cb9958bb1f45e5071513f2e3855cc59f2fdec784 100644 (file)
@@ -49,6 +49,9 @@ class MachineFunction : private Annotation {
   // Keep track of constants which are spilled to memory
   MachineConstantPool *ConstantPool;
 
+  // Function-level unique numbering for MachineBasicBlocks
+  int NextMBBNumber;
+
 public:
   MachineFunction(const Function *Fn, const TargetMachine &TM);
   ~MachineFunction();
@@ -82,6 +85,10 @@ public:
   ///
   MachineFunctionInfo *getInfo() const { return MFInfo; }
 
+  /// getNextMBBNumber - Returns the next unique number to be assigned
+  /// to a MachineBasicBlock in this MachineFunction.
+  ///
+  int getNextMBBNumber() { return NextMBBNumber++; }
 
   /// print - Print out the MachineFunction in a format suitable for debugging
   /// to the specified stream.