inline some things

This commit is contained in:
Chris Fallin
2021-05-26 00:48:41 -07:00
parent 4e0dd1f296
commit dcf6f473ca

View File

@@ -485,6 +485,7 @@ impl PrioQueue {
}
}
#[inline(always)]
fn insert(&mut self, bundle: LiveBundleIndex, prio: usize, reg_hint: PReg) {
self.heap.push(PrioQueueEntry {
prio: prio as u32,
@@ -493,10 +494,12 @@ impl PrioQueue {
});
}
#[inline(always)]
fn is_empty(self) -> bool {
self.heap.is_empty()
}
#[inline(always)]
fn pop(&mut self) -> Option<(LiveBundleIndex, PReg)> {
self.heap.pop().map(|entry| (entry.bundle, entry.reg_hint))
}