Fix PR9883. Make sure all caches are invalidated when a live range is repaired.

The previous invalidation missed the alias interference caches.

Also add a stats counter for the number of repaired ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131133 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index e9920b8..87e08ba 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -1325,9 +1325,7 @@
   // an assertion when the coalescer is fixed.
   if (SA->didRepairRange()) {
     // VirtReg has changed, so all cached queries are invalid.
-    Order.rewind();
-    while (unsigned PhysReg = Order.next())
-      query(VirtReg, PhysReg).clear();
+    invalidateVirtRegs();
     if (unsigned PhysReg = tryAssign(VirtReg, Order, NewVRegs))
       return PhysReg;
   }