[llvm] r214184 - IR: Create the use-list order shuffle vector in-place

Duncan P. N. Exon Smith dexonsmith at apple.com
Tue Jul 29 09:58:18 PDT 2014


Author: dexonsmith
Date: Tue Jul 29 11:58:18 2014
New Revision: 214184

URL: http://llvm.org/viewvc/llvm-project?rev=214184&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp

Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp?rev=214184&r1=214183&r2=214184&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Tue Jul 29 11:58:18 2014
@@ -136,11 +136,10 @@ static void predictValueUseListOrderImpl
     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,





More information about the llvm-commits mailing list