diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-14 00:37:44 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-14 00:37:44 +0000 |
commit | 3d7b8066aad959676e2917ef42fca6df0674df7e (patch) | |
tree | b1db2194f9c36e612fc9ffe2ee62aee5ceed1057 /llvm/lib/CodeGen/RegAllocGreedy.cpp | |
parent | 6d375e5637c2fb1cac87f0aae3b5a990d3e6d5b3 (diff) | |
download | bcm5719-llvm-3d7b8066aad959676e2917ef42fca6df0674df7e.tar.gz bcm5719-llvm-3d7b8066aad959676e2917ef42fca6df0674df7e.zip |
Add stub for RAGreedy::trySplit.
llvm-svn: 121736
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocGreedy.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocGreedy.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp index aab284805ea..005165eed69 100644 --- a/llvm/lib/CodeGen/RegAllocGreedy.cpp +++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp @@ -83,6 +83,9 @@ private: bool checkUncachedInterference(LiveInterval &, unsigned); bool reassignVReg(LiveInterval &InterferingVReg, unsigned OldPhysReg); bool reassignInterferences(LiveInterval &VirtReg, unsigned PhysReg); + + unsigned trySplit(LiveInterval&, AllocationOrder&, + SmallVectorImpl<LiveInterval*>&); }; } // end anonymous namespace @@ -222,6 +225,15 @@ bool RAGreedy::reassignInterferences(LiveInterval &VirtReg, unsigned PhysReg) { return reassignVReg(*Q.interferingVRegs()[0], PhysReg); } +/// trySplit - Try to split VirtReg or one of its interferences, making it +/// assignable. +/// @return Physreg when VirtReg may be assigned and/or new SplitVRegs. +unsigned RAGreedy::trySplit(LiveInterval &VirtReg, AllocationOrder &Order, + SmallVectorImpl<LiveInterval*>&SplitVRegs) { + NamedRegionTimer T("Splitter", TimerGroupName, TimePassesIsEnabled); + return 0; +} + unsigned RAGreedy::selectOrSplit(LiveInterval &VirtReg, SmallVectorImpl<LiveInterval*> &SplitVRegs) { // Populate a list of physical register spill candidates. @@ -266,6 +278,10 @@ unsigned RAGreedy::selectOrSplit(LiveInterval &VirtReg, PhysRegSpillCands.insert(PhysRegSpillCands.end(), ReassignCands.begin(), ReassignCands.end()); + unsigned PhysReg = trySplit(VirtReg, Order, SplitVRegs); + if (PhysReg || !SplitVRegs.empty()) + return PhysReg; + // Try to spill another interfering reg with less spill weight. NamedRegionTimer T("Spiller", TimerGroupName, TimePassesIsEnabled); // |