mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-25 09:28:42 +00:00
reg_alloc: Call DecrementRemainingUses in only one place
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user