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)


_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to