x64/reg_alloc: Remove reference qualifier to variable in GetArgumentInfo()

The result of GetArg() is returned by value, so this is essentially
still a copy. While the previous code *is* valid, this communicates what
is actually happening a little more explicitly.
This commit is contained in:
Lioncash 2019-05-04 19:15:18 -04:00
parent f8814e7e05
commit 0085c21321
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -231,7 +231,7 @@ RegAlloc::ArgumentInfo RegAlloc::GetArgumentInfo(IR::Inst* inst) {
ArgumentInfo ret = {Argument{*this}, Argument{*this}, Argument{*this}, Argument{*this}};
const size_t num_args = inst->NumArgs();
for (size_t i = 0; i < num_args; i++) {
const IR::Value& arg = inst->GetArg(i);
const IR::Value arg = inst->GetArg(i);
ret[i].value = arg;
if (!arg.IsImmediate() && !IsValuelessType(arg.GetType())) {
ASSERT_MSG(ValueLocation(arg.GetInst()), "argument must already been defined");