diff options
author | Cameron Zwarich <zwarich@apple.com> | 2013-02-17 00:10:44 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2013-02-17 00:10:44 +0000 |
commit | f0b2535344e8c9e2912da78010918a44c5a18cab (patch) | |
tree | 74335c2750bc468334a70f31581aee40cf255c0d /include/llvm/CodeGen | |
parent | cc54889cd58322b8766525f43cc1f7cb52e4692e (diff) |
Add support for updating the LiveIntervals of registers used by 'exotic'
terminators that actually have register uses when splitting critical edges.
This commit also introduces a method repairIntervalsInRange() on LiveIntervals,
which allows for repairing LiveIntervals in a small range after an arbitrary
target hook modifies, inserts, and removes instructions. It's pretty limited
right now, but I hope to extend it to support all of the things that are done
by the convertToThreeAddress() target hooks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/LiveIntervalAnalysis.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index b6cc111b73..f422a6f3e9 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -281,6 +281,21 @@ namespace llvm { void handleMoveIntoBundle(MachineInstr* MI, MachineInstr* BundleStart, bool UpdateFlags = false); + /// repairIntervalsInRange - Update live intervals for instructions in a + /// small range of reverse iterators. It is intended for use after target + /// hooks that may insert or remove instructions, and is only efficient for + /// a small number of instructions. + /// + /// OrigRegs is a vector of registers that were originally used by the + /// instructions in the range between the two iterators. + /// + /// Currently, the only only changes that are supported are simple removal + /// and addition of uses. + void repairIntervalsInRange(MachineBasicBlock *MBB, + MachineBasicBlock::reverse_iterator RBegin, + MachineBasicBlock::reverse_iterator REnd, + SmallVectorImpl<unsigned> &OrigRegs); + // Register mask functions. // // Machine instructions may use a register mask operand to indicate that a |