mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Limit max chunk size in CommonSubexpressionEliminator::feedItems
This commit is contained in:
parent
b74a27e946
commit
63f53a19dd
@ -179,7 +179,12 @@ AssemblyItemIterator CommonSubexpressionEliminator::feedItems(
|
||||
)
|
||||
{
|
||||
assertThrow(!m_breakingItem, OptimizerException, "Invalid use of CommonSubexpressionEliminator.");
|
||||
for (; _iterator != _end && !SemanticInformation::breaksCSEAnalysisBlock(*_iterator, _msizeImportant); ++_iterator)
|
||||
unsigned const maxChunkSize = 1000;
|
||||
for (
|
||||
unsigned chunkSize = 0;
|
||||
_iterator != _end && !SemanticInformation::breaksCSEAnalysisBlock(*_iterator, _msizeImportant) && chunkSize < maxChunkSize;
|
||||
++_iterator, ++chunkSize
|
||||
)
|
||||
feedItem(*_iterator);
|
||||
if (_iterator != _end)
|
||||
m_breakingItem = &(*_iterator++);
|
||||
|
Loading…
Reference in New Issue
Block a user