Skip to content

Commit

Permalink
move clone in normalize_ids out of the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm committed Jan 22, 2025
1 parent ed06f19 commit c15757d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ impl Ssa {
pub(crate) fn normalize_ids(&mut self) {
let mut context = Context::default();
context.populate_functions(&self.functions);
let globals = (*self.functions[&self.main_id].dfg.globals).clone();
for function in self.functions.values_mut() {
let globals = (*function.dfg.globals).clone();
context.normalize_ids(function, &globals);
}
self.functions = context.functions.into_btree();
Expand Down

0 comments on commit c15757d

Please sign in to comment.