From 75f98ed6473ca183c28a55d1bdc568f79e27055b Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:48:00 +0100 Subject: [PATCH] chore: move SSA checks to a new folder (#5434) # Description ## Problem\* Resolves ## Summary\* This PR separates read-only checks on the SSA from the passes which modify it as part of the compilation process. ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --- compiler/noirc_evaluator/src/ssa.rs | 1 + .../src/ssa/{opt => checks}/check_for_underconstrained_values.rs | 0 compiler/noirc_evaluator/src/ssa/checks/mod.rs | 1 + compiler/noirc_evaluator/src/ssa/opt/mod.rs | 1 - 4 files changed, 2 insertions(+), 1 deletion(-) rename compiler/noirc_evaluator/src/ssa/{opt => checks}/check_for_underconstrained_values.rs (100%) create mode 100644 compiler/noirc_evaluator/src/ssa/checks/mod.rs diff --git a/compiler/noirc_evaluator/src/ssa.rs b/compiler/noirc_evaluator/src/ssa.rs index e1182f17bcd..820374df9c1 100644 --- a/compiler/noirc_evaluator/src/ssa.rs +++ b/compiler/noirc_evaluator/src/ssa.rs @@ -36,6 +36,7 @@ use self::{ }; mod acir_gen; +mod checks; pub(super) mod function_builder; pub mod ir; mod opt; diff --git a/compiler/noirc_evaluator/src/ssa/opt/check_for_underconstrained_values.rs b/compiler/noirc_evaluator/src/ssa/checks/check_for_underconstrained_values.rs similarity index 100% rename from compiler/noirc_evaluator/src/ssa/opt/check_for_underconstrained_values.rs rename to compiler/noirc_evaluator/src/ssa/checks/check_for_underconstrained_values.rs diff --git a/compiler/noirc_evaluator/src/ssa/checks/mod.rs b/compiler/noirc_evaluator/src/ssa/checks/mod.rs new file mode 100644 index 00000000000..4f1831e5bb0 --- /dev/null +++ b/compiler/noirc_evaluator/src/ssa/checks/mod.rs @@ -0,0 +1 @@ +mod check_for_underconstrained_values; diff --git a/compiler/noirc_evaluator/src/ssa/opt/mod.rs b/compiler/noirc_evaluator/src/ssa/opt/mod.rs index 56484ced290..4e5fa262696 100644 --- a/compiler/noirc_evaluator/src/ssa/opt/mod.rs +++ b/compiler/noirc_evaluator/src/ssa/opt/mod.rs @@ -7,7 +7,6 @@ mod array_set; mod as_slice_length; mod assert_constant; mod bubble_up_constrains; -mod check_for_underconstrained_values; mod constant_folding; mod defunctionalize; mod die;