summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SplitKit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-14 23:49:52 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-14 23:49:52 +0000
commita17768f5822ab62bc18608e5ba473187bf726b84 (patch)
tree8ebad1e5fd484b5b49f7629b19c5febf8c7ad1fc /lib/CodeGen/SplitKit.h
parent53e7dcbd47c6ca34c0cd00c35b09ee5a2be7afe1 (diff)
downloadllvm-a17768f5822ab62bc18608e5ba473187bf726b84.tar.gz
llvm-a17768f5822ab62bc18608e5ba473187bf726b84.tar.bz2
llvm-a17768f5822ab62bc18608e5ba473187bf726b84.tar.xz
Create a new LiveRangeEdit class to keep track of the new registers created when
splitting or spillling, and to help with rematerialization. Use LiveRangeEdit in InlineSpiller and SplitKit. This will eventually make it possible to share remat code between InlineSpiller and SplitKit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r--lib/CodeGen/SplitKit.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index dff3765ec3..005ceda3c2 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -20,6 +20,7 @@ namespace llvm {
class LiveInterval;
class LiveIntervals;
+class LiveRangeEdit;
class MachineInstr;
class MachineLoop;
class MachineLoopInfo;
@@ -238,6 +239,9 @@ class SplitEditor {
MachineRegisterInfo &mri_;
const TargetInstrInfo &tii_;
+ /// edit_ - The current parent register and new intervals created.
+ LiveRangeEdit &edit_;
+
/// curli_ - The immutable interval we are currently splitting.
const LiveInterval *const curli_;
@@ -249,17 +253,6 @@ class SplitEditor {
/// Currently open LiveInterval.
LiveIntervalMap openli_;
- /// createInterval - Create a new virtual register and LiveInterval with same
- /// register class and spill slot as curli.
- LiveInterval *createInterval();
-
- /// All the new intervals created for this split are added to intervals_.
- SmallVectorImpl<LiveInterval*> &intervals_;
-
- /// The index into intervals_ of the first interval we added. There may be
- /// others from before we got it.
- unsigned firstInterval;
-
/// intervalsLiveAt - Return true if any member of intervals_ is live at Idx.
bool intervalsLiveAt(SlotIndex Idx) const;
@@ -281,8 +274,7 @@ class SplitEditor {
public:
/// Create a new SplitEditor for editing the LiveInterval analyzed by SA.
/// Newly created intervals will be appended to newIntervals.
- SplitEditor(SplitAnalysis &SA, LiveIntervals&, VirtRegMap&,
- SmallVectorImpl<LiveInterval*> &newIntervals);
+ SplitEditor(SplitAnalysis &SA, LiveIntervals&, VirtRegMap&, LiveRangeEdit&);
/// getAnalysis - Get the corresponding analysis.
SplitAnalysis &getAnalysis() { return sa_; }