Refactor: Replace optimization level with boolean flag
The optimizer now uses a simple boolean flag (`optimization`) instead of an `optimization_level` (u32). This simplifies the optimizer's logic and makes it easier to enable or disable optimizations. The command-line interface and internal testing have been updated to reflect this change.
This commit is contained in:
+4
-4
@@ -31,15 +31,15 @@ struct Cli {
|
||||
#[arg(short, long)]
|
||||
trace: bool,
|
||||
|
||||
/// Optimization level (0: None, 1: Cracking, 2: Aggressive)
|
||||
#[arg(short, long, default_value_t = 0)]
|
||||
opt: u32,
|
||||
/// Disable optimization
|
||||
#[arg(long)]
|
||||
no_opt: bool,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let cli = Cli::parse();
|
||||
let mut env = Environment::new();
|
||||
env.optimization_level = cli.opt;
|
||||
env.optimization = !cli.no_opt;
|
||||
|
||||
if cli.bench || cli.update_bench {
|
||||
if cfg!(debug_assertions) {
|
||||
|
||||
Reference in New Issue
Block a user