From: Klaus Treichel Date: Sat, 8 May 2010 12:59:50 +0000 (+0200) Subject: Don't merge an empty block if the address of the block was used. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=9902db1950efe9a438573e1a9faa3c4984f2b5af;p=francis%2Flibjit.git Don't merge an empty block if the address of the block was used. --- 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