1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-23 23:32:55 +00:00

Added all current verbosity options.

This commit is contained in:
jespergravgaard 2018-10-16 17:29:00 +02:00
parent 9cf226348c
commit 17cb00955c
2 changed files with 95 additions and 1 deletions

View File

@ -84,6 +84,30 @@ public class CompileLog {
return log;
}
public void setVerboseLoopUnroll(boolean verboseLoopUnroll) {
this.verboseLoopUnroll = verboseLoopUnroll;
}
public void setVerboseLoopAnalysis(boolean verboseLoopAnalysis) {
this.verboseLoopAnalysis = verboseLoopAnalysis;
}
public void setVerboseNonOptimization(boolean verboseNonOptimization) {
this.verboseNonOptimization = verboseNonOptimization;
}
public void setVerboseSequencePlan(boolean verboseSequencePlan) {
this.verboseSequencePlan = verboseSequencePlan;
}
public void setVerboseParse(boolean verboseParse) {
this.verboseParse = verboseParse;
}
public void setVerboseCreateSsa(boolean verboseCreateSsa) {
this.verboseCreateSsa = verboseCreateSsa;
}
public boolean isVerboseUplift() {
return verboseUplift;
}

View File

@ -54,9 +54,39 @@ public class KickC implements Callable<Void> {
@CommandLine.Option(names = {"-v" }, description = "Verbose output describing the compilation process")
private boolean verbose= false;
@CommandLine.Option(names = {"-vfragment" }, description = "Verbosity Option. Synthesis of ASM fragments is printed during compilation.")
@CommandLine.Option(names = {"-vparse" }, description = "Verbosity Option. File Parsing.")
private boolean verboseParse = false;
@CommandLine.Option(names = {"-vcreate" }, description = "Verbosity Option. Creation of the Single Static Assignment Control Flow Graph.")
private boolean verboseCreateSsa = false;
@CommandLine.Option(names = {"-voptimize" }, description = "Verbosity Option. Control Flow Graph Optimization.")
private boolean verboseSSAOptimize = false;
@CommandLine.Option(names = {"-vnonoptimize" }, description = "Verbosity Option. Choices not to optimize.")
private boolean verboseNonOptimization = false;
@CommandLine.Option(names = {"-vsequence" }, description = "Verbosity Option. Sequence Plan.")
private boolean verboseSequencePlan = false;
@CommandLine.Option(names = {"-vloop" }, description = "Verbosity Option. Loop Analysis.")
private boolean verboseLoopAnalysis = false;
@CommandLine.Option(names = {"-vliverange" }, description = "Verbosity Option. Variable Live Range Analysis.")
private boolean verboseLiveRanges = false;
@CommandLine.Option(names = {"-vuplift" }, description = "Verbosity Option. Variable Register Uplift Combination Optimization.")
private boolean verboseUplift = false;
@CommandLine.Option(names = {"-vunroll" }, description = "Verbosity Option. Loop Unrolling.")
private boolean verboseLoopUnroll = false;
@CommandLine.Option(names = {"-vfragment" }, description = "Verbosity Option. Synthesis of Assembler fragments.")
private boolean verboseFragments= false;
@CommandLine.Option(names = {"-vasmoptimize" }, description = "Verbosity Option. Assembler optimization.")
private boolean verboseAsmOptimize = false;
public static void main(String[] args) {
CommandLine.call(new KickC(), args);
}
@ -107,10 +137,50 @@ public class KickC implements Callable<Void> {
compiler.getLog().setSysOut(true);
}
if(verboseParse) {
compiler.getLog().setVerboseParse(true);
compiler.getLog().setSysOut(true);
}
if(verboseCreateSsa) {
compiler.getLog().setVerboseCreateSsa(true);
compiler.getLog().setSysOut(true);
}
if(verboseSSAOptimize) {
compiler.getLog().setVerboseSSAOptimize(true);
compiler.getLog().setSysOut(true);
}
if(verboseNonOptimization) {
compiler.getLog().setVerboseNonOptimization(true);
compiler.getLog().setSysOut(true);
}
if(verboseSequencePlan) {
compiler.getLog().setVerboseSequencePlan(true);
compiler.getLog().setSysOut(true);
}
if(verboseLoopAnalysis) {
compiler.getLog().setVerboseLoopAnalysis(true);
compiler.getLog().setSysOut(true);
}
if(verboseLoopUnroll) {
compiler.getLog().setVerboseLoopUnroll(true);
compiler.getLog().setSysOut(true);
}
if(verboseLiveRanges) {
compiler.getLog().setVerboseLiveRanges(true);
compiler.getLog().setSysOut(true);
}
if(verboseUplift) {
compiler.getLog().setVerboseUplift(true);
compiler.getLog().setSysOut(true);
}
if(verboseFragments) {
compiler.getLog().setVerboseFragmentLog(true);
compiler.getLog().setSysOut(true);
}
if(verboseAsmOptimize) {
compiler.getLog().setVerboseAsmOptimize(true);
compiler.getLog().setSysOut(true);
}
System.out.println("Compiling " + kcFile);
Program program = compiler.compile(kcFile.toString());