mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-14 22:38:46 +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();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ name: kecc
|
||||
args:
|
||||
- parse:
|
||||
long: parse
|
||||
help: Parses the input file
|
||||
help: Parses the input C file
|
||||
- print:
|
||||
short: p
|
||||
long: print
|
||||
@@ -17,6 +17,9 @@ args:
|
||||
- irprint:
|
||||
long: irprint
|
||||
help: Prints the input IR AST
|
||||
- irrun:
|
||||
long: irrun
|
||||
help: Executes the input file
|
||||
- optimize:
|
||||
short: O
|
||||
long: optimize
|
||||
|
||||
Reference in New Issue
Block a user