Remove unused entry point to evmasm Assembly.

This commit is contained in:
Daniel Kirchner 2022-03-07 12:14:08 +01:00
parent 7c91dd05a7
commit 06820e1b1e
2 changed files with 0 additions and 27 deletions

View File

@ -397,26 +397,6 @@ AssemblyItem Assembly::newImmutableAssignment(string const& _identifier)
return AssemblyItem{AssignImmutable, h}; return AssemblyItem{AssignImmutable, h};
} }
Assembly& Assembly::optimise(bool _enable, EVMVersion _evmVersion, bool _isCreation, size_t _runs)
{
OptimiserSettings settings;
settings.isCreation = _isCreation;
settings.runInliner = true;
settings.runJumpdestRemover = true;
settings.runPeephole = true;
if (_enable)
{
settings.runDeduplicate = true;
settings.runCSE = true;
settings.runConstantOptimiser = true;
}
settings.evmVersion = _evmVersion;
settings.expectedExecutionsPerDeployment = _runs;
optimise(settings);
return *this;
}
Assembly& Assembly::optimise(OptimiserSettings const& _settings) Assembly& Assembly::optimise(OptimiserSettings const& _settings)
{ {
optimiseInternal(_settings, {}); optimiseInternal(_settings, {});

View File

@ -134,13 +134,6 @@ public:
/// is optimised according to the settings in @a _settings. /// is optimised according to the settings in @a _settings.
Assembly& optimise(OptimiserSettings const& _settings); Assembly& optimise(OptimiserSettings const& _settings);
/// Modify (if @a _enable is set) and return the current assembly such that creation and
/// execution gas usage is optimised. @a _isCreation should be true for the top-level assembly.
/// @a _runs specifes an estimate on how often each opcode in this assembly will be executed,
/// i.e. use a small value to optimise for size and a large value to optimise for runtime.
/// If @a _enable is not set, will perform some simple peephole optimizations.
Assembly& optimise(bool _enable, langutil::EVMVersion _evmVersion, bool _isCreation, size_t _runs);
/// Create a text representation of the assembly. /// Create a text representation of the assembly.
std::string assemblyString( std::string assemblyString(
langutil::DebugInfoSelection const& _debugInfoSelection = langutil::DebugInfoSelection::Default(), langutil::DebugInfoSelection const& _debugInfoSelection = langutil::DebugInfoSelection::Default(),