diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-03 19:18:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-03 19:18:57 +0000 |
commit | e70cab0ca4d7835c8e1e0ee6a125be8f2790a136 (patch) | |
tree | 19013e8fede6c41a54f9a695eb82e14630d7b425 /include/llvm/CodeGen/MachineFunction.h | |
parent | f938099aa1b38b23ae3eef30d193ab5c6778895c (diff) |
Provide a function that ensures MBB numbering is dense and inorder. This
can be used by MachineFunctionPasses who need this property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index b06dd63922..f264c91c11 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -224,8 +224,16 @@ public: } /// 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. /// |