[llvm-commits] [llvm] r122741 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Cameron Zwarich
zwarich at apple.com
Sun Jan 2 22:33:01 PST 2011
Author: zwarich
Date: Mon Jan 3 00:33:01 2011
New Revision: 122741
URL: http://llvm.org/viewvc/llvm-project?rev=122741&view=rev
Log:
Switch a worklist in CodeGenPrepare to SmallVector and increase the inline
capacity on the Visited SmallPtrSet. On 403.gcc, this is about a 4.5% speedup of
CodeGenPrepare time (which itself is 10% of time spent in the backend).
This is progress towards PR8889.
Modified:
llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=122741&r1=122740&r2=122741&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Mon Jan 3 00:33:01 2011
@@ -623,8 +623,8 @@
// Try to collapse single-value PHI nodes. This is necessary to undo
// unprofitable PRE transformations.
- std::vector<Value*> worklist;
- SmallPtrSet<Value*, 4> Visited;
+ SmallVector<Value*, 8> worklist;
+ SmallPtrSet<Value*, 16> Visited;
worklist.push_back(Addr);
// Use a worklist to iteratively look through PHI nodes, and ensure that
More information about the llvm-commits
mailing list