-/* Add condition COND into predicate list of basic block BB. */
-
-static void
-add_to_predicate_list (basic_block bb, tree new_cond)
-{
- tree cond = bb->aux;
-
- if (cond)
- cond = fold_build2 (TRUTH_OR_EXPR, boolean_type_node,
- unshare_expr (cond), new_cond);
- else
- cond = new_cond;
-
- bb->aux = cond;
-}
-
-/* Add condition COND into BB's predicate list. PREV_COND is
- existing condition. */
-
-static tree
-add_to_dst_predicate_list (struct loop * loop, edge e,
- tree prev_cond, tree cond,
- block_stmt_iterator *bsi)
-{
- tree new_cond = NULL_TREE;
-
- if (!flow_bb_inside_loop_p (loop, e->dest))
- return NULL_TREE;
-
- if (prev_cond == boolean_true_node || !prev_cond)
- new_cond = unshare_expr (cond);
- else
- {
- tree tmp;
- tree tmp_stmt = NULL_TREE;
-
- prev_cond = force_gimple_operand_bsi (bsi, unshare_expr (prev_cond),
- true, NULL, true, BSI_SAME_STMT);
-
- cond = force_gimple_operand_bsi (bsi, unshare_expr (cond),
- true, NULL, true, BSI_SAME_STMT);
-
- /* Add the condition to aux field of the edge. In case edge
- destination is a PHI node, this condition will be ANDed with
- block predicate to construct complete condition. */
- e->aux = cond;
-
- /* new_cond == prev_cond AND cond */
- tmp = build2 (TRUTH_AND_EXPR, boolean_type_node,
- unshare_expr (prev_cond), cond);
- tmp_stmt = ifc_temp_var (boolean_type_node, tmp);
- bsi_insert_before (bsi, tmp_stmt, BSI_SAME_STMT);
- new_cond = GIMPLE_STMT_OPERAND (tmp_stmt, 0);
- }
- add_to_predicate_list (e->dest, new_cond);
- return new_cond;
-}
-
-/* During if-conversion aux field from basic block structure is used to hold
- predicate list. Clean each basic block's predicate list for the given LOOP.
- Also clean aux field of successor edges, used to hold true and false
- condition from conditional expression. */