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 | 43cecb12002694e925eb0c020b9dab07db22950c (patch) | |
tree | b9d099723a8fef5e60cd383874a2eb195e076a49 /llvm/lib/Transforms | |
parent | b5d1579c72422255e877cfb90d24156fceedb792 (diff) | |
download | bcm5719-llvm-43cecb12002694e925eb0c020b9dab07db22950c.tar.gz bcm5719-llvm-43cecb12002694e925eb0c020b9dab07db22950c.zip |
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.
llvm-svn: 122741
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index 1f0930df06c..f4edcc76ec5 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/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 |