add note/error message about critical edge splitting and IJmps
authorMatthias Braun <matze@braunis.de>
Mon, 1 Jun 2009 09:53:40 +0000 (09:53 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 1 Jun 2009 09:53:40 +0000 (09:53 +0000)
[r26084]

ir/opt/critical_edges.c

index e839f89..cca885a 100644 (file)
@@ -72,6 +72,12 @@ static void walk_critical_cf_edges(ir_node *n, void *env) {
                                        continue;
                                goto insert;
                        }
+                       if (is_IJmp(pre)) {
+                               /* we can't add blocks in between ijmp and its destinations
+                                * TODO: What now, we can't split all critical edges because of this... */
+                               fprintf(stderr, "libfirm warning: Couldn't split all critical edges (compiler will probably fail now)\n");
+                               continue;
+                       }
                        /* we don't want place nodes in the start block, so handle it like forking */
                        if (is_op_forking(cfop) || cfop == op_Start) {
                                /* Predecessor has multiple successors. Insert new control flow edge edges. */