mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #8220 from ethereum/remove-var-name-cleaner-from-optimiser-suite-step-list
Remove var name cleaner from optimiser suite step list
This commit is contained in:
commit
2afcfec77b
@ -308,9 +308,7 @@ void OptimiserSuite::run(
|
|||||||
if (ast.statements.size() > 1 && std::get<Block>(ast.statements.front()).statements.empty())
|
if (ast.statements.size() > 1 && std::get<Block>(ast.statements.front()).statements.empty())
|
||||||
ast.statements.erase(ast.statements.begin());
|
ast.statements.erase(ast.statements.begin());
|
||||||
}
|
}
|
||||||
suite.runSequence({
|
VarNameCleaner::run(suite.m_context, ast);
|
||||||
VarNameCleaner::name
|
|
||||||
}, ast);
|
|
||||||
|
|
||||||
*_object.analysisInfo = AsmAnalyzer::analyzeStrictAssertCorrect(_dialect, _object);
|
*_object.analysisInfo = AsmAnalyzer::analyzeStrictAssertCorrect(_dialect, _object);
|
||||||
}
|
}
|
||||||
@ -366,9 +364,9 @@ map<string, unique_ptr<OptimiserStep>> const& OptimiserSuite::allSteps()
|
|||||||
SSATransform,
|
SSATransform,
|
||||||
StructuralSimplifier,
|
StructuralSimplifier,
|
||||||
UnusedPruner,
|
UnusedPruner,
|
||||||
VarDeclInitializer,
|
VarDeclInitializer
|
||||||
VarNameCleaner
|
|
||||||
>();
|
>();
|
||||||
|
// Does not include VarNameCleaner because it destroys the property of unique names.
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,10 @@ struct Dialect;
|
|||||||
* renumbered by their base name.
|
* renumbered by their base name.
|
||||||
* Function names are not modified.
|
* 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
|
* Prerequisites: Disambiguator, FunctionHoister, FunctionGrouper
|
||||||
*/
|
*/
|
||||||
class VarNameCleaner: public ASTModifier
|
class VarNameCleaner: public ASTModifier
|
||||||
|
@ -180,6 +180,8 @@ public:
|
|||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
VarNameCleaner::run(context, *m_ast);
|
VarNameCleaner::run(context, *m_ast);
|
||||||
|
// VarNameCleaner destroys the unique names guarantee of the disambiguator.
|
||||||
|
disambiguated = false;
|
||||||
break;
|
break;
|
||||||
case 'x':
|
case 'x':
|
||||||
ExpressionSplitter::run(context, *m_ast);
|
ExpressionSplitter::run(context, *m_ast);
|
||||||
|
Loading…
Reference in New Issue
Block a user