Update skeleton

This commit is contained in:
Jeehoon Kang
2020-05-18 18:57:21 +09:00
parent 773eeda067
commit e81247ba54
58 changed files with 49447 additions and 16 deletions

View File

@@ -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();
}

View File

@@ -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