1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-27 19:50:10 +00:00

Working on optimizing constant loop heads (Pass2LoopHeadConstantIdentification). #246

This commit is contained in:
jespergravgaard 2019-08-04 08:49:34 +02:00
parent 3d0f0b648d
commit af5bb803c1
2 changed files with 4 additions and 2 deletions

View File

@ -305,8 +305,8 @@ public class Compiler {
optimizations.add(new PassNSimplifyExpressionWithZero(program));
optimizations.add(new PassNEliminateUnusedVars(program, true));
optimizations.add(new Pass2EliminateUnusedBlocks(program));
//optimizations.add(new PassNStatementIndices(program));
//optimizations.add(new Pass2LoopHeadConstantIdentification(program));
optimizations.add(new PassNStatementIndices(program));
optimizations.add(new Pass2LoopHeadConstantIdentification(program));
return optimizations;
}

View File

@ -38,6 +38,8 @@ public class Pass2LoopHeadConstantIdentification extends Pass2SsaOptimization {
return true;
}
}
// TODO: Move to Program
new PassNStatementIndices(getProgram()).clearStatementIndices();
return false;
}