backend/arm64/reg_alloc: Argument HostLoc location
This commit is contained in:
parent
fe4e864e4c
commit
98806139a5
2 changed files with 10 additions and 0 deletions
|
@ -71,6 +71,10 @@ IR::AccType Argument::GetImmediateAccType() const {
|
|||
return value.GetAccType();
|
||||
}
|
||||
|
||||
HostLoc::Kind Argument::CurrentLocationKind() const {
|
||||
return reg_alloc.ValueLocation(value.GetInst())->kind;
|
||||
}
|
||||
|
||||
bool HostLocInfo::Contains(const IR::Inst* value) const {
|
||||
return std::find(values.begin(), values.end(), value) != values.end();
|
||||
}
|
||||
|
|
|
@ -50,6 +50,11 @@ public:
|
|||
IR::Cond GetImmediateCond() const;
|
||||
IR::AccType GetImmediateAccType() const;
|
||||
|
||||
// Only valid if not immediate
|
||||
HostLoc::Kind CurrentLocationKind() const;
|
||||
bool IsInGpr() const { return !IsImmediate() && CurrentLocationKind() == HostLoc::Kind::Gpr; }
|
||||
bool IsInFpr() const { return !IsImmediate() && CurrentLocationKind() == HostLoc::Kind::Fpr; }
|
||||
|
||||
private:
|
||||
friend class RegAlloc;
|
||||
explicit Argument(RegAlloc& reg_alloc)
|
||||
|
@ -218,6 +223,7 @@ public:
|
|||
void AssertNoMoreUses() const;
|
||||
|
||||
private:
|
||||
friend struct Argument;
|
||||
template<typename>
|
||||
friend struct RAReg;
|
||||
|
||||
|
|
Loading…
Reference in a new issue