some tweaks to localify

This commit is contained in:
Chris Fallin 2023-02-25 11:21:47 -08:00
parent 63f5eca6a9
commit 9031e74abd
2 changed files with 7 additions and 7 deletions

View file

@ -137,7 +137,6 @@ impl<'a> Context<'a> {
value: Value, value: Value,
root: bool, root: bool,
) { ) {
let value = self.body.resolve_alias(value);
log::trace!( log::trace!(
"localify: point {}: live {:?}: handling inst {} root {}", "localify: point {}: live {:?}: handling inst {} root {}",
point, point,
@ -148,17 +147,18 @@ impl<'a> Context<'a> {
// If this is an instruction... // If this is an instruction...
if let ValueDef::Operator(_, ref args, _) = &self.body.values[value] { if let ValueDef::Operator(_, ref args, _) = &self.body.values[value] {
// Handle uses.
for &arg in args {
log::trace!(" -> arg {}", arg);
self.handle_use(live, point, arg);
}
// If root, we need to process the def. // If root, we need to process the def.
if root { if root {
*point += 1; *point += 1;
log::trace!(" -> def {}", value); log::trace!(" -> def {}", value);
self.handle_def(live, point, value); self.handle_def(live, point, value);
} }
*point += 1;
// Handle uses.
for &arg in args {
log::trace!(" -> arg {}", arg);
self.handle_use(live, point, arg);
}
} }
// Otherwise, it may be an alias (but resolved above) or // Otherwise, it may be an alias (but resolved above) or
// PickOutput, which we "see through" in handle_use of // PickOutput, which we "see through" in handle_use of

View file

@ -5,5 +5,5 @@ pub mod dom_pass;
pub mod empty_blocks; pub mod empty_blocks;
pub mod maxssa; pub mod maxssa;
pub mod resolve_aliases; pub mod resolve_aliases;
pub mod trace;
pub mod ssa; pub mod ssa;
pub mod trace;