From 34ea07692f4cd7c007f1c5062bcebb6d03131077 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 23 Oct 2006 23:35:35 +0000 Subject: [PATCH] add two helper methods git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31143 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineBasicBlock.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index 90a779b147f..85d348337a9 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -125,8 +125,16 @@ public: unsigned succ_size() const { return Successors.size(); } bool succ_empty() const { return Successors.empty(); } + // Code Layout methods. + + /// moveBefore/moveAfter - move 'this' block before or after the specified + /// block. This only moves the block, it does not modify the CFG or adjust + /// potential fall-throughs at the end of the block. + void moveBefore(MachineBasicBlock *NewAfter); + void moveAfter(MachineBasicBlock *NewBefore); + // Machine-CFG mutators - + /// addSuccessor - Add succ as a successor of this MachineBasicBlock. /// The Predecessors list of succ is automatically updated. ///