shader: Inline common Value functions into the header

This commit is contained in:
ReinUsesLisp
2021-04-21 02:42:36 -03:00
committed by ameerj
parent 050e81500c
commit c84bbd9e44
2 changed files with 23 additions and 19 deletions

View File

@ -33,25 +33,6 @@ Value::Value(u64 value) noexcept : type{Type::U64}, imm_u64{value} {}
Value::Value(f64 value) noexcept : type{Type::F64}, imm_f64{value} {}
bool Value::IsIdentity() const noexcept {
return type == Type::Opaque && inst->GetOpcode() == Opcode::Identity;
}
bool Value::IsPhi() const noexcept {
return type == Type::Opaque && inst->GetOpcode() == Opcode::Phi;
}
bool Value::IsEmpty() const noexcept {
return type == Type::Void;
}
bool Value::IsImmediate() const noexcept {
if (IsIdentity()) {
return inst->Arg(0).IsImmediate();
}
return type != Type::Opaque;
}
bool Value::IsLabel() const noexcept {
return type == Type::Label;
}