Enable assertion to detect cyclic valno references.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sun, 21 Feb 2010 18:51:48 +0000 (18:51 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sun, 21 Feb 2010 18:51:48 +0000 (18:51 +0000)
This changes the stack overflow in PR6363 to an assertion failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96744 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SimpleRegisterCoalescing.cpp

index e7b0cff53b3d6de96be764b935e5912ffbddacb6..dcbbb1a00455516b7f64efa6c69826c8384fea2d 100644 (file)
@@ -1864,7 +1864,7 @@ static unsigned ComputeUltimateVN(VNInfo *VNI,
   // If the VN has already been computed, just return it.
   if (ThisValNoAssignments[VN] >= 0)
     return ThisValNoAssignments[VN];
-//  assert(ThisValNoAssignments[VN] != -2 && "Cyclic case?");
+  assert(ThisValNoAssignments[VN] != -2 && "Cyclic value numbers");
 
   // If this val is not a copy from the other val, then it must be a new value
   // number in the destination.