RegAllocGreedy comment.
authorAndrew Trick <atrick@apple.com>
Thu, 25 Jul 2013 18:35:22 +0000 (18:35 +0000)
committerAndrew Trick <atrick@apple.com>
Thu, 25 Jul 2013 18:35:22 +0000 (18:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187141 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocGreedy.cpp

index 79253715c337ad1285f7183341f15b7e164672e8..87b11a5f51c0691e05f73b5fa08dbfc3011bd755 100644 (file)
@@ -434,7 +434,8 @@ void RAGreedy::enqueue(LiveInterval *LI) {
     if (VRM->hasKnownPreference(Reg))
       Prio |= (1u << 30);
   }
-
+  // The virtual register number is a tie breaker for same-sized ranges.
+  // Give lower vreg numbers higher priority to assign them first.
   Queue.push(std::make_pair(Prio, ~Reg));
 }