Stack Coloring: When searching for disjoint regions, do not compare intervals twice...
authorNadav Rotem <nrotem@apple.com>
Mon, 10 Sep 2012 12:47:38 +0000 (12:47 +0000)
committerNadav Rotem <nrotem@apple.com>
Mon, 10 Sep 2012 12:47:38 +0000 (12:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163508 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/StackColoring.cpp

index 027096b81050bb4c4b8a2b32862c983d86561e19..45c9af21bb2e8e085bc23fd0509ed47082164eb5 100644 (file)
@@ -630,7 +630,7 @@ bool StackColoring::runOnMachineFunction(MachineFunction &Func) {
       if (SortedSlots[I] == -1)
         continue;
 
-      for (unsigned J=0; J < NumSlots; ++J) {
+      for (unsigned J=I+1; J < NumSlots; ++J) {
         if (SortedSlots[J] == -1)
           continue;