File tree 1 file changed +2
-4
lines changed
crates/noirc_evaluator/src/ssa_refactor/opt
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -157,16 +157,14 @@ use crate::ssa_refactor::{
157
157
mod branch_analysis;
158
158
159
159
impl Ssa {
160
- /// Flattens the control flow graph of each function such that the function is left with a
160
+ /// Flattens the control flow graph of main such that the function is left with a
161
161
/// single block containing all instructions and no more control-flow.
162
162
///
163
163
/// This pass will modify any instructions with side effects in particular, often multiplying
164
164
/// them by jump conditions to maintain correctness even when all branches of a jmpif are inlined.
165
165
/// For more information, see the module-level comment at the top of this file.
166
166
pub ( crate ) fn flatten_cfg ( mut self ) -> Ssa {
167
- for function in self . functions . values_mut ( ) {
168
- flatten_function_cfg ( function) ;
169
- }
167
+ flatten_function_cfg ( self . main_mut ( ) ) ;
170
168
self
171
169
}
172
170
}
You can’t perform that action at this time.
0 commit comments