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:
Kamil Śliwak
2020-04-16 15:23:38 +02:00
parent 10879bcae6
commit 1b4e06605d
2 changed files with 113 additions and 133 deletions
+7
View File
@@ -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();