diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-07-29 16:58:18 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-07-29 16:58:18 +0000 |
commit | d7a281ad2e46a876fb00fec27f5e43fc6dd781d0 (patch) | |
tree | c913a8beb59e71fc357f75b27fc4ecd168d1e422 /llvm/lib/Bitcode | |
parent | 5a57054f4be06b559dc6e3672b7db3440c6e5ac7 (diff) | |
download | bcm5719-llvm-d7a281ad2e46a876fb00fec27f5e43fc6dd781d0.tar.gz bcm5719-llvm-d7a281ad2e46a876fb00fec27f5e43fc6dd781d0.zip |
IR: Create the use-list order shuffle vector in-place
Per David Blaikie's review of r214135, this is a more natural way to
initialize.
llvm-svn: 214184
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index f0f9f7430c5..67634f1ac6c 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -136,11 +136,10 @@ static void predictValueUseListOrderImpl(const Value *V, const Function *F, return; // Store the shuffle. - UseListOrder O(V, F, List.size()); - assert(List.size() == O.Shuffle.size() && "Wrong size"); + Stack.emplace_back(V, F, List.size()); + assert(List.size() == Stack.back().Shuffle.size() && "Wrong size"); for (size_t I = 0, E = List.size(); I != E; ++I) - O.Shuffle[I] = List[I].second; - Stack.emplace_back(std::move(O)); + Stack.back().Shuffle[I] = List[I].second; } static void predictValueUseListOrder(const Value *V, const Function *F, |