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:
parent
3d0f0b648d
commit
af5bb803c1
@ -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;
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,8 @@ public class Pass2LoopHeadConstantIdentification extends Pass2SsaOptimization {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// TODO: Move to Program
|
||||
new PassNStatementIndices(getProgram()).clearStatementIndices();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user