Skip to content

Commit

Permalink
fix: always normalize ssa when priting at least one pass
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Feb 5, 2025
1 parent e476f95 commit cb14d25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compiler/noirc_evaluator/src/ssa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,11 @@ impl SsaBuilder {
}

fn print(mut self, msg: &str) -> Self {
// Always normalize if we are going to print at least one of the passes
if !matches!(self.ssa_logging, SsaLogging::None) {
self.ssa.normalize_ids();
}

let print_ssa_pass = match &self.ssa_logging {
SsaLogging::None => false,
SsaLogging::All => true,
Expand All @@ -505,7 +510,6 @@ impl SsaBuilder {
}
};
if print_ssa_pass {
self.ssa.normalize_ids();
println!("After {msg}:\n{}", self.ssa);
}
self
Expand Down

0 comments on commit cb14d25

Please sign in to comment.