Skip to content

Commit

Permalink
changed guess of number of operands
Browse files Browse the repository at this point in the history
  • Loading branch information
d-sonuga committed Aug 7, 2024
1 parent 7099412 commit 7b13bf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fastalloc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ struct Allocs {
}

impl Allocs {
fn new<F: Function>(func: &F, env: &MachineEnv) -> Self {
let operand_no_guess = func.num_vregs() * 3;
fn new<F: Function>(func: &F) -> Self {
let operand_no_guess = func.num_insts() * 3;
let mut allocs = Vec::with_capacity(operand_no_guess);
let mut inst_alloc_offsets = Vec::with_capacity(operand_no_guess);
for inst in 0..func.num_insts() {
Expand Down Expand Up @@ -218,7 +218,7 @@ impl<'a, F: Function> Env<'a, F> {
env.scratch_by_class[1],
env.scratch_by_class[2],
] },
allocs: Allocs::new(func, env),
allocs: Allocs::new(func),
edits: VecDeque::new(),
safepoint_slots: Vec::new(),
num_spillslots: 0,
Expand Down

0 comments on commit 7b13bf8

Please sign in to comment.