Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions compiler/noirc_evaluator/src/ssa/opt/loop_invariant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,7 @@ impl<'f> LoopInvariantContext<'f> {
self.set_values_defined_in_loop(loop_);

for block in loop_.blocks.iter() {
// The CFG will ultimately be entirely flattened in ACIR.
// We can leave hoisting of instructions based upon predicates as part
// of constant folding once we we have a flat CFG.
// Thus, we forego checking control dependence on ACIR as to
// avoid greater compilation cost.
if self.inserter.function.runtime().is_brillig() {
self.is_control_dependent_post_pre_header(loop_, *block);
} else {
self.current_block_control_dependent = true;
}
self.is_control_dependent_post_pre_header(loop_, *block);

for instruction_id in self.inserter.function.dfg[*block].take_instructions() {
self.transform_to_unchecked_from_loop_bounds(instruction_id);
Expand Down
Loading