mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 16:00:09 +01:00
aco: Fix accidental copies, attempt two
Use auto to avoid mistyping the constness of the pair key, which triggers implicit conversions rather than compilation errors. Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7346>
This commit is contained in:
parent
b03c86a71f
commit
6d058ac6c9
1 changed files with 7 additions and 4 deletions
|
|
@ -313,7 +313,7 @@ struct wait_ctx {
|
|||
pending_flat_vm |= other->pending_flat_vm;
|
||||
pending_s_buffer_store |= other->pending_s_buffer_store;
|
||||
|
||||
for (const std::pair<PhysReg,wait_entry>& entry : other->gpr_map)
|
||||
for (const auto& entry : other->gpr_map)
|
||||
{
|
||||
if (entry.second.logical != logical)
|
||||
continue;
|
||||
|
|
@ -335,7 +335,7 @@ struct wait_ctx {
|
|||
|
||||
/* these are used for statistics, so don't update "changed" */
|
||||
for (unsigned i = 0; i < num_counters; i++) {
|
||||
for (const std::pair<Instruction *, unsigned>& instr : other->unwaited_instrs[i]) {
|
||||
for (const auto& instr : other->unwaited_instrs[i]) {
|
||||
using iterator = std::map<Instruction *, unsigned>::iterator;
|
||||
const std::pair<iterator, bool> insert_pair = unwaited_instrs[i].insert(instr);
|
||||
if (!insert_pair.second) {
|
||||
|
|
@ -343,8 +343,11 @@ struct wait_ctx {
|
|||
pos->second = std::min(pos->second, instr.second);
|
||||
}
|
||||
}
|
||||
for (const std::pair<PhysReg,std::set<Instruction *>>& instr : other->reg_instrs[i])
|
||||
reg_instrs[i][instr.first].insert(instr.second.begin(), instr.second.end());
|
||||
for (const auto& instr_pair : other->reg_instrs[i]) {
|
||||
const PhysReg reg = instr_pair.first;
|
||||
const std::set<Instruction *>& instrs = instr_pair.second;
|
||||
reg_instrs[i][reg].insert(instrs.begin(), instrs.end());
|
||||
}
|
||||
}
|
||||
|
||||
return changed;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue