Move RegAllocBase into its own cpp file separate from RABasic.
[oota-llvm.git] / lib / CodeGen / SpillPlacement.cpp
index ce7b37bfce5eed4195b38130e8a3301818cd7ba5..6f33f5465ca2b427cf19d0079673f7674b4f8996 100644 (file)
@@ -220,6 +220,7 @@ void SpillPlacement::addConstraints(ArrayRef<BlockConstraint> LiveBlocks) {
       0,           // DontCare,
       1,           // PrefReg,
       -1,          // PrefSpill
+      0,           // PrefBoth
       -HUGE_VALF   // MustSpill
     };
 
@@ -240,10 +241,12 @@ void SpillPlacement::addConstraints(ArrayRef<BlockConstraint> LiveBlocks) {
 }
 
 /// addPrefSpill - Same as addConstraints(PrefSpill)
-void SpillPlacement::addPrefSpill(ArrayRef<unsigned> Blocks) {
+void SpillPlacement::addPrefSpill(ArrayRef<unsigned> Blocks, bool Strong) {
   for (ArrayRef<unsigned>::iterator I = Blocks.begin(), E = Blocks.end();
        I != E; ++I) {
     float Freq = getBlockFrequency(*I);
+    if (Strong)
+      Freq += Freq;
     unsigned ib = bundles->getBundle(*I, 0);
     unsigned ob = bundles->getBundle(*I, 1);
     activate(ib);