X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeabihelper.c;h=b9576094adf4e48b6b8ea9271c934e7fefa56f09;hb=5f96b99f27bdc9773b090295487fd41d03d9263b;hp=7d3efb5126b355d9640f3ec0e4b66680a72054b2;hpb=5c34afb830f4a9233b659c95a9f71643f8421f86;p=libfirm diff --git a/ir/be/beabihelper.c b/ir/be/beabihelper.c index 7d3efb512..b9576094a 100644 --- a/ir/be/beabihelper.c +++ b/ir/be/beabihelper.c @@ -411,7 +411,7 @@ static ir_node *add_to_keep(ir_node *last_keep, return last_keep; } -static void add_missing_keep_walker(ir_node *node, void *data) +void be_add_missing_keeps_node(ir_node *node) { int n_outs, i; unsigned *found_projs; @@ -419,7 +419,7 @@ static void add_missing_keep_walker(ir_node *node, void *data) ir_mode *mode = get_irn_mode(node); ir_node *last_keep; ir_node **existing_projs; - (void) data; + if (mode != mode_T) { if (!has_real_user(node)) { const arch_register_req_t *req = arch_get_irn_register_req(node); @@ -483,6 +483,12 @@ static void add_missing_keep_walker(ir_node *node, void *data) } } +static void add_missing_keep_walker(ir_node *node, void *data) +{ + (void)data; + be_add_missing_keeps_node(node); +} + void be_add_missing_keeps(ir_graph *irg) { irg_walk_graph(irg, add_missing_keep_walker, NULL, NULL); @@ -582,10 +588,10 @@ static int cmp_call_dependency(const void *c1, const void *c2) * We MUST NOT order c > a and b > c. */ h1 = get_irn_height(heights, n1); h2 = get_irn_height(heights, n2); - if (h1 < h2) return -1; - if (h1 > h2) return 1; + if (h1 < h2) return 1; + if (h1 > h2) return -1; /* Same height, so use a random (but stable) order */ - return get_irn_idx(n1) - get_irn_idx(n2); + return get_irn_idx(n2) - get_irn_idx(n1); } /**