mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-01-06 00:33:42 +00:00
Removed -O0 switch
This commit is contained in:
parent
8925a57955
commit
487c06fbbc
@ -29,9 +29,6 @@ public class Compiler {
|
||||
/** The number of combinations to test when uplifting variables into registers. */
|
||||
private int upliftCombinations = 100;
|
||||
|
||||
/** Tell the compiler to mimimize optimizations to increase performance. */
|
||||
private boolean optimizeMinimal = false;
|
||||
|
||||
public Compiler() {
|
||||
this.program = new Program();
|
||||
}
|
||||
@ -40,10 +37,6 @@ public class Compiler {
|
||||
this.upliftCombinations = upliftCombinations;
|
||||
}
|
||||
|
||||
public void setOptimizeMinimal(boolean optimizeMinimal) {
|
||||
this.optimizeMinimal = optimizeMinimal;
|
||||
}
|
||||
|
||||
public void setLog(CompileLog compileLog) {
|
||||
program.setLog(compileLog);
|
||||
}
|
||||
@ -472,23 +465,21 @@ public class Compiler {
|
||||
} while(change);
|
||||
getLog().append(program.getRegisterPotentials().toString());
|
||||
|
||||
if(!optimizeMinimal) {
|
||||
// Find register uplift scopes
|
||||
getLog().append("REGISTER UPLIFT SCOPES");
|
||||
new Pass4RegisterUpliftScopeAnalysis(program).findScopes();
|
||||
getLog().append(program.getRegisterUpliftProgram().toString((program.getVariableRegisterWeights())));
|
||||
// Find register uplift scopes
|
||||
getLog().append("REGISTER UPLIFT SCOPES");
|
||||
new Pass4RegisterUpliftScopeAnalysis(program).findScopes();
|
||||
getLog().append(program.getRegisterUpliftProgram().toString((program.getVariableRegisterWeights())));
|
||||
|
||||
// Attempt uplifting registers through a lot of combinations
|
||||
//getLog().setVerboseUplift(true);
|
||||
new Pass4RegisterUpliftCombinations(program).performUplift(upliftCombinations);
|
||||
// Attempt uplifting registers through a lot of combinations
|
||||
//getLog().setVerboseUplift(true);
|
||||
new Pass4RegisterUpliftCombinations(program).performUplift(upliftCombinations);
|
||||
|
||||
//getLog().setVerboseUplift(true);
|
||||
//new Pass4RegisterUpliftStatic(program).performUplift();
|
||||
//getLog().setVerboseUplift(false);
|
||||
//getLog().setVerboseUplift(true);
|
||||
//new Pass4RegisterUpliftStatic(program).performUplift();
|
||||
//getLog().setVerboseUplift(false);
|
||||
|
||||
// Attempt uplifting registers one at a time to catch remaining potential not realized by combination search
|
||||
new Pass4RegisterUpliftRemains(program).performUplift(upliftCombinations);
|
||||
}
|
||||
// Attempt uplifting registers one at a time to catch remaining potential not realized by combination search
|
||||
new Pass4RegisterUpliftRemains(program).performUplift(upliftCombinations);
|
||||
|
||||
// Final register coalesce and finalization
|
||||
new Pass4ZeroPageCoalesceAssignment(program).coalesce();
|
||||
|
@ -54,9 +54,6 @@ public class KickC implements Callable<Void> {
|
||||
@CommandLine.Option(names = {"-Ouplift" }, description = "Optimization Option. Number of combinations to test when uplifting variables to registers in a scope. By default 100 combinations are tested.")
|
||||
private Integer optimizeUpliftCombinations = null;
|
||||
|
||||
@CommandLine.Option(names = {"-O0" }, description = "Optimization Option. Perform minimal optimization to increase the speed of the compiler.")
|
||||
private boolean optimizeMinimal = false;
|
||||
|
||||
@CommandLine.Option(names = {"-v" }, description = "Verbose output describing the compilation process")
|
||||
private boolean verbose= false;
|
||||
|
||||
@ -161,10 +158,6 @@ public class KickC implements Callable<Void> {
|
||||
compiler.setUpliftCombinations(optimizeUpliftCombinations);
|
||||
}
|
||||
|
||||
if(optimizeMinimal) {
|
||||
compiler.setOptimizeMinimal(true);
|
||||
}
|
||||
|
||||
System.out.println("Compiling " + kcFile);
|
||||
Program program = null;
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user