diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-05-12 21:35:21 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-05-12 21:35:21 +0000 |
commit | f460f1679e8ac1935220e1878fd97cf44f093659 (patch) | |
tree | 2a4cd37369631208daacfeaab63026e80b924a85 /include/llvm/CodeGen/MachineFunction.h | |
parent | c07d8d8a26f63dfc54dbd0e1ff776763ec6443ad (diff) |
Add a NextMBBNumber field w/ incrementing accessor method, for
function-level unique numbering of MBBs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13513 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 2c443967ee..cb9958bb1f 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/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. |