mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
IR: Optimize size of use-list order shuffle vectors
Since we're storing lots of these, save two-pointers per vector with a custom type rather than using the relatively heavy `SmallVector`. Part of PR5680. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214135 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -133,12 +133,11 @@ static void predictValueUseListOrderImpl(const Value *V, const Function *F,
|
||||
return;
|
||||
|
||||
// Store the shuffle.
|
||||
UseListOrder O;
|
||||
O.V = V;
|
||||
O.F = F;
|
||||
for (auto &I : List)
|
||||
O.Shuffle.push_back(I.second);
|
||||
Stack.push_back(O);
|
||||
UseListOrder O(V, F, List.size());
|
||||
assert(List.size() == O.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));
|
||||
}
|
||||
|
||||
static void predictValueUseListOrder(const Value *V, const Function *F,
|
||||
|
Reference in New Issue
Block a user