mirror of
https://github.com/azahar-emu/dynarmic
synced 2025-11-07 23:50:00 +01:00
reg_alloc: const correctness for ValueLocation()
This commit is contained in:
parent
2d6a86e43c
commit
36a0ad5bc2
@ -341,9 +341,9 @@ HostLoc RegAlloc::SelectARegister(HostLocList desired_locations) const {
|
|||||||
return candidates.front();
|
return candidates.front();
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::optional<HostLoc> RegAlloc::ValueLocation(IR::Inst* value) const {
|
boost::optional<HostLoc> RegAlloc::ValueLocation(const IR::Inst* value) const {
|
||||||
for (size_t i = 0; i < HostLocCount; i++)
|
for (size_t i = 0; i < HostLocCount; i++)
|
||||||
for (IR::Inst* v : hostloc_info[i].values)
|
for (const IR::Inst* v : hostloc_info[i].values)
|
||||||
if (v == value)
|
if (v == value)
|
||||||
return boost::make_optional<HostLoc>(static_cast<HostLoc>(i));
|
return boost::make_optional<HostLoc>(static_cast<HostLoc>(i));
|
||||||
|
|
||||||
|
|||||||
@ -136,7 +136,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
HostLoc SelectARegister(HostLocList desired_locations) const;
|
HostLoc SelectARegister(HostLocList desired_locations) const;
|
||||||
boost::optional<HostLoc> ValueLocation(IR::Inst* value) const;
|
boost::optional<HostLoc> ValueLocation(const IR::Inst* value) const;
|
||||||
bool IsRegisterOccupied(HostLoc loc) const;
|
bool IsRegisterOccupied(HostLoc loc) const;
|
||||||
bool IsRegisterAllocated(HostLoc loc) const;
|
bool IsRegisterAllocated(HostLoc loc) const;
|
||||||
bool IsLastUse(IR::Inst* inst) const;
|
bool IsLastUse(IR::Inst* inst) const;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user