value: Add GetInstRecursive
This commit is contained in:
parent
976edaf2d2
commit
93adcfa5c6
2 changed files with 8 additions and 0 deletions
|
@ -110,6 +110,13 @@ Inst* Value::GetInst() const {
|
||||||
return inner.inst;
|
return inner.inst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Inst* Value::GetInstRecursive() const {
|
||||||
|
ASSERT(type == Type::Opaque);
|
||||||
|
if (IsIdentity())
|
||||||
|
return inner.inst->GetArg(0).GetInstRecursive();
|
||||||
|
return inner.inst;
|
||||||
|
}
|
||||||
|
|
||||||
bool Value::GetU1() const {
|
bool Value::GetU1() const {
|
||||||
if (IsIdentity())
|
if (IsIdentity())
|
||||||
return inner.inst->GetArg(0).GetU1();
|
return inner.inst->GetArg(0).GetU1();
|
||||||
|
|
|
@ -55,6 +55,7 @@ public:
|
||||||
Type GetType() const;
|
Type GetType() const;
|
||||||
|
|
||||||
Inst* GetInst() const;
|
Inst* GetInst() const;
|
||||||
|
Inst* GetInstRecursive() const;
|
||||||
A32::Reg GetA32RegRef() const;
|
A32::Reg GetA32RegRef() const;
|
||||||
A32::ExtReg GetA32ExtRegRef() const;
|
A32::ExtReg GetA32ExtRegRef() const;
|
||||||
A64::Reg GetA64RegRef() const;
|
A64::Reg GetA64RegRef() const;
|
||||||
|
|
Loading…
Reference in a new issue