mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make ReasoningBasedSimplifier available as step.
This commit is contained in:
parent
2d7e28769a
commit
9bcc2f1713
@ -41,6 +41,7 @@
|
||||
#include <libyul/optimiser/ForLoopConditionOutOfBody.h>
|
||||
#include <libyul/optimiser/ForLoopInitRewriter.h>
|
||||
#include <libyul/optimiser/ForLoopConditionIntoBody.h>
|
||||
#include <libyul/optimiser/ReasoningBasedSimplifier.h>
|
||||
#include <libyul/optimiser/Rematerialiser.h>
|
||||
#include <libyul/optimiser/UnusedFunctionParameterPruner.h>
|
||||
#include <libyul/optimiser/UnusedPruner.h>
|
||||
@ -184,6 +185,7 @@ map<string, unique_ptr<OptimiserStep>> const& OptimiserSuite::allSteps()
|
||||
LoopInvariantCodeMotion,
|
||||
NameSimplifier,
|
||||
RedundantAssignEliminator,
|
||||
ReasoningBasedSimplifier,
|
||||
Rematerialiser,
|
||||
SSAReverser,
|
||||
SSATransform,
|
||||
@ -221,6 +223,7 @@ map<string, char> const& OptimiserSuite::stepNameToAbbreviationMap()
|
||||
{LoadResolver::name, 'L'},
|
||||
{LoopInvariantCodeMotion::name, 'M'},
|
||||
{NameSimplifier::name, 'N'},
|
||||
{ReasoningBasedSimplifier::name, 'R'},
|
||||
{RedundantAssignEliminator::name, 'r'},
|
||||
{Rematerialiser::name, 'm'},
|
||||
{SSAReverser::name, 'V'},
|
||||
|
@ -158,8 +158,7 @@ public:
|
||||
map<char, string> const& extraOptions = {
|
||||
{'#', "quit"},
|
||||
{',', "VarNameCleaner"},
|
||||
{';', "StackCompressor"},
|
||||
{'R', "ReasoningBasedSimplifier"}
|
||||
{';', "StackCompressor"}
|
||||
};
|
||||
|
||||
printUsageBanner(abbreviationMap, extraOptions, 4);
|
||||
@ -192,12 +191,6 @@ public:
|
||||
StackCompressor::run(m_dialect, obj, true, 16);
|
||||
break;
|
||||
}
|
||||
case 'R':
|
||||
{
|
||||
ReasoningBasedSimplifier::run(context, *m_ast);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
cerr << "Unknown option." << endl;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ BOOST_AUTO_TEST_CASE(output_operator_should_create_concise_and_unambiguous_strin
|
||||
|
||||
BOOST_TEST(chromosome.length() == allSteps.size());
|
||||
BOOST_TEST(chromosome.optimisationSteps() == allSteps);
|
||||
BOOST_TEST(toString(chromosome) == "flcCUnDvejsxIOoighTLMNrmVatpud");
|
||||
BOOST_TEST(toString(chromosome) == "flcCUnDvejsxIOoighTLMNRrmVatpud");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(optimisationSteps_should_translate_chromosomes_genes_to_optimisation_step_names)
|
||||
|
Loading…
Reference in New Issue
Block a user