mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Per-function deduplication.
This commit is contained in:
parent
5b9e4c47a3
commit
e032af795e
@ -408,10 +408,10 @@ map<u256, u256> const& Assembly::optimiseInternal(
|
||||
}
|
||||
|
||||
// This only modifies PushTags, we have to run again to actually remove code.
|
||||
// TODO: investigate options for EOF.
|
||||
if (_settings.runDeduplicate && !m_eofVersion.has_value())
|
||||
if (_settings.runDeduplicate)
|
||||
for (auto& section: m_codeSections)
|
||||
{
|
||||
BlockDeduplicator deduplicator{m_codeSections.front().items};
|
||||
BlockDeduplicator deduplicator{section.items};
|
||||
if (deduplicator.deduplicate())
|
||||
{
|
||||
for (auto const& replacement: deduplicator.replacedTags())
|
||||
|
Loading…
Reference in New Issue
Block a user