From: Aditya Kumar Date: Thu, 19 Nov 2015 20:35:12 +0000 (+0000) Subject: fix bootstrap without ISL on old linkers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09b574dda9435d300108fa98e1f5afd873ee9001;p=gcc.git fix bootstrap without ISL on old linkers With and without this patch passes bootstrap on x86_64-linux with and without ISL. The problem occurs on systems with older linkers that do not remove dead symbols. From-SVN: r230625 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 096b0698791..cf75f440b46 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-11-19 Aditya Kumar + + * graphite-isl-ast-to-gimple.c (get_true_edge_from_guard_bb): Move... + (get_false_edge_from_guard_bb): Move... + * sese.c (get_false_edge_from_guard_bb) + (get_true_edge_from_guard_bb): ... here. + 2015-11-19 David Edelsohn Revert diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index 3e0907de30d..e84f7387e8a 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-isl-ast-to-gimple.c @@ -1125,38 +1125,6 @@ translate_isl_ast_to_gimple::translate_isl_ast (loop_p context_loop, } } -/* Returns the first successor edge of BB with EDGE_TRUE_VALUE flag set. */ - -edge -get_true_edge_from_guard_bb (basic_block bb) -{ - edge e; - edge_iterator ei; - - FOR_EACH_EDGE (e, ei, bb->succs) - if (e->flags & EDGE_TRUE_VALUE) - return e; - - gcc_unreachable (); - return NULL; -} - -/* Returns the first successor edge of BB with EDGE_TRUE_VALUE flag cleared. */ - -edge -get_false_edge_from_guard_bb (basic_block bb) -{ - edge e; - edge_iterator ei; - - FOR_EACH_EDGE (e, ei, bb->succs) - if (!(e->flags & EDGE_TRUE_VALUE)) - return e; - - gcc_unreachable (); - return NULL; -} - /* Return true when BB contains loop close phi nodes. A loop close phi node is at the exit of loop which takes one argument that is the last value of the variable being used out of the loop. */ diff --git a/gcc/sese.c b/gcc/sese.c index 94fcc114499..b5da428ff83 100644 --- a/gcc/sese.c +++ b/gcc/sese.c @@ -355,6 +355,38 @@ outermost_loop_in_sese (sese_l ®ion, basic_block bb) return nest; } +/* Returns the first successor edge of BB with EDGE_TRUE_VALUE flag set. */ + +edge +get_true_edge_from_guard_bb (basic_block bb) +{ + edge e; + edge_iterator ei; + + FOR_EACH_EDGE (e, ei, bb->succs) + if (e->flags & EDGE_TRUE_VALUE) + return e; + + gcc_unreachable (); + return NULL; +} + +/* Returns the first successor edge of BB with EDGE_TRUE_VALUE flag cleared. */ + +edge +get_false_edge_from_guard_bb (basic_block bb) +{ + edge e; + edge_iterator ei; + + FOR_EACH_EDGE (e, ei, bb->succs) + if (!(e->flags & EDGE_TRUE_VALUE)) + return e; + + gcc_unreachable (); + return NULL; +} + /* Sets the false region of an IF_REGION to REGION. */ void diff --git a/gcc/sese.h b/gcc/sese.h index c3d4c9adae5..626a077b1db 100644 --- a/gcc/sese.h +++ b/gcc/sese.h @@ -236,9 +236,9 @@ typedef struct ifsese_s { extern void if_region_set_false_region (ifsese, sese_info_p); extern ifsese move_sese_in_condition (sese_info_p); +extern void set_ifsese_condition (ifsese, tree); extern edge get_true_edge_from_guard_bb (basic_block); extern edge get_false_edge_from_guard_bb (basic_block); -extern void set_ifsese_condition (ifsese, tree); static inline edge if_region_entry (ifsese if_region)