Skip to content

Commit

Permalink
default bytecode size increase of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm committed Jan 31, 2025
1 parent a739ae0 commit 9a393fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/noirc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pub struct CompileOptions {
/// as it required fewer SSA instructions.
/// A higher value results in fewer jumps but a larger program.
/// A lower value keeps the original program if it was smaller, even if it has more jumps.
#[arg(long, hide = true, allow_hyphen_values = true, default_value_t = i32::MAX)]
#[arg(long, hide = true, allow_hyphen_values = true, default_value_t = 0)]
pub max_bytecode_increase_percent: i32,

/// Use pedantic ACVM solving, i.e. double-check some black-box function
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_evaluator/src/ssa/opt/unrolling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl Ssa {

// Take a snapshot in case we have to restore it.
let orig_function =
(max_bytecode_increase_percent == i32::MAX && is_brillig).then(|| function.clone());
(max_bytecode_increase_percent < i32::MAX && is_brillig).then(|| function.clone());

// We must be able to unroll ACIR loops at this point, so exit on failure to unroll.
let has_unrolled = function.unroll_loops_iteratively()?;
Expand Down

0 comments on commit 9a393fd

Please sign in to comment.