From b37d84be5836a3dfe39da8b96f2fc5bee8a7df50 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 6 Mar 2024 08:36:13 +0100 Subject: [PATCH] Revert "LibJS/Bytecode: Don't replace the entry block in MergeBlocks" This reverts commit acd29e064cc6a41cc889294aa2c6f81251817c07. --- Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp b/Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp index 33016144368..89cdcd28d2c 100644 --- a/Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp @@ -36,8 +36,7 @@ void MergeBlocks::perform(PassPipelineExecutable& executable) if (entry.key->terminator()->type() != Instruction::Type::Jump) continue; - // NOTE: We can't replace the first block in a function, as it's the entry block. - if (entry.key != executable.executable.basic_blocks.first()) { + { InstructionStreamIterator it { entry.key->instruction_stream() }; auto& first_instruction = *it; if (first_instruction.type() == Instruction::Type::Jump) {