[llvm-commits] [llvm] r122822 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Owen Anderson
resistor at mac.com
Tue Jan 4 11:10:55 PST 2011
Author: resistor
Date: Tue Jan 4 13:10:54 2011
New Revision: 122822
URL: http://llvm.org/viewvc/llvm-project?rev=122822&view=rev
Log:
When removing a value from GVN's leaders list, don't drop the Next pointer in a corner case.
Modified:
llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=122822&r1=122821&r2=122822&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Jan 4 13:10:54 2011
@@ -466,6 +466,7 @@
NumberTableEntry* Next = Curr->Next;
Curr->Val = Next->Val;
Curr->BB = Next->BB;
+ Curr->Next = Next->Next;
}
}
}
@@ -1693,7 +1694,7 @@
return false;
}
-
+
uint32_t NextNum = VN.getNextUnusedValueNumber();
unsigned Num = VN.lookup_or_add(I);
More information about the llvm-commits
mailing list