From 9031e74abd6b51e065f09e28b3130b4a1e817a97 Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Sat, 25 Feb 2023 11:21:47 -0800 Subject: [PATCH] some tweaks to localify --- src/backend/localify.rs | 12 ++++++------ src/passes.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backend/localify.rs b/src/backend/localify.rs index fa742ea..20b4596 100644 --- a/src/backend/localify.rs +++ b/src/backend/localify.rs @@ -137,7 +137,6 @@ impl<'a> Context<'a> { value: Value, root: bool, ) { - let value = self.body.resolve_alias(value); log::trace!( "localify: point {}: live {:?}: handling inst {} root {}", point, @@ -148,17 +147,18 @@ impl<'a> Context<'a> { // If this is an instruction... 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 { *point += 1; log::trace!(" -> def {}", 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 // PickOutput, which we "see through" in handle_use of diff --git a/src/passes.rs b/src/passes.rs index e0b36b0..46aa889 100644 --- a/src/passes.rs +++ b/src/passes.rs @@ -5,5 +5,5 @@ pub mod dom_pass; pub mod empty_blocks; pub mod maxssa; pub mod resolve_aliases; -pub mod trace; pub mod ssa; +pub mod trace;