Skip to content

Commit 81f1de2

Browse files
authored
Merge pull request #12747 from ethereum/removeUnusedAssemblyEntryPoint
Remove unused entry point to evmasm Assembly.
2 parents 7c91dd0 + 06820e1 commit 81f1de2

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

libevmasm/Assembly.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -397,26 +397,6 @@ AssemblyItem Assembly::newImmutableAssignment(string const& _identifier)
397397
return AssemblyItem{AssignImmutable, h};
398398
}
399399

400-
Assembly& Assembly::optimise(bool _enable, EVMVersion _evmVersion, bool _isCreation, size_t _runs)
401-
{
402-
OptimiserSettings settings;
403-
settings.isCreation = _isCreation;
404-
settings.runInliner = true;
405-
settings.runJumpdestRemover = true;
406-
settings.runPeephole = true;
407-
if (_enable)
408-
{
409-
settings.runDeduplicate = true;
410-
settings.runCSE = true;
411-
settings.runConstantOptimiser = true;
412-
}
413-
settings.evmVersion = _evmVersion;
414-
settings.expectedExecutionsPerDeployment = _runs;
415-
optimise(settings);
416-
return *this;
417-
}
418-
419-
420400
Assembly& Assembly::optimise(OptimiserSettings const& _settings)
421401
{
422402
optimiseInternal(_settings, {});

libevmasm/Assembly.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,6 @@ class Assembly
134134
/// is optimised according to the settings in @a _settings.
135135
Assembly& optimise(OptimiserSettings const& _settings);
136136

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

0 commit comments

Comments
 (0)