diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-02-03 17:04:16 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-02-03 17:04:16 +0000 |
| commit | 207c868c9210663d401b7f5ce5cae7c3e0943849 (patch) | |
| tree | c28a834cf8edc92146e998f8e867cf3244db7e6c /lib/CodeGen/SplitKit.h | |
| parent | 9590c7fbca2a3c18d0000676b2a6336f6458ed42 (diff) | |
Return live range end points from SplitEditor::enter*/leave*.
These end points come from the inserted copies, and can be passed directly to
useIntv. This simplifies the coloring code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
| -rw-r--r-- | lib/CodeGen/SplitKit.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h index 5e9b96b629..205341c19c 100644 --- a/lib/CodeGen/SplitKit.h +++ b/lib/CodeGen/SplitKit.h @@ -352,12 +352,15 @@ public: /// Create a new virtual register and live interval. void openIntv(); - /// enterIntvBefore - Enter OpenLI before the instruction at Idx. If CurLI is - /// not live before Idx, a COPY is not inserted. - void enterIntvBefore(SlotIndex Idx); + /// enterIntvBefore - Enter the open interval before the instruction at Idx. + /// If the parent interval is not live before Idx, a COPY is not inserted. + /// Return the beginning of the new live range. + SlotIndex enterIntvBefore(SlotIndex Idx); - /// enterIntvAtEnd - Enter OpenLI at the end of MBB. - void enterIntvAtEnd(MachineBasicBlock &MBB); + /// enterIntvAtEnd - Enter the open interval at the end of MBB. + /// Use the open interval from he inserted copy to the MBB end. + /// Return the beginning of the new live range. + SlotIndex enterIntvAtEnd(MachineBasicBlock &MBB); /// useIntv - indicate that all instructions in MBB should use OpenLI. void useIntv(const MachineBasicBlock &MBB); @@ -365,12 +368,14 @@ public: /// useIntv - indicate that all instructions in range should use OpenLI. void useIntv(SlotIndex Start, SlotIndex End); - /// leaveIntvAfter - Leave OpenLI after the instruction at Idx. - void leaveIntvAfter(SlotIndex Idx); + /// leaveIntvAfter - Leave the open interval after the instruction at Idx. + /// Return the end of the live range. + SlotIndex leaveIntvAfter(SlotIndex Idx); /// leaveIntvAtTop - Leave the interval at the top of MBB. - /// Currently, only one value can leave the interval. - void leaveIntvAtTop(MachineBasicBlock &MBB); + /// Add liveness from the MBB top to the copy. + /// Return the end of the live range. + SlotIndex leaveIntvAtTop(MachineBasicBlock &MBB); /// closeIntv - Indicate that we are done editing the currently open /// LiveInterval, and ranges can be trimmed. |
