From: Andreas Zwinkau Date: Tue, 31 May 2011 10:56:27 +0000 (+0200) Subject: optimize_blocks ignores unreachable blocks X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;ds=sidebyside;h=c9665fa5c7f6a7ebef2e44ee48a8b4c5f102cf92;p=libfirm optimize_blocks ignores unreachable blocks Fixes opt/ioet.c --- diff --git a/ir/opt/cfopt.c b/ir/opt/cfopt.c index 308fe0fb2..99b9116f9 100644 --- a/ir/opt/cfopt.c +++ b/ir/opt/cfopt.c @@ -283,6 +283,11 @@ static void optimize_blocks(ir_node *b, void *ctx) ir_node **in; merge_env *env = (merge_env*)ctx; + if (get_Block_dom_depth(b) < 0) { + /* ignore unreachable blocks */ + return; + } + /* Count the number of predecessor if this block is merged with pred blocks that are empty. */ max_preds = 0;