Skip to content

Commit

Permalink
Revert "LibJS/Bytecode: Don't replace the entry block in MergeBlocks"
Browse files Browse the repository at this point in the history
This reverts commit acd29e0.
  • Loading branch information
awesomekling committed Mar 6, 2024
1 parent cf81bf4 commit b37d84b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b37d84b

Please sign in to comment.