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
5 changes: 5 additions & 0 deletions compiler/noirc_evaluator/src/ssa/opt/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ impl Function {
/// This restriction lets this function largely ignore merging intermediate results from other
/// blocks and handling loops.
pub(crate) fn remove_paired_rc(&mut self) {
if !self.runtime().is_brillig() {
// dec_rc and inc_rc only have an effect in Brillig
return;
}

// `dec_rc` is only issued for parameters currently so we can speed things
// up a bit by skipping any functions without them.
if !contains_array_parameter(self) {
Expand Down
Loading