OptimiserSuite: Remove VarNameCleaner from the list of available steps

This commit is contained in:
cameel
2020-01-30 17:35:27 +01:00
committed by chriseth
parent e41155cf48
commit 2ee7e6042b
2 changed files with 7 additions and 5 deletions
+3 -5
View File
@@ -308,9 +308,7 @@ void OptimiserSuite::run(
if (ast.statements.size() > 1 && std::get<Block>(ast.statements.front()).statements.empty())
ast.statements.erase(ast.statements.begin());
}
suite.runSequence({
VarNameCleaner::name
}, ast);
VarNameCleaner::run(suite.m_context, ast);
*_object.analysisInfo = AsmAnalyzer::analyzeStrictAssertCorrect(_dialect, _object);
}
@@ -366,9 +364,9 @@ map<string, unique_ptr<OptimiserStep>> const& OptimiserSuite::allSteps()
SSATransform,
StructuralSimplifier,
UnusedPruner,
VarDeclInitializer,
VarNameCleaner
VarDeclInitializer
>();
// Does not include VarNameCleaner because it destroys the property of unique names.
return instance;
}
+4
View File
@@ -39,6 +39,10 @@ struct Dialect;
* renumbered by their base name.
* Function names are not modified.
*
* NOTE: This step destroys the promise of the Disambiguator and thus cannot
* be used in the main loop of the optimizer without running the disambiguator again.
* Because of that, it is not included in the step list of the Optimizer Suite.
*
* Prerequisites: Disambiguator, FunctionHoister, FunctionGrouper
*/
class VarNameCleaner: public ASTModifier