aco/live_var_analysis: Don't attempt to re-insert the same temporary twice into live set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30299>
This commit is contained in:
committed by
Marge Bot
parent
e621f0c173
commit
1c14013b9e
@@ -259,14 +259,15 @@ process_live_temps_per_block(live_ctx& ctx, Block* block)
|
||||
if (operand.isFixed() && operand.physReg() == vcc)
|
||||
ctx.program->needs_vcc = true;
|
||||
const Temp temp = operand.getTemp();
|
||||
const bool inserted = live.insert(temp.id()).second;
|
||||
if (inserted) {
|
||||
|
||||
if (operand.isKill())
|
||||
continue;
|
||||
|
||||
if (live.insert(temp.id()).second) {
|
||||
operand.setFirstKill(true);
|
||||
for (unsigned j = i + 1; j < insn->operands.size(); ++j) {
|
||||
if (insn->operands[j].isTemp() && insn->operands[j].tempId() == operand.tempId()) {
|
||||
insn->operands[j].setFirstKill(false);
|
||||
if (insn->operands[j].isTemp() && insn->operands[j].getTemp() == temp)
|
||||
insn->operands[j].setKill(true);
|
||||
}
|
||||
}
|
||||
if (operand.isLateKill())
|
||||
insn->register_demand += temp;
|
||||
|
||||
Reference in New Issue
Block a user