mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-15 23:18:48 +00:00
Update skeleton
This commit is contained in:
@@ -96,7 +96,7 @@ fn compile_ir(
|
||||
SimplifyCfg::default().optimize(input);
|
||||
}
|
||||
|
||||
if matches.is_present("mem2erg") {
|
||||
if matches.is_present("mem2reg") {
|
||||
Mem2reg::default().optimize(input);
|
||||
}
|
||||
|
||||
@@ -114,6 +114,12 @@ fn compile_ir(
|
||||
return;
|
||||
}
|
||||
|
||||
if matches.is_present("irrun") {
|
||||
let result = ir::interp(input, Vec::new()).unwrap();
|
||||
println!("[result] {:?}", result);
|
||||
return;
|
||||
}
|
||||
|
||||
let asm = ok_or_exit!(Asmgen::default().translate(input), 1);
|
||||
write(&asm, output).unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user