Skip to content

Commit

Permalink
Extract replace_unused_array_instructions_with_bounds_checks optimi…
Browse files Browse the repository at this point in the history
…zation
  • Loading branch information
asterite committed Aug 9, 2024
1 parent 4b9538d commit ef07ccb
Show file tree
Hide file tree
Showing 5 changed files with 467 additions and 406 deletions.
5 changes: 5 additions & 0 deletions compiler/noirc_evaluator/src/ssa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub(super) mod function_builder;
pub mod ir;
mod opt;
pub mod ssa_gen;
mod unused;

pub struct SsaEvaluatorOptions {
/// Emit debug information for the intermediate SSA IR
Expand Down Expand Up @@ -113,6 +114,10 @@ pub(crate) fn optimize_into_acir(
.run_pass(Ssa::fold_constants, "After Constant Folding:")
.run_pass(Ssa::remove_enable_side_effects, "After EnableSideEffects removal:")
.run_pass(Ssa::fold_constants_using_constraints, "After Constraint Folding:")
.run_pass(
Ssa::replace_unused_array_instructions_with_bounds_checks,
"After replacing unused array instructions with bounds checks:",
)
.run_pass(Ssa::dead_instruction_elimination, "After Dead Instruction Elimination:")
.run_pass(Ssa::array_set_optimization, "After Array Set Optimizations:")
.finish();
Expand Down
Loading

0 comments on commit ef07ccb

Please sign in to comment.