[llvm-branch-commits] [llvm-branch] r106000 - in /llvm/branches/Apple/Troughton: ./ lib/CodeGen/RegAllocFast.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Jun 15 09:34:37 PDT 2010
Author: stoklund
Date: Tue Jun 15 11:34:37 2010
New Revision: 106000
URL: http://llvm.org/viewvc/llvm-project?rev=106000&view=rev
Log:
$ svn merge -c 105473 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r105473 into '.':
U lib/CodeGen/RegAllocFast.cpp
Modified:
llvm/branches/Apple/Troughton/ (props changed)
llvm/branches/Apple/Troughton/lib/CodeGen/RegAllocFast.cpp
Propchange: llvm/branches/Apple/Troughton/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun 15 11:34:37 2010
@@ -1 +1 @@
-/llvm/trunk:105358,105361,105369,105372,105399,105427,105437,105439,105441,105470,105481,105498,105541,105554,105557,105585-105586,105634,105653,105669,105677,105745,105774-105775,105836,105845,105862,105938,105959,105965,105982
+/llvm/trunk:105358,105361,105369,105372,105399,105427,105437,105439,105441,105470,105473,105481,105498,105541,105554,105557,105585-105586,105634,105653,105669,105677,105745,105774-105775,105836,105845,105862,105938,105959,105965,105982
Modified: llvm/branches/Apple/Troughton/lib/CodeGen/RegAllocFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Troughton/lib/CodeGen/RegAllocFast.cpp?rev=106000&r1=105999&r2=106000&view=diff
==============================================================================
--- llvm/branches/Apple/Troughton/lib/CodeGen/RegAllocFast.cpp (original)
+++ llvm/branches/Apple/Troughton/lib/CodeGen/RegAllocFast.cpp Tue Jun 15 11:34:37 2010
@@ -110,6 +110,11 @@
// Allocatable - vector of allocatable physical registers.
BitVector Allocatable;
+ // SkippedInstrs - Descriptors of instructions whose clobber list was ignored
+ // because all registers were spilled. It is still necessary to mark all the
+ // clobbered registers as used by the function.
+ SmallPtrSet<const TargetInstrDesc*, 4> SkippedInstrs;
+
// isBulkSpilling - This flag is set when LiveRegMap will be cleared
// completely after spilling all live registers. LiveRegMap entries should
// not be erased.
@@ -752,6 +757,10 @@
DefOpEnd = VirtOpEnd;
DEBUG(dbgs() << " Spilling remaining registers before call.\n");
spillAll(MI);
+
+ // The imp-defs are skipped below, but we still need to mark those
+ // registers as used by the function.
+ SkippedInstrs.insert(&TID);
}
// Third scan.
@@ -837,6 +846,14 @@
// Make sure the set of used physregs is closed under subreg operations.
MRI->closePhysRegsUsed(*TRI);
+ // Add the clobber lists for all the instructions we skipped earlier.
+ for (SmallPtrSet<const TargetInstrDesc*, 4>::const_iterator
+ I = SkippedInstrs.begin(), E = SkippedInstrs.end(); I != E; ++I)
+ if (const unsigned *Defs = (*I)->getImplicitDefs())
+ while (*Defs)
+ MRI->setPhysRegUsed(*Defs++);
+
+ SkippedInstrs.clear();
StackSlotForVirtReg.clear();
return true;
}
More information about the llvm-branch-commits
mailing list