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