diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-29 17:14:17 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-29 17:14:17 +0000 |
commit | c814c39ca0056e6c646aac87b829bb6e0a46a13e (patch) | |
tree | 56d60098b27c2abeef7761bd662de734c8b07672 /gcc/tree-if-conv.c | |
parent | 157d6abe2b28fdff90eaa49e29fca64f85e46cf9 (diff) | |
download | gcc-c814c39ca0056e6c646aac87b829bb6e0a46a13e.tar.gz |
Do not use annotations on edges in if-conversion.
2010-05-29 Sebastian Pop <sebastian.pop@amd.com>
* tree-if-conv.c (add_to_dst_predicate_list): Do not use the ->aux
field on edges.
(predicate_bbs): Same.
(clean_predicate_lists): Same.
(find_phi_replacement_condition): Do not AND the predicate from
edge->aux.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160030 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 70 |
1 files changed, 15 insertions, 55 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 2729bf3cf15..45ce388891d 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -163,15 +163,8 @@ add_to_dst_predicate_list (struct loop *loop, edge e, if (prev_cond == boolean_true_node || !prev_cond) new_cond = unshare_expr (cond); else - { - /* Add the condition COND to the e->aux field. In case the edge - destination is a PHI node, this condition will be added to - the block predicate to construct a complete condition. */ - e->aux = cond; - - new_cond = fold_build2 (TRUTH_AND_EXPR, boolean_type_node, - unshare_expr (prev_cond), cond); - } + new_cond = fold_build2 (TRUTH_AND_EXPR, boolean_type_node, + unshare_expr (prev_cond), cond); add_to_predicate_list (e->dest, new_cond); return new_cond; @@ -469,12 +462,12 @@ get_loop_body_in_if_conv_order (const struct loop *loop) /* Returns true when the analysis of the predicates for all the basic blocks in LOOP succeeded. - predicate_bbs first clears the ->aux fields of the edges and basic - blocks. These fields are then initialized with the tree - expressions representing the predicates under which a basic block - is executed in the LOOP. As the loop->header is executed at each - iteration, it has the "true" predicate. Other statements executed - under a condition are predicated with that condition, for example + predicate_bbs first clears the ->aux fields of the basic blocks. + These fields are then initialized with the tree expressions + representing the predicates under which a basic block is executed + in the LOOP. As the loop->header is executed at each iteration, it + has the "true" predicate. Other statements executed under a + condition are predicated with that condition, for example | if (x) | S1; @@ -490,18 +483,7 @@ predicate_bbs (loop_p loop) unsigned int i; for (i = 0; i < loop->num_nodes; i++) - { - edge e; - edge_iterator ei; - basic_block bb = ifc_bbs [i]; - gimple_stmt_iterator itr = gsi_start_phis (bb); - - if (!gsi_end_p (itr)) - FOR_EACH_EDGE (e, ei, bb->preds) - e->aux = NULL; - - bb->aux = NULL; - } + ifc_bbs[i]->aux = NULL; for (i = 0; i < loop->num_nodes; i++) { @@ -714,26 +696,18 @@ if_convertible_loop_p (struct loop *loop) /* During if-conversion, the bb->aux field is used to hold a predicate list. This function cleans for all the basic blocks in the given - LOOP their predicate list. It also cleans up the e->aux field of - all the successor edges: e->aux is used to hold the true and false - conditions for conditional expressions. */ + LOOP their predicate list. */ static void clean_predicate_lists (struct loop *loop) { - basic_block *bb; unsigned int i; - edge e; - edge_iterator ei; + basic_block *bbs = get_loop_body (loop); - bb = get_loop_body (loop); for (i = 0; i < loop->num_nodes; i++) - { - bb[i]->aux = NULL; - FOR_EACH_EDGE (e, ei, bb[i]->succs) - e->aux = NULL; - } - free (bb); + bbs[i]->aux = NULL; + + free (bbs); } /* Basic block BB has two predecessors. Using predecessor's bb->aux @@ -799,12 +773,6 @@ find_phi_replacement_condition (struct loop *loop, { *cond = (tree) (second_edge->src)->aux; - /* If there is a condition on an incoming edge, add it to the - incoming bb predicate. */ - if (second_edge->aux) - *cond = build2 (TRUTH_AND_EXPR, boolean_type_node, - *cond, (tree) second_edge->aux); - if (TREE_CODE (*cond) == TRUTH_NOT_EXPR) *cond = invert_truthvalue (*cond); else @@ -812,15 +780,7 @@ find_phi_replacement_condition (struct loop *loop, first_edge = second_edge; } else - { - *cond = (tree) (first_edge->src)->aux; - - /* If there is a condition on an incoming edge, add it to the - incoming bb predicate. */ - if (first_edge->aux) - *cond = build2 (TRUTH_AND_EXPR, boolean_type_node, - *cond, (tree) first_edge->aux); - } + *cond = (tree) (first_edge->src)->aux; /* Gimplify the condition: the vectorizer prefers to have gimple values as conditions. Various targets use different means to |