From ac9b31d6231e617541b54048d4063a3997be4b18 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 26 Nov 2020 16:40:48 +0100 Subject: [PATCH] Abort early if the optimizer sequence is empty. --- libyul/optimiser/Suite.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libyul/optimiser/Suite.cpp b/libyul/optimiser/Suite.cpp index f07a16c83..af9c93715 100644 --- a/libyul/optimiser/Suite.cpp +++ b/libyul/optimiser/Suite.cpp @@ -364,6 +364,9 @@ void OptimiserSuite::runSequenceUntilStable( size_t maxRounds ) { + if (_steps.empty()) + return; + size_t codeSize = 0; for (size_t rounds = 0; rounds < maxRounds; ++rounds) {