mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-22 18:30:31 +01:00
aco/ra: Use iterators for linear VGPR copy extraction
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
This commit is contained in:
parent
ea3c04b535
commit
3f182bc1fa
1 changed files with 8 additions and 8 deletions
|
|
@ -3064,18 +3064,18 @@ emit_parallel_copy(ra_ctx& ctx, std::vector<std::pair<Operand, Definition>>& par
|
|||
|
||||
std::vector<std::pair<Operand, Definition>> linear_vgpr;
|
||||
if (ctx.num_linear_vgprs) {
|
||||
unsigned next = 0;
|
||||
for (unsigned i = 0; i < parallelcopy.size(); i++) {
|
||||
if (parallelcopy[i].first.regClass().is_linear_vgpr()) {
|
||||
linear_vgpr.push_back(parallelcopy[i]);
|
||||
auto next = parallelcopy.begin();
|
||||
for (auto it = parallelcopy.begin(); it != parallelcopy.end(); ++it) {
|
||||
if (it->first.regClass().is_linear_vgpr()) {
|
||||
linear_vgpr.push_back(*it);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (next != i)
|
||||
parallelcopy[next] = parallelcopy[i];
|
||||
next++;
|
||||
if (next != it)
|
||||
*next = *it;
|
||||
++next;
|
||||
}
|
||||
parallelcopy.resize(next);
|
||||
parallelcopy.erase(next, parallelcopy.end());
|
||||
}
|
||||
|
||||
/* Because of how linear VGPRs are allocated, we should never have to move a linear VGPR into the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue