aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineBasicBlock.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-01-15 22:01:38 +0000
committerDan Gohman <gohman@apple.com>2009-01-15 22:01:38 +0000
commitc475c3608a5f0fc0c6bd43da04ae786649690070 (patch)
tree63040b524f899751f97f06b8bbf6f451e2b7c5c0 /include/llvm/CodeGen/MachineBasicBlock.h
parent19caec79f29936d1828c15bf3416f4741b72d768 (diff)
Simplify the MachineLICM pass by having it only traverse outer
loops, hoisting instructions all the way out in one step rather than hoisting them one nest level at a time. Also, make a few other code simplifications. This speeds up MachineLICM by several fold. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineBasicBlock.h')
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index 46a82884ef..54ac47008f 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -263,6 +263,12 @@ public:
MachineInstr *remove(MachineInstr *I) { return Insts.remove(I); }
void clear() { Insts.clear(); }
+ /// splice - Take an instruction from MBB 'Other' at the position From,
+ /// and insert it into this MBB right before 'where'.
+ void splice(iterator where, MachineBasicBlock *Other, iterator From) {
+ Insts.splice(where, Other->Insts, From);
+ }
+
/// splice - Take a block of instructions from MBB 'Other' in the range [From,
/// To), and insert them into this MBB right before 'where'.
void splice(iterator where, MachineBasicBlock *Other, iterator From,