mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-02 04:34:43 +01:00
reg_alloc: Call DecrementRemainingUses in only one place
This commit is contained in:
parent
51fc9fec05
commit
184db36caf
2 changed files with 3 additions and 17 deletions
|
|
@ -114,6 +114,9 @@ std::array<Argument, 3> RegAlloc::GetArgumentInfo(IR::Inst* inst) {
|
|||
for (size_t i = 0; i < inst->NumArgs(); i++) {
|
||||
IR::Value arg = inst->GetArg(i);
|
||||
ret[i].value = arg;
|
||||
if (!arg.IsImmediate()) {
|
||||
arg.GetInst()->DecrementRemainingUses();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -326,7 +329,6 @@ void RegAlloc::DefineValueImpl(IR::Inst* def_inst, const IR::Value& use_inst) {
|
|||
return;
|
||||
}
|
||||
|
||||
use_inst.GetInst()->DecrementRemainingUses();
|
||||
DEBUG_ASSERT_MSG(ValueLocation(use_inst.GetInst()), "use_inst must already be defined");
|
||||
HostLoc location = *ValueLocation(use_inst.GetInst());
|
||||
DefineValueImpl(def_inst, location);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue