Skip to content

Commit

Permalink
Merge 3902c3f into bcb438b
Browse files Browse the repository at this point in the history
  • Loading branch information
sirasistant authored Sep 25, 2024
2 parents bcb438b + 3902c3f commit 8162f41
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions compiler/noirc_evaluator/src/ssa/ir/function_inserter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::ssa::ir::types::Type;
use super::{
basic_block::BasicBlockId,
dfg::{CallStack, InsertInstructionResult},
function::{Function, RuntimeType},
function::Function,
instruction::{Instruction, InstructionId},
value::ValueId,
};
Expand Down Expand Up @@ -46,14 +46,7 @@ impl<'f> FunctionInserter<'f> {
if let Some(fetched_value) =
self.const_arrays.get(&(new_array.clone(), typ.clone()))
{
// Arrays in ACIR are immutable, but in Brillig arrays are copy-on-write
// so for function's with a Brillig runtime we make sure to check that value
// in our constants array map matches the resolved array value id.
if matches!(self.function.runtime(), RuntimeType::Acir(_)) {
return *fetched_value;
} else if *fetched_value == value {
return value;
}
return *fetched_value;
};

let new_array_clone = new_array.clone();
Expand Down

0 comments on commit 8162f41

Please sign in to comment.