optimize_blocks ignores unreachable blocks
authorAndreas Zwinkau <zwinkau@kit.edu>
Tue, 31 May 2011 10:56:27 +0000 (12:56 +0200)
committerAndreas Zwinkau <zwinkau@kit.edu>
Tue, 31 May 2011 10:56:27 +0000 (12:56 +0200)
Fixes opt/ioet.c

ir/opt/cfopt.c

index 308fe0f..99b9116 100644 (file)
@@ -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;