fix regalloc
This commit is contained in:
parent
75d4323c4d
commit
38591d90a3
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
use crate::backend::treeify::Trees;
|
use crate::backend::treeify::Trees;
|
||||||
use crate::cfg::CFGInfo;
|
use crate::cfg::CFGInfo;
|
||||||
use crate::entity::{EntityRef, EntityVec, PerEntity};
|
use crate::entity::{EntityVec, PerEntity};
|
||||||
use crate::ir::{Block, FunctionBody, Local, Type, Value, ValueDef};
|
use crate::ir::{Block, FunctionBody, Local, Type, Value, ValueDef};
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
use std::collections::{hash_map::Entry, HashMap};
|
use std::collections::{hash_map::Entry, HashMap};
|
||||||
|
@ -187,10 +187,12 @@ impl<'a> Context<'a> {
|
||||||
range.end
|
range.end
|
||||||
);
|
);
|
||||||
|
|
||||||
// If the value is an arg, ignore; these already have
|
// If the value is an arg on block0, ignore; these
|
||||||
// fixed locations.
|
// already have fixed locations.
|
||||||
if value.index() < self.body.n_params {
|
if let &ValueDef::BlockParam(b, _, _) = &self.body.values[value] {
|
||||||
continue;
|
if b == self.body.entry {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try getting a local from the freelist; if not,
|
// Try getting a local from the freelist; if not,
|
||||||
|
|
Loading…
Reference in a new issue