mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
OptimiserSuite: Extract the code for repeating a sequence into runSequenceUntilStable()
- Define a constant for the maximum number of repeats of the optimisation string
This commit is contained in:
@@ -45,6 +45,8 @@ struct Object;
|
||||
class OptimiserSuite
|
||||
{
|
||||
public:
|
||||
static constexpr size_t MaxRounds = 12;
|
||||
|
||||
enum class Debug
|
||||
{
|
||||
None,
|
||||
@@ -60,6 +62,11 @@ public:
|
||||
);
|
||||
|
||||
void runSequence(std::vector<std::string> const& _steps, Block& _ast);
|
||||
void runSequenceUntilStable(
|
||||
std::vector<std::string> const& _steps,
|
||||
Block& _ast,
|
||||
size_t maxRounds = MaxRounds
|
||||
);
|
||||
|
||||
static std::map<std::string, std::unique_ptr<OptimiserStep>> const& allSteps();
|
||||
static std::map<std::string, char> const& stepNameToAbbreviationMap();
|
||||
|
||||
Reference in New Issue
Block a user