Skip to content

Commit 34fa697

Browse files
committed
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214184 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent f0fd505 commit 34fa697

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/Bitcode/Writer/ValueEnumerator.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,10 @@ static void predictValueUseListOrderImpl(const Value *V, const Function *F,
136136
return;
137137

138138
// Store the shuffle.
139-
UseListOrder O(V, F, List.size());
140-
assert(List.size() == O.Shuffle.size() && "Wrong size");
139+
Stack.emplace_back(V, F, List.size());
140+
assert(List.size() == Stack.back().Shuffle.size() && "Wrong size");
141141
for (size_t I = 0, E = List.size(); I != E; ++I)
142-
O.Shuffle[I] = List[I].second;
143-
Stack.emplace_back(std::move(O));
142+
Stack.back().Shuffle[I] = List[I].second;
144143
}
145144

146145
static void predictValueUseListOrder(const Value *V, const Function *F,

0 commit comments

Comments
 (0)