summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-05-12 21:35:21 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-05-12 21:35:21 +0000
commit379e609e3d2b3b859715f29cb4317c1ec4964267 (patch)
treea6fc6e0424d44740426e965b59b67008e02e102e
parent00db6be8794e9d1c37e0419f4667347d3829b8ed (diff)
downloadbcm5719-llvm-379e609e3d2b3b859715f29cb4317c1ec4964267.tar.gz
bcm5719-llvm-379e609e3d2b3b859715f29cb4317c1ec4964267.zip
Add a NextMBBNumber field w/ incrementing accessor method, for
function-level unique numbering of MBBs. llvm-svn: 13513
-rw-r--r--llvm/include/llvm/CodeGen/MachineFunction.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h
index 2c443967ee0..cb9958bb1f4 100644
--- a/llvm/include/llvm/CodeGen/MachineFunction.h
+++ b/llvm/include/llvm/CodeGen/MachineFunction.h
@@ -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.
OpenPOWER on IntegriCloud