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