diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-01-03 06:33:01 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-01-03 06:33:01 +0000 |
commit | 7cb4fa20b5534decf527a6bfcc74bd79ea11cbb1 (patch) | |
tree | 4371e4b1c48dea125f7f169b54991d88052c21fb /lib/Transforms/Scalar/CodeGenPrepare.cpp | |
parent | db5f5e64fe2a7266fe5ed126fa2e92e5c0f71833 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 1f0930df06..f4edcc76ec 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -623,8 +623,8 @@ bool CodeGenPrepare::OptimizeMemoryInst(Instruction *MemoryInst, Value *Addr, // 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 |