From 9902db1950efe9a438573e1a9faa3c4984f2b5af Mon Sep 17 00:00:00 2001 From: Klaus Treichel Date: Sat, 8 May 2010 14:59:50 +0200 Subject: [PATCH] Don't merge an empty block if the address of the block was used. --- ChangeLog | 5 +++++ jit/jit-block.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3cb6dde..7d5c0a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-05-08 Klaus Treichel + + * jit/jit-block.c (_jit_block_clean_cfg): Don't merge an empty block + if the block's address was used. + 2010-01-24 Klaus Treichel * jit/jit-insn.c (jit_insn_branch_if, jit_insn_branch_if_not): Fix diff --git a/jit/jit-block.c b/jit/jit-block.c index ea4a0bb..5c5eda8 100644 --- a/jit/jit-block.c +++ b/jit/jit-block.c @@ -778,7 +778,8 @@ _jit_block_clean_cfg(jit_function_t func) && (block->succs[0]->flags == _JIT_EDGE_BRANCH || block->succs[0]->flags == _JIT_EDGE_FALLTHRU)) { - if(is_empty_block(block)) + if(block->address_of == 0 && + is_empty_block(block)) { /* Remove empty block */ #ifdef _JIT_BLOCK_DEBUG -- 2.47.3