Add inlining for old optimizer.

This commit is contained in:
Daniel Kirchner
2021-02-09 19:08:58 +01:00
parent e777cad78a
commit cb74a45fd6
43 changed files with 1463 additions and 74 deletions
@@ -67,6 +67,7 @@ struct OptimiserSettings
{
OptimiserSettings s;
s.runOrderLiterals = true;
s.runInliner = true;
s.runJumpdestRemover = true;
s.runPeephole = true;
s.runDeduplicate = true;
@@ -87,6 +88,7 @@ struct OptimiserSettings
{
return
runOrderLiterals == _other.runOrderLiterals &&
runInliner == _other.runInliner &&
runJumpdestRemover == _other.runJumpdestRemover &&
runPeephole == _other.runPeephole &&
runDeduplicate == _other.runDeduplicate &&
@@ -101,6 +103,8 @@ struct OptimiserSettings
/// Move literals to the right of commutative binary operators during code generation.
/// This helps exploiting associativity.
bool runOrderLiterals = false;
/// Inliner
bool runInliner = false;
/// Non-referenced jump destination remover.
bool runJumpdestRemover = false;
/// Peephole optimizer