1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-08-01 02:29:30 +00:00

Re-added -Onoloophead option.

This commit is contained in:
jespergravgaard 2019-09-02 22:55:04 +02:00
parent bb75c245a5
commit 2afd9bd3c0
2 changed files with 9 additions and 0 deletions

View File

@ -56,6 +56,10 @@ public class Compiler {
this.enableLoopHeadConstant = true;
}
void disableLoopHeadConstant() {
this.enableLoopHeadConstant = false;
}
void setTargetPlatform(TargetPlatform targetPlatform) {
program.setTargetPlatform(targetPlatform);
}

View File

@ -69,6 +69,9 @@ public class KickC implements Callable<Void> {
@CommandLine.Option(names = {"-Oloophead"}, description = "Optimization Option. Enabled experimental loop-head constant pass which identifies loops where the condition is constant on the first iteration.")
private boolean optimizeLoopHeadConstant = false;
@CommandLine.Option(names = {"-Onoloophead"}, description = "Optimization Option. Disabled experimental loop-head constant pass which identifies loops where the condition is constant on the first iteration.")
private boolean optimizeNoLoopHeadConstant = false;
@CommandLine.Option(names = {"-Ocache"}, description = "Optimization Option. Enables a fragment cache file.")
private boolean optimizeFragmentCache = false;
@ -220,6 +223,8 @@ public class KickC implements Callable<Void> {
if(optimizeLoopHeadConstant) {
compiler.enableLoopHeadConstant();
} else if(optimizeNoLoopHeadConstant) {
compiler.disableLoopHeadConstant();
}
if(linkScript!=null) {