[llvm-commits] [llvm] r40064 - /llvm/trunk/lib/Transforms/Scalar/GVNPRE.cpp
Owen Anderson
resistor at mac.com
Thu Jul 19 12:57:14 PDT 2007
Author: resistor
Date: Thu Jul 19 14:57:13 2007
New Revision: 40064
URL: http://llvm.org/viewvc/llvm-project?rev=40064&view=rev
Log:
Make val_replace fail early, which reduces the time to optimize 403.gcc to 14.8s.
Modified:
llvm/trunk/lib/Transforms/Scalar/GVNPRE.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVNPRE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVNPRE.cpp?rev=40064&r1=40063&r2=40064&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVNPRE.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVNPRE.cpp Thu Jul 19 14:57:13 2007
@@ -757,6 +757,8 @@
/// val_replace - Insert a value into a set, replacing any values already in
/// the set that have the same value number
void GVNPRE::val_replace(ValueNumberedSet& s, Value* v) {
+ if (s.count(v)) return;
+
uint32_t num = VN.lookup(v);
Value* leader = find_leader(s, num);
if (leader != 0)
More information about the llvm-commits
mailing list