Skip to content

Commit 64b9757

Browse files
committed
Correct allocd_within_constraint to account for allocating of clobbers to late phase registers.
Ditch reservation of registers for reg-only operands for using a counters to determine whether or not registers should be allocated to operands with Any constraints
1 parent 6c9d7c9 commit 64b9757

File tree

2 files changed

+277
-171
lines changed

2 files changed

+277
-171
lines changed

src/fastalloc/lru.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ pub struct PartedByRegClass<T> {
272272
pub items: [T; 3],
273273
}
274274

275+
impl<T: Copy> Copy for PartedByRegClass<T> {}
276+
275277
impl<T> Index<RegClass> for PartedByRegClass<T> {
276278
type Output = T;
277279

@@ -286,6 +288,12 @@ impl<T> IndexMut<RegClass> for PartedByRegClass<T> {
286288
}
287289
}
288290

291+
impl<T: PartialEq> PartialEq for PartedByRegClass<T> {
292+
fn eq(&self, other: &Self) -> bool {
293+
self.items.eq(&other.items)
294+
}
295+
}
296+
289297
/// Least-recently-used caches for register classes Int, Float, and Vector, respectively.
290298
pub type Lrus = PartedByRegClass<Lru>;
291299

0 commit comments

Comments
 (0)