Added FunctionSpecializer to the optimization suite

This commit is contained in:
hrkrshnn 2020-11-26 18:51:32 +01:00
parent 22ebdc7438
commit 45a3747701
2 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,7 @@ struct OptimiserSettings
"xarulrul" // Prune a bit more in SSA "xarulrul" // Prune a bit more in SSA
"xarrcL" // Turn into SSA again and simplify "xarrcL" // Turn into SSA again and simplify
"gvif" // Run full inliner "gvif" // Run full inliner
"CTUcarrLsTOtfDncarrIulc" // SSA plus simplify "CTUcarrLsTFOtfDncarrIulc" // SSA plus simplify
"]" "]"
"jmuljuljul VcTOcul jmul"; // Make source short and pretty "jmuljuljul VcTOcul jmul"; // Make source short and pretty

View File

@ -41,6 +41,7 @@
#include <libyul/optimiser/ForLoopConditionOutOfBody.h> #include <libyul/optimiser/ForLoopConditionOutOfBody.h>
#include <libyul/optimiser/ForLoopInitRewriter.h> #include <libyul/optimiser/ForLoopInitRewriter.h>
#include <libyul/optimiser/ForLoopConditionIntoBody.h> #include <libyul/optimiser/ForLoopConditionIntoBody.h>
#include <libyul/optimiser/FunctionSpecializer.h>
#include <libyul/optimiser/ReasoningBasedSimplifier.h> #include <libyul/optimiser/ReasoningBasedSimplifier.h>
#include <libyul/optimiser/Rematerialiser.h> #include <libyul/optimiser/Rematerialiser.h>
#include <libyul/optimiser/UnusedFunctionParameterPruner.h> #include <libyul/optimiser/UnusedFunctionParameterPruner.h>
@ -192,6 +193,7 @@ map<string, unique_ptr<OptimiserStep>> const& OptimiserSuite::allSteps()
FullInliner, FullInliner,
FunctionGrouper, FunctionGrouper,
FunctionHoister, FunctionHoister,
FunctionSpecializer,
LiteralRematerialiser, LiteralRematerialiser,
LoadResolver, LoadResolver,
LoopInvariantCodeMotion, LoopInvariantCodeMotion,
@ -231,6 +233,7 @@ map<string, char> const& OptimiserSuite::stepNameToAbbreviationMap()
{FullInliner::name, 'i'}, {FullInliner::name, 'i'},
{FunctionGrouper::name, 'g'}, {FunctionGrouper::name, 'g'},
{FunctionHoister::name, 'h'}, {FunctionHoister::name, 'h'},
{FunctionSpecializer::name, 'F'},
{LiteralRematerialiser::name, 'T'}, {LiteralRematerialiser::name, 'T'},
{LoadResolver::name, 'L'}, {LoadResolver::name, 'L'},
{LoopInvariantCodeMotion::name, 'M'}, {LoopInvariantCodeMotion::name, 'M'},