From c66905a18999b5c4be2678a7829b6703f902e341 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 8 Oct 2024 18:20:28 +0200 Subject: [PATCH] Avoid multiple lookups during body-copying while inlining. --- libyul/optimiser/FullInliner.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libyul/optimiser/FullInliner.cpp b/libyul/optimiser/FullInliner.cpp index df18a687f477..328ef83b8e7b 100644 --- a/libyul/optimiser/FullInliner.cpp +++ b/libyul/optimiser/FullInliner.cpp @@ -363,8 +363,5 @@ Statement BodyCopier::operator()(FunctionDefinition const&) YulName BodyCopier::translateIdentifier(YulName _name) { - if (m_variableReplacements.count(_name)) - return m_variableReplacements.at(_name); - else - return _name; + return util::valueOrDefault(m_variableReplacements, _name, _name); }