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
3801847ccd
commit
5cc6a5b9e8
@ -408,10 +408,10 @@ map<u256, u256> const& Assembly::optimiseInternal(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This only modifies PushTags, we have to run again to actually remove code.
|
// This only modifies PushTags, we have to run again to actually remove code.
|
||||||
// TODO: investigate options for EOF.
|
if (_settings.runDeduplicate)
|
||||||
if (_settings.runDeduplicate && !m_eofVersion.has_value())
|
for (auto& section: m_codeSections)
|
||||||
{
|
{
|
||||||
BlockDeduplicator deduplicator{m_codeSections.front().items};
|
BlockDeduplicator deduplicator{section.items};
|
||||||
if (deduplicator.deduplicate())
|
if (deduplicator.deduplicate())
|
||||||
{
|
{
|
||||||
for (auto const& replacement: deduplicator.replacedTags())
|
for (auto const& replacement: deduplicator.replacedTags())
|
||||||
|
Loading…
Reference in New Issue
Block a user