Only print pressure for toprcs containing registers.

Many ISAs don't need 4 top-level register classes, so don't print them.
This commit is contained in:
Jakob Stoklund Olesen
2017-07-05 14:22:34 -07:00
parent 9662f102e5
commit 60efc68931

View File

@@ -238,7 +238,9 @@ impl fmt::Display for Pressure {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Pressure[")?;
for rc in &self.toprc {
write!(f, " {}+{}/{}", rc.base_count, rc.transient_count, rc.limit)?;
if rc.limit > 0 {
write!(f, " {}+{}/{}", rc.base_count, rc.transient_count, rc.limit)?;
}
}
write!(f, " ]")
}