mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 07:58:07 +02:00
nak: Print the % for SSA predicates
I don't remember why we special-cased predicates. There isn't a particularly good reason. This lets us drop the weird fmt_plain() and just use fmt() for everything. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
This commit is contained in:
parent
56bdf9043b
commit
20543981b5
2 changed files with 2 additions and 7 deletions
|
|
@ -6706,7 +6706,7 @@ impl fmt::Display for PredRef {
|
|||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
PredRef::None => write!(f, "pT"),
|
||||
PredRef::SSA(ssa) => ssa.fmt_plain(f),
|
||||
PredRef::SSA(ssa) => ssa.fmt(f),
|
||||
PredRef::Reg(reg) => reg.fmt(f),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,10 +44,6 @@ impl SSAValue {
|
|||
pub fn idx(&self) -> u32 {
|
||||
self.packed.get() & 0x1fffffff
|
||||
}
|
||||
|
||||
pub fn fmt_plain(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{}{}", self.file().fmt_prefix(), self.idx())
|
||||
}
|
||||
}
|
||||
|
||||
impl HasRegFile for SSAValue {
|
||||
|
|
@ -59,8 +55,7 @@ impl HasRegFile for SSAValue {
|
|||
|
||||
impl fmt::Display for SSAValue {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "%")?;
|
||||
self.fmt_plain(f)
|
||||
write!(f, "%{}{}", self.file().fmt_prefix(), self.idx())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue