diff options
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r-- | gcc/ipa-split.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index 6c8cdbd4bb7..d239316cbdc 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -206,7 +206,7 @@ verify_non_ssa_vars (struct split_point *current, bitmap non_ssa_vars, && !bitmap_bit_p (current->split_bbs, e->src->index)) { worklist.safe_push (e->src); - bitmap_set_bit (&seen, e->src->index); + seen.set_bit (e->src->index); } while (!worklist.is_empty ()) @@ -216,7 +216,7 @@ verify_non_ssa_vars (struct split_point *current, bitmap non_ssa_vars, FOR_EACH_EDGE (e, ei, bb->preds) if (e->src != ENTRY_BLOCK_PTR - && bitmap_set_bit (&seen, e->src->index)) + && seen.set_bit (e->src->index)) { gcc_checking_assert (!bitmap_bit_p (current->split_bbs, e->src->index)); @@ -333,7 +333,7 @@ check_forbidden_calls (gimple stmt) else forbidden_bb = true_edge->dest; - bitmap_set_bit (forbidden_dominators, forbidden_bb->index); + forbidden_dominators->set_bit (forbidden_bb->index); } } @@ -514,7 +514,7 @@ consider_split (struct split_point *current, bitmap non_ssa_vars, /* When there are non-ssa vars used in the split region, see if they are used in the header region. If so, reject the split. FIXME: we can use nested function support to access both. */ - if (!bitmap_empty_p (non_ssa_vars) + if (!non_ssa_vars->is_empty () && !verify_non_ssa_vars (current, non_ssa_vars, return_bb)) { if (dump_file && (dump_flags & TDF_DETAILS)) @@ -525,7 +525,7 @@ consider_split (struct split_point *current, bitmap non_ssa_vars, /* If the split point is dominated by a forbidden block, reject the split. */ - if (!bitmap_empty_p (forbidden_dominators) + if (!forbidden_dominators->is_empty () && dominated_by_forbidden (current->entry_bb)) { if (dump_file && (dump_flags & TDF_DETAILS)) @@ -720,7 +720,7 @@ mark_nonssa_use (gimple stmt ATTRIBUTE_UNUSED, tree t, void *data) && auto_var_in_fn_p (t, current_function_decl)) || TREE_CODE (t) == RESULT_DECL || TREE_CODE (t) == LABEL_DECL) - bitmap_set_bit ((bitmap)data, DECL_UID (t)); + ((bitmap)data)->set_bit (DECL_UID (t)); /* For DECL_BY_REFERENCE, the return value is actually a pointer. We want to pretend that the value pointed to is actual result decl. */ @@ -817,9 +817,9 @@ visit_bb (basic_block bb, basic_block return_bb, } FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF) - bitmap_set_bit (set_ssa_names, SSA_NAME_VERSION (op)); + set_ssa_names->set_bit (SSA_NAME_VERSION (op)); FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE) - bitmap_set_bit (used_ssa_names, SSA_NAME_VERSION (op)); + used_ssa_names->set_bit (SSA_NAME_VERSION (op)); can_split &= !walk_stmt_load_store_addr_ops (stmt, non_ssa_vars, mark_nonssa_use, mark_nonssa_use, @@ -832,13 +832,12 @@ visit_bb (basic_block bb, basic_block return_bb, if (virtual_operand_p (gimple_phi_result (stmt))) continue; - bitmap_set_bit (set_ssa_names, - SSA_NAME_VERSION (gimple_phi_result (stmt))); + set_ssa_names->set_bit (SSA_NAME_VERSION (gimple_phi_result (stmt))); for (i = 0; i < gimple_phi_num_args (stmt); i++) { tree op = gimple_phi_arg_def (stmt, i); if (TREE_CODE (op) == SSA_NAME) - bitmap_set_bit (used_ssa_names, SSA_NAME_VERSION (op)); + used_ssa_names->set_bit (SSA_NAME_VERSION (op)); } can_split &= !walk_stmt_load_store_addr_ops (stmt, non_ssa_vars, mark_nonssa_use, @@ -857,7 +856,7 @@ visit_bb (basic_block bb, basic_block return_bb, if (virtual_operand_p (gimple_phi_result (stmt))) continue; if (TREE_CODE (op) == SSA_NAME) - bitmap_set_bit (used_ssa_names, SSA_NAME_VERSION (op)); + used_ssa_names->set_bit (SSA_NAME_VERSION (op)); else can_split &= !mark_nonssa_use (stmt, op, non_ssa_vars); } @@ -1017,7 +1016,7 @@ find_split_points (int overall_time, int overall_size) new_entry.bbs_visited = BITMAP_ALLOC (NULL); new_entry.non_ssa_vars = BITMAP_ALLOC (NULL); new_entry.can_split = true; - bitmap_set_bit (new_entry.bbs_visited, dest->index); + new_entry.bbs_visited->set_bit (dest->index); stack.safe_push (new_entry); dest->aux = (void *)(intptr_t)stack.length (); } @@ -1103,7 +1102,7 @@ split_function (struct split_point *split_point) || (ddef = ssa_default_def (cfun, parm)) == NULL_TREE || !bitmap_bit_p (split_point->ssa_names_to_pass, SSA_NAME_VERSION (ddef)))) - bitmap_set_bit (args_to_skip, num); + args_to_skip->set_bit (num); else { /* This parm might not have been used up to now, but is going to be @@ -1162,11 +1161,11 @@ split_function (struct split_point *split_point) e->count = new_return_bb->count; if (current_loops) add_bb_to_loop (new_return_bb, current_loops->tree_root); - bitmap_set_bit (split_point->split_bbs, new_return_bb->index); + split_point->split_bbs->set_bit (new_return_bb->index); } /* When we pass around the value, use existing return block. */ else - bitmap_set_bit (split_point->split_bbs, return_bb->index); + split_point->split_bbs->set_bit (return_bb->index); /* If RETURN_BB has virtual operand PHIs, they must be removed and the virtual operand marked for renaming as we change the CFG in a way that |