Numerous bug fixes:
-- passing FP arguments to functions with more than 6 arguments
-- passing FP arguments to varargs functions
-- passing FP arguments to functions with no prototypes
-- incorrect coloring for CC registers (both int and FP): interferences
   were being completely ignored for int CC and were considered but no
   spills were marked for fp CC!

Also some code improvements:
-- better interface to generating machine instr for common cases
   (many places still need to be updated to use this interface)
-- annotations on MachineInstr to communicate information from
   one codegen phase to another (now used to pass information about
   CALL/JMPLCALL operands from selection to register allocation)
-- all sizes and offests in class TargetData are uint64_t instead of uint


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2642 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/RegAlloc/RegClass.cpp b/lib/CodeGen/RegAlloc/RegClass.cpp
index 249b8db..c680bbf 100644
--- a/lib/CodeGen/RegAlloc/RegClass.cpp
+++ b/lib/CodeGen/RegAlloc/RegClass.cpp
@@ -210,6 +210,22 @@
       IsColorUsedArr[ (*ReservedColorList)[i] ] = true;
     }
 
+    // initialize all colors used by neighbors of this node to true
+    LiveRange *LR = Node->getParentLR();
+    unsigned NumNeighbors =  Node->getNumOfNeighbors();
+    for (unsigned n=0; n < NumNeighbors; n++) {
+      IGNode *NeighIGNode = Node->getAdjIGNode(n);
+      LiveRange *NeighLR = NeighIGNode->getParentLR();
+      
+      if (NeighLR->hasColor()) {                        // if has a color
+        IsColorUsedArr[NeighLR->getColor()] = true;  // mark color as used
+      } else if (NeighLR->hasSuggestedColor() &&
+                 NeighLR->isSuggestedColorUsable()) {
+        // this color is suggested for the neighbour, so don't use it
+        IsColorUsedArr[NeighLR->getSuggestedColor()] = true; 
+      }
+    }
+    
     // call the target specific code for coloring
     //
     MRC->colorIGNode(Node, IsColorUsedArr);