Skip to content

Commit

Permalink
fix: remove bit shifts once ACIR has been consolidated into a single …
Browse files Browse the repository at this point in the history
…block.
  • Loading branch information
TomAFrench committed Feb 8, 2024
1 parent 0a914ff commit 3dbdca7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/noirc_evaluator/src/ssa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ pub(crate) fn optimize_into_acir(
let ssa = SsaBuilder::new(program, print_ssa_passes, force_brillig_output)?
.run_pass(Ssa::defunctionalize, "After Defunctionalization:")
.run_pass(Ssa::inline_functions, "After Inlining:")
.run_pass(Ssa::remove_bit_shifts, "After Removing Bit Shifts:")
// Run mem2reg with the CFG separated into blocks
.run_pass(Ssa::mem2reg, "After Mem2Reg:")
.try_run_pass(Ssa::evaluate_assert_constant, "After Assert Constant:")?
Expand All @@ -61,6 +60,7 @@ pub(crate) fn optimize_into_acir(
// and this pass is missed, slice merging will fail inside of flattening.
.run_pass(Ssa::mem2reg, "After Mem2Reg:")
.run_pass(Ssa::flatten_cfg, "After Flattening:")
.run_pass(Ssa::remove_bit_shifts, "After Removing Bit Shifts:")
// Run mem2reg once more with the flattened CFG to catch any remaining loads/stores
.run_pass(Ssa::mem2reg, "After Mem2Reg:")
.run_pass(Ssa::fold_constants, "After Constant Folding:")
Expand Down

0 comments on commit 3dbdca7

Please sign in to comment.