This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tuples] Tidy up some interfaces in gimple.[hc]
- From: Diego Novillo <dnovillo at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 18 Oct 2007 07:53:07 -0400
- Subject: [tuples] Tidy up some interfaces in gimple.[hc]
Just a minor cleanup. This patch renames several GIMPLE functions to
start with the prefix gimple_ and adds const arguments to most of the
basic accessor functions.
No functional changes.
2007-10-17 Diego Novillo <dnovillo@google.com>
* coretypes.h (const_gimple_seq): New typedef.
* gimple.h (gimple_seq_first): Constify argument.
(gimple_seq_last): Likewise.
(gimple_seq_copy): Likewise.
(gimple_seq_empty_p): Likewise.
(gimple_set_prev): Rename from set_gimple_prev.
Update all users.
(gimple_set_next): Rename from set_gimple_next.
Update all users.
(gimple_set_flags): Rename from set_gimple_flags.
Update all users.
(gimple_add_flag): Rename from add_gimple_flag.
Update all users.
(gimple_set_subcode): Rename from set_gimple_subcode.
Update all users.
(gimple_set_block): Rename from set_gimple_block.
Update all users.
(gimple_set_locus): Rename from set_gimple_locus.
Update all users.
(gimple_locus_empty_p): Constify argument.
(gimple_has_ops): Likewise.
(gimple_has_mem_ops): Likewise.
(gimple_def_ops): Likewise.
(gimple_set_def_ops): Rename from set_gimple_def_ops.
Update all users.
(gimple_use_ops): Constify argument.
(gimple_set_use_ops): Rename from set_gimple_use_ops.
Update all users.
(gimple_vuse_ops): Constify argument.
(gimple_set_vuse_ops): Rename from set_gimple_vuse_ops.
Update all users.
(gimple_vdef_ops): Constify argument.
(gimple_set_vdef_ops): Rename from set_gimple_vdef_ops.
Update all users.
(gimple_loaded_syms): Constify argument.
(gimple_stored_syms): Constify argument.
(gimple_modified): Constify argument.
(gimple_set_modified): Rename from set_gimple_modified.
Update all users.
(gimple_omp_return_nowait_p): Constify argument.
(gimple_omp_section_last_p): Constify argument.
(gimple_omp_parallel_combined_p): Constify argument.
(gimple_build_return): Rename from build_gimple_return.
Update all users.
(gimple_build_assign): Rename from build_gimple_assign.
Update all users.
(gimple_build_assign_with_ops): Rename from
build_gimple_assign_with_ops.
Update all users.
(gimple_build_call_vec): Rename from build_gimple_call_vec.
Update all users.
(gimple_build_call): Rename from build_gimple_call.
Update all users.
(gimple_build_cond): Rename from build_gimple_cond.
Update all users.
(gimple_build_label): Rename from build_gimple_label.
Update all users.
(gimple_build_goto): Rename from build_gimple_goto.
Update all users.
(gimple_build_nop): Rename from build_gimple_nop.
Update all users.
(gimple_build_asm): Rename from build_gimple_asm.
Update all users.
(gimple_build_asm_vec): Rename from build_gimple_asm_vec.
Update all users.
(gimple_build_catch): Rename from build_gimple_catch.
Update all users.
(gimple_build_eh_filter): Rename from build_gimple_eh_filter.
Update all users.
(gimple_build_try): Rename from build_gimple_try.
Update all users.
(gimple_build_wce): Rename from build_gimple_wce.
Update all users.
(gimple_build_resx): Rename from build_gimple_resx.
Update all users.
(gimple_build_switch): Rename from build_gimple_switch.
Update all users.
(gimple_build_switch_vec): Rename from
build_gimple_switch_vec. Update all users.
(gimple_build_omp_parallel): Rename from
build_gimple_omp_parallel. Update all users.
(gimple_build_omp_for): Rename from build_gimple_omp_for.
Update all users.
(gimple_build_omp_critical): Rename from
build_gimple_omp_critical.
Update all users.
(gimple_build_omp_section): Rename from
build_gimple_omp_section. Update all users.
(gimple_build_omp_continue): Rename from
build_gimple_omp_continue. Update all users.
(gimple_build_omp_master): Rename from
build_gimple_omp_master. Update all users.
(gimple_build_omp_ordered): Rename from
build_gimple_omp_ordered. Update all users.
(gimple_build_omp_sections): Rename from
build_gimple_omp_sections. Update all users.
(gimple_build_omp_single): Rename from
build_gimple_omp_single. Update all users.
(gimple_set_body): Rename from set_gimple_body. Update all
users.
(gimple_set_bb): Rename from set_gimple_bb. Update all users.
(is_gimple_operand): Constify argument.
(gimple_ops): Likewise.
(gimple_op_ptr): Likewise.
(gimple_call_lhs): Likewise.
(gimple_call_return_type): Likewise.
(gimple_call_chain): Likewise.
(gimple_call_arg_ptr): Likewise.
(gimple_cond_true_label): Likewise.
(gimple_bind_vars): Likewise.
(gimple_bind_set_body): Likewise.
(gimple_bind_block): Likewise.
(gimple_asm_ninputs): Likewise.
(gimple_asm_noutputs): Likewise.
(gimple_asm_nclobbers): Likewise.
(gimple_asm_input_op): Likewise.
(gimple_asm_output_op): Likewise.
(gimple_asm_clobber_op): Likewise.
(gimple_asm_string): Likewise.
(gimple_asm_volatile_p): Likewise.
(gimple_catch_types): Likewise.
(gimple_catch_handler): Likewise.
(gimple_eh_filter_types): Likewise.
(gimple_eh_filter_failure): Likewise.
(gimple_try_kind): Likewise.
(gimple_try_set_eval): Likewise.
(gimple_try_set_cleanup): Likewise.
(gimple_wce_set_cleanup): Likewise.
(gimple_wce_cleanup_eh_only): Likewise.
(gimple_phi_capacity): Likewise.
(gimple_phi_num_args): Likewise.
(gimple_phi_result): Likewise.
(gimple_resx_region): Likewise.
(gimple_switch_num_labels): Likewise.
(gimple_switch_label): Likewise.
(gimple_switch_default_label): Likewise.
(gimple_omp_set_body): Likewise.
(gimple_omp_critical_name): Likewise.
(gimple_omp_for_clauses): Likewise.
(gimple_omp_for_index): Likewise.
(gimple_omp_for_initial): Likewise.
(gimple_omp_for_final): Likewise.
(gimple_omp_for_incr): Likewise.
(gimple_omp_for_set_pre_body): Likewise.
(gimple_omp_parallel_clauses): Likewise.
(gimple_omp_parallel_child_fn): Likewise.
(gimple_omp_parallel_data_arg): Likewise.
(gimple_omp_single_clauses): Likewise.
(gimple_omp_sections_clauses): Likewise.
(gimple_omp_for_cond): Likewise.
(gimple_return_retval): Likewise.
(is_gimple_omp): Likewise.
(gimple_nop_p): Likewise.
(gimple_expr_type): Likewise.
Index: value-prof.c
===================================================================
--- value-prof.c (revision 129427)
+++ value-prof.c (working copy)
@@ -537,23 +537,23 @@ gimple_divmod_fixed_value (gimple stmt,
tmpv = create_tmp_var (optype, "PROF");
tmp1 = create_tmp_var (optype, "PROF");
- stmt1 = build_gimple_assign (tmpv, fold_convert (optype, value));
- stmt2 = build_gimple_assign (tmp1, op2);
- stmt3 = build_gimple_cond (NE_EXPR, tmp1, tmpv, NULL_TREE, NULL_TREE);
+ stmt1 = gimple_build_assign (tmpv, fold_convert (optype, value));
+ stmt2 = gimple_build_assign (tmp1, op2);
+ stmt3 = gimple_build_cond (NE_EXPR, tmp1, tmpv, NULL_TREE, NULL_TREE);
gsi_insert_before (gsi, stmt1, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt2, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt3, GSI_SAME_STMT);
bb1end = stmt3;
tmp2 = create_tmp_var (optype, "PROF");
- label1 = build_gimple_label (label_decl1);
- stmt1 = build_gimple_assign_with_ops (TREE_CODE (operation), tmp2, op1, tmpv);
+ label1 = gimple_build_label (label_decl1);
+ stmt1 = gimple_build_assign_with_ops (TREE_CODE (operation), tmp2, op1, tmpv);
gsi_insert_before (gsi, label1, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt1, GSI_SAME_STMT);
bb2end = stmt1;
- label2 = build_gimple_label (label_decl2);
- stmt1 = build_gimple_assign_with_ops (TREE_CODE (operation), tmp2, op1, op2);
+ label2 = gimple_build_label (label_decl2);
+ stmt1 = gimple_build_assign_with_ops (TREE_CODE (operation), tmp2, op1, op2);
gsi_insert_before (gsi, label2, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt1, GSI_SAME_STMT);
bb3end = stmt1;
@@ -689,10 +689,10 @@ gimple_mod_pow2 (gimple stmt, tree opera
tmp2 = create_tmp_var (optype, "PROF");
tmp3 = create_tmp_var (optype, "PROF");
- stmt2 = build_gimple_assign_with_ops (PLUS_EXPR, tmp2, op2,
+ stmt2 = gimple_build_assign_with_ops (PLUS_EXPR, tmp2, op2,
build_int_cst (optype, -1));
- stmt3 = build_gimple_assign_with_ops (BIT_AND_EXPR, tmp3, tmp2, op2);
- stmt4 = build_gimple_cond (NE_EXPR, tmp3, build_int_cst (optype, 0),
+ stmt3 = gimple_build_assign_with_ops (BIT_AND_EXPR, tmp3, tmp2, op2);
+ stmt4 = gimple_build_cond (NE_EXPR, tmp3, build_int_cst (optype, 0),
NULL_TREE, NULL_TREE);
gsi_insert_before (gsi, stmt2, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt3, GSI_SAME_STMT);
@@ -700,14 +700,14 @@ gimple_mod_pow2 (gimple stmt, tree opera
bb1end = stmt4;
/* tmp2 == op2-1 inherited from previous block */
- label1 = build_gimple_label (label_decl1);
- stmt1 = build_gimple_assign_with_ops (BIT_AND_EXPR, result, op1, tmp2);
+ label1 = gimple_build_label (label_decl1);
+ stmt1 = gimple_build_assign_with_ops (BIT_AND_EXPR, result, op1, tmp2);
gsi_insert_before (gsi, label1, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt1, GSI_SAME_STMT);
bb2end = stmt1;
- label2 = build_gimple_label (label_decl2);
- stmt1 = build_gimple_assign_with_ops (TREE_CODE (operation), result, op1,
+ label2 = gimple_build_label (label_decl2);
+ stmt1 = gimple_build_assign_with_ops (TREE_CODE (operation), result, op1,
op2);
gsi_insert_before (gsi, label2, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt1, GSI_SAME_STMT);
@@ -839,9 +839,9 @@ gimple_mod_subtract (gimple stmt, tree o
gsi = gsi_for_stmt (stmt);
tmp1 = create_tmp_var (optype, "PROF");
- stmt1 = build_gimple_assign (result, op1);
- stmt2 = build_gimple_assign (tmp1, op2);
- stmt3 = build_gimple_cond (LT_EXPR, result, tmp1, NULL_TREE, NULL_TREE);
+ stmt1 = gimple_build_assign (result, op1);
+ stmt2 = gimple_build_assign (tmp1, op2);
+ stmt3 = gimple_build_cond (LT_EXPR, result, tmp1, NULL_TREE, NULL_TREE);
gsi_insert_before (gsi, stmt1, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt2, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt3, GSI_SAME_STMT);
@@ -849,9 +849,9 @@ gimple_mod_subtract (gimple stmt, tree o
if (ncounts) /* Assumed to be 0 or 1 */
{
- label1 = build_gimple_label (label_decl1);
- stmt1 = build_gimple_assign_with_ops (MINUS_EXPR, result, result, tmp1);
- stmt2 = build_gimple_cond (LT_EXPR, result, tmp1, NULL_TREE, NULL_TREE);
+ label1 = gimple_build_label (label_decl1);
+ stmt1 = gimple_build_assign_with_ops (MINUS_EXPR, result, result, tmp1);
+ stmt2 = gimple_build_cond (LT_EXPR, result, tmp1, NULL_TREE, NULL_TREE);
gsi_insert_before (gsi, label1, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt1, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt2, GSI_SAME_STMT);
@@ -859,13 +859,13 @@ gimple_mod_subtract (gimple stmt, tree o
}
/* Fallback case. */
- label2 = build_gimple_label (label_decl2);
- stmt1 = build_gimple_assign_with_ops (TREE_CODE (operation), result, tmp1, 0);
+ label2 = gimple_build_label (label_decl2);
+ stmt1 = gimple_build_assign_with_ops (TREE_CODE (operation), result, tmp1, 0);
gsi_insert_before (gsi, label2, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt1, GSI_SAME_STMT);
bb3end = stmt1;
- label3 = build_gimple_label (label_decl3);
+ label3 = gimple_build_label (label_decl3);
gsi_insert_before (gsi, label3, GSI_SAME_STMT);
/* Fix CFG. */
@@ -1062,18 +1062,18 @@ gimple_ic (gimple stmt, gimple call, str
tmpv = create_tmp_var (optype, "PROF");
tmp1 = create_tmp_var (optype, "PROF");
- stmt1 = build_gimple_assign (tmpv, unshare_expr (gimple_call_fn (call)));
+ stmt1 = gimple_build_assign (tmpv, unshare_expr (gimple_call_fn (call)));
tmp = fold_convert (optype, build_addr (direct_call->decl,
current_function_decl));
- stmt2 = build_gimple_assign (tmp1, tmp);
- stmt3 = build_gimple_cond (NE_EXPR, tmp1, tmpv, NULL_TREE, NULL_TREE);
+ stmt2 = gimple_build_assign (tmp1, tmp);
+ stmt3 = gimple_build_cond (NE_EXPR, tmp1, tmpv, NULL_TREE, NULL_TREE);
gsi_insert_before (gsi, stmt1, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt2, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt3, GSI_SAME_STMT);
bb1end = stmt3;
- label1 = build_gimple_label (label_decl1);
+ label1 = gimple_build_label (label_decl1);
stmt1 = gimple_copy (stmt);
gimple_call_set_fn (stmt,
build_addr (direct_call->decl, current_function_decl));
@@ -1081,7 +1081,7 @@ gimple_ic (gimple stmt, gimple call, str
gsi_insert_before (gsi, stmt1, GSI_SAME_STMT);
bb2end = stmt1;
- label2 = build_gimple_label (label_decl2);
+ label2 = gimple_build_label (label_decl2);
gsi_insert_before (gsi, label2, GSI_SAME_STMT);
bb3end = stmt;
@@ -1268,15 +1268,15 @@ gimple_stringop_fixed_value (gimple stmt
tmpv = create_tmp_var (optype, "PROF");
tmp1 = create_tmp_var (optype, "PROF");
- stmt1 = build_gimple_assign (tmpv, fold_convert (optype, value));
- stmt2 = build_gimple_assign (tmp1, blck_size);
- stmt3 = build_gimple_cond (NE_EXPR, tmp1, tmpv, NULL_TREE, NULL_TREE);
+ stmt1 = gimple_build_assign (tmpv, fold_convert (optype, value));
+ stmt2 = gimple_build_assign (tmp1, blck_size);
+ stmt3 = gimple_build_cond (NE_EXPR, tmp1, tmpv, NULL_TREE, NULL_TREE);
gsi_insert_before (gsi, stmt1, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt2, GSI_SAME_STMT);
gsi_insert_before (gsi, stmt3, GSI_SAME_STMT);
bb1end = stmt3;
- label1 = build_gimple_label (label_decl1);
+ label1 = gimple_build_label (label_decl1);
stmt1 = gimple_copy (stmt);
gimple_call_set_arg (stmt1, 2, value);
gsi_insert_before (gsi, label1, GSI_SAME_STMT);
@@ -1290,7 +1290,7 @@ gimple_stringop_fixed_value (gimple stmt
gcc_unreachable ();
#endif
bb2end = stmt1;
- label2 = build_gimple_label (label_decl2);
+ label2 = gimple_build_label (label_decl2);
gsi_insert_before (gsi, label2, GSI_SAME_STMT);
/* Fix CFG. */
Index: tree-gimple.c
===================================================================
--- tree-gimple.c (revision 129427)
+++ tree-gimple.c (working copy)
@@ -41,7 +41,7 @@ along with GCC; see the file COPYING3.
operand. */
bool
-is_gimple_operand (tree op)
+is_gimple_operand (const_tree op)
{
return op && get_gimple_rhs_class (TREE_CODE (op)) == GIMPLE_SINGLE_RHS;
}
Index: gimple-low.c
===================================================================
--- gimple-low.c (revision 129427)
+++ gimple-low.c (working copy)
@@ -118,7 +118,7 @@ lower_function_body (void)
/* Once the old body has been lowered, replace it with the new
lowered sequence. */
- set_gimple_body (current_function_decl, lowered_body);
+ gimple_set_body (current_function_decl, lowered_body);
i = gsi_last (lowered_body);
@@ -130,8 +130,8 @@ lower_function_body (void)
|| gimple_return_retval (VEC_last (return_statements_t,
data.return_statements)->stmt) != NULL))
{
- x = build_gimple_return (NULL);
- set_gimple_locus (x, cfun->function_end_locus);
+ x = gimple_build_return (NULL);
+ gimple_set_locus (x, cfun->function_end_locus);
gsi_link_after (i, x, GSI_CONTINUE_LINKING);
}
@@ -149,13 +149,13 @@ lower_function_body (void)
VEC_length (return_statements_t,
data.return_statements) - 1);
- x = build_gimple_label (t.label);
+ x = gimple_build_label (t.label);
gsi_link_after (i, x, GSI_CONTINUE_LINKING);
/* Remove the line number from the representative return statement.
It now fills in for many such returns. Failure to remove this
will result in incorrect results for coverage analysis. */
- set_gimple_locus (t.stmt, unknown_location);
+ gimple_set_locus (t.stmt, unknown_location);
gsi_link_after (i, t.stmt, GSI_CONTINUE_LINKING);
}
@@ -170,7 +170,7 @@ lower_function_body (void)
/* This mark will create forward edges from every call site. */
DECL_NONLOCAL (disp_label) = 1;
current_function_has_nonlocal_label = 1;
- x = build_gimple_label (disp_label);
+ x = gimple_build_label (disp_label);
gsi_link_after (i, x, GSI_CONTINUE_LINKING);
/* Build 'DISP_VAR = __builtin_setjmp_dispatcher (DISP_LABEL);'
@@ -178,12 +178,12 @@ lower_function_body (void)
disp_var = create_tmp_var (ptr_type_node, "setjmpvar");
arg = build_addr (disp_label, current_function_decl);
t = implicit_built_in_decls[BUILT_IN_SETJMP_DISPATCHER];
- x = build_gimple_call (t, 1, arg);
+ x = gimple_build_call (t, 1, arg);
gimple_call_set_lhs (x, disp_var);
/* Build 'goto DISP_VAR;' and insert. */
gsi_link_after (i, x, GSI_CONTINUE_LINKING);
- x = build_gimple_goto (disp_var);
+ x = gimple_build_goto (disp_var);
gsi_link_after (i, x, GSI_CONTINUE_LINKING);
}
@@ -264,7 +264,7 @@ lower_stmt (gimple_stmt_iterator *gsi, s
{
gimple stmt = gsi_stmt (gsi);
- set_gimple_block (stmt, data->block);
+ gimple_set_block (stmt, data->block);
switch (gimple_code (stmt))
{
@@ -667,8 +667,8 @@ lower_gimple_return (gimple_stmt_iterato
/* Generate a goto statement and remove the return statement. */
found:
- t = build_gimple_goto (tmp_rs.label);
- set_gimple_locus (t, gimple_locus (stmt));
+ t = gimple_build_goto (tmp_rs.label);
+ gimple_set_locus (t, gimple_locus (stmt));
gsi_link_before (gsi, t, GSI_SAME_STMT);
gsi_remove (gsi, false);
}
@@ -744,45 +744,45 @@ lower_builtin_setjmp (gimple_stmt_iterat
/* Build '__builtin_setjmp_setup (BUF, NEXT_LABEL)' and insert. */
arg = build_addr (next_label, current_function_decl);
t = implicit_built_in_decls[BUILT_IN_SETJMP_SETUP];
- g = build_gimple_call (t, 2, gimple_call_arg (stmt, 0));
- set_gimple_locus (g, gimple_locus (stmt));
+ g = gimple_build_call (t, 2, gimple_call_arg (stmt, 0));
+ gimple_set_locus (g, gimple_locus (stmt));
gsi_link_before (gsi, g, GSI_SAME_STMT);
/* Build 'DEST = 0' and insert. */
if (dest)
{
- g = build_gimple_assign (dest, fold_convert (TREE_TYPE (dest),
+ g = gimple_build_assign (dest, fold_convert (TREE_TYPE (dest),
integer_zero_node));
- set_gimple_locus (g, gimple_locus (stmt));
+ gimple_set_locus (g, gimple_locus (stmt));
gsi_link_before (gsi, g, GSI_SAME_STMT);
}
/* Build 'goto CONT_LABEL' and insert. */
- g = build_gimple_goto (cont_label);
+ g = gimple_build_goto (cont_label);
gsi_link_before (gsi, g, TSI_SAME_STMT);
/* Build 'NEXT_LABEL:' and insert. */
- g = build_gimple_label (next_label);
+ g = gimple_build_label (next_label);
gsi_link_before (gsi, g, GSI_SAME_STMT);
/* Build '__builtin_setjmp_receiver (NEXT_LABEL)' and insert. */
arg = build_addr (next_label, current_function_decl);
t = implicit_built_in_decls[BUILT_IN_SETJMP_RECEIVER];
- g = build_gimple_call (t, 1, arg);
- set_gimple_locus (g, gimple_locus (stmt));
+ g = gimple_build_call (t, 1, arg);
+ gimple_set_locus (g, gimple_locus (stmt));
gsi_link_before (gsi, g, GSI_SAME_STMT);
/* Build 'DEST = 1' and insert. */
if (dest)
{
- g = build_gimple_assign (dest, fold_convert (TREE_TYPE (dest),
+ g = gimple_build_assign (dest, fold_convert (TREE_TYPE (dest),
integer_one_node));
- set_gimple_locus (g, gimple_locus (stmt));
+ gimple_set_locus (g, gimple_locus (stmt));
gsi_link_before (gsi, g, GSI_SAME_STMT);
}
/* Build 'CONT_LABEL:' and insert. */
- g = build_gimple_label (cont_label);
+ g = gimple_build_label (cont_label);
gsi_link_before (gsi, g, GSI_SAME_STMT);
/* Remove the call to __builtin_setjmp. */
Index: gimple-iterator.c
===================================================================
--- gimple-iterator.c (revision 129427)
+++ gimple-iterator.c (working copy)
@@ -55,19 +55,19 @@ gsi_link_seq_before (gimple_stmt_iterato
/* Link it into the sequence. */
if (cur)
{
- set_gimple_prev (head, gimple_prev (cur));
+ gimple_set_prev (head, gimple_prev (cur));
if (gimple_prev (head))
- set_gimple_next (gimple_prev (head), head);
+ gimple_set_next (gimple_prev (head), head);
else
gimple_seq_set_first (i->seq, head);
- set_gimple_next (tail, cur);
- set_gimple_prev (cur, tail);
+ gimple_set_next (tail, cur);
+ gimple_set_prev (cur, tail);
}
else
{
- set_gimple_prev (head, gimple_seq_last (i->seq));
+ gimple_set_prev (head, gimple_seq_last (i->seq));
if (gimple_prev (head))
- set_gimple_next (gimple_prev (head), head);
+ gimple_set_next (gimple_prev (head), head);
else
gimple_seq_set_first (i->seq, head);
gimple_seq_set_last (i->seq, tail);
@@ -131,13 +131,13 @@ gsi_link_seq_after (gimple_stmt_iterator
/* Link it into the list. */
if (cur)
{
- set_gimple_next (tail, gimple_next (cur));
+ gimple_set_next (tail, gimple_next (cur));
if (gimple_next (tail))
- set_gimple_prev (gimple_next (tail), tail);
+ gimple_set_prev (gimple_next (tail), tail);
else
gimple_seq_set_last (i->seq, tail);
- set_gimple_prev (head, cur);
- set_gimple_next (cur, head);
+ gimple_set_prev (head, cur);
+ gimple_set_next (cur, head);
}
else
{
@@ -192,11 +192,11 @@ gsi_delink (gimple_stmt_iterator *i)
prev = gimple_prev (cur);
if (prev)
- set_gimple_next (prev, next);
+ gimple_set_next (prev, next);
else
gimple_seq_set_first (i->seq, next);
if (next)
- set_gimple_prev (next, prev);
+ gimple_set_prev (next, prev);
else
gimple_seq_set_last (i->seq, prev);
@@ -223,8 +223,8 @@ gsi_split_seq_after (const gimple_stmt_i
gimple_seq_set_first (new_seq, next);
gimple_seq_set_last (new_seq, gimple_seq_last (old_seq));
gimple_seq_set_last (old_seq, cur);
- set_gimple_next (cur, NULL);
- set_gimple_prev (next, NULL);
+ gimple_set_next (cur, NULL);
+ gimple_set_prev (next, NULL);
return new_seq;
}
@@ -251,9 +251,9 @@ gsi_split_seq_before (gimple_stmt_iterat
gimple_seq_set_first (new_seq, cur);
gimple_seq_set_last (new_seq, gimple_seq_last (old_seq));
gimple_seq_set_last (old_seq, prev);
- set_gimple_prev (cur, NULL);
+ gimple_set_prev (cur, NULL);
if (prev)
- set_gimple_next (prev, NULL);
+ gimple_set_next (prev, NULL);
else
gimple_seq_set_first (old_seq, NULL);
@@ -276,7 +276,7 @@ gsi_replace (gimple_stmt_iterator *gsi,
if (stmt == orig_stmt)
return;
- set_gimple_locus (stmt, gimple_locus (orig_stmt));
+ gimple_set_locus (stmt, gimple_locus (orig_stmt));
gsi_insert_before (gsi, stmt, GSI_SAME_STMT);
gsi_remove (gsi, update_eh_info);
gsi->stmt = stmt;
@@ -330,7 +330,7 @@ void
gsi_insert_before (gimple_stmt_iterator *i, gimple stmt,
enum gsi_iterator_update m)
{
- set_gimple_bb (stmt, i->bb);
+ gimple_set_bb (stmt, i->bb);
update_modified_stmt (stmt);
gsi_link_before (i, stmt, m);
}
@@ -358,7 +358,7 @@ void
gsi_insert_after (gimple_stmt_iterator *i, gimple stmt,
enum gsi_iterator_update m)
{
- set_gimple_bb (stmt, i->bb);
+ gimple_set_bb (stmt, i->bb);
update_modified_stmt (stmt);
gsi_link_after (i, stmt, m);
}
Index: tree-flow-inline.h
===================================================================
--- tree-flow-inline.h (revision 129427)
+++ tree-flow-inline.h (working copy)
@@ -332,7 +332,7 @@ mark_stmt_modified (gimple t)
if (noreturn_call_p (t) && cfun->gimple_df)
VEC_safe_push (gimple, gc, MODIFIED_NORETURN_CALLS (cfun), t);
- set_gimple_modified (t, true);
+ gimple_set_modified (t, true);
}
/* Mark statement T as modified, and update it. */
@@ -648,7 +648,7 @@ set_phi_nodes (basic_block bb, gimple_se
bb->il.gimple->phi_nodes = seq;
if (seq)
for (i = gsi_start (seq); !gsi_end_p (i); gsi_next (i))
- set_gimple_bb (gsi_stmt (i), bb);
+ gimple_set_bb (gsi_stmt (i), bb);
}
/* Return the phi argument which contains the specified use. */
Index: gimplify.c
===================================================================
--- gimplify.c (revision 129427)
+++ gimplify.c (working copy)
@@ -773,7 +773,7 @@ annotate_one_with_locus (gimple gs, loca
{
/* All gimple statements have location. */
if (gimple_locus_empty_p (gs) && should_carry_locus_p (gs))
- set_gimple_locus (gs, locus);
+ gimple_set_locus (gs, locus);
}
void
@@ -1024,11 +1024,11 @@ build_stack_save_restore (gimple *save,
{
tree tmp_var;
- *save = build_gimple_call (implicit_built_in_decls[BUILT_IN_STACK_SAVE], 0);
+ *save = gimple_build_call (implicit_built_in_decls[BUILT_IN_STACK_SAVE], 0);
tmp_var = create_tmp_var (ptr_type_node, "saved_stack");
gimple_call_set_lhs (*save, tmp_var);
- *restore = build_gimple_call (implicit_built_in_decls[BUILT_IN_STACK_RESTORE],
+ *restore = gimple_build_call (implicit_built_in_decls[BUILT_IN_STACK_RESTORE],
1, tmp_var);
}
@@ -1073,7 +1073,7 @@ gimplify_bind_expr (tree *expr_p, gimple
DECL_GIMPLE_REG_P (t) = 1;
}
- gimple_bind = build_gimple_bind (BIND_EXPR_VARS (bind_expr), NULL);
+ gimple_bind = gimple_build_bind (BIND_EXPR_VARS (bind_expr), NULL);
gimple_push_bind_expr (gimple_bind);
gimplify_ctxp->save_stack = false;
@@ -1090,7 +1090,7 @@ gimplify_bind_expr (tree *expr_p, gimple
format of the emitted code: see mx_register_decls(). */
build_stack_save_restore (&stack_save, &stack_restore);
- gs = build_gimple_try (gimple_bind_body (gimple_bind), NULL,
+ gs = gimple_build_try (gimple_bind_body (gimple_bind), NULL,
GIMPLE_TRY_FINALLY);
gimple_seq_add (gimple_try_cleanup (gs), stack_restore);
@@ -1131,7 +1131,7 @@ gimplify_return_expr (tree stmt, gimple_
|| TREE_CODE (ret_expr) == RESULT_DECL
|| ret_expr == error_mark_node)
{
- gimple ret = build_gimple_return (ret_expr);
+ gimple ret = gimple_build_return (ret_expr);
gimple_seq_add (pre_p, ret);
return GS_ALL_DONE;
}
@@ -1188,7 +1188,7 @@ gimplify_return_expr (tree stmt, gimple_
gimplify_and_add (TREE_OPERAND (stmt, 0), pre_p);
- gimple_seq_add (pre_p, build_gimple_return (result));
+ gimple_seq_add (pre_p, gimple_build_return (result));
return GS_ALL_DONE;
}
@@ -1291,16 +1291,16 @@ gimplify_loop_expr (tree *expr_p, gimple
tree saved_label = gimplify_ctxp->exit_label;
tree start_label = create_artificial_label ();
- gimple_seq_add (pre_p, build_gimple_label (start_label));
+ gimple_seq_add (pre_p, gimple_build_label (start_label));
gimplify_ctxp->exit_label = NULL_TREE;
gimplify_and_add (LOOP_EXPR_BODY (*expr_p), pre_p);
- gimple_seq_add (pre_p, build_gimple_goto (start_label));
+ gimple_seq_add (pre_p, gimple_build_goto (start_label));
if (gimplify_ctxp->exit_label)
- gimple_seq_add (pre_p, build_gimple_label (gimplify_ctxp->exit_label));
+ gimple_seq_add (pre_p, gimple_build_label (gimplify_ctxp->exit_label));
gimplify_ctxp->exit_label = saved_label;
@@ -1441,14 +1441,14 @@ gimplify_switch_expr (tree *expr_p, gimp
around the switch body. */
default_case = build3 (CASE_LABEL_EXPR, void_type_node, NULL_TREE,
NULL_TREE, create_artificial_label ());
- new_default = build_gimple_label (CASE_LABEL (default_case));
+ new_default = gimple_build_label (CASE_LABEL (default_case));
gimple_seq_add (&switch_body_seq, new_default);
}
if (!VEC_empty (tree, labels))
sort_case_labels (labels);
- gimple_switch = build_gimple_switch_vec (SWITCH_COND (switch_expr),
+ gimple_switch = gimple_build_switch_vec (SWITCH_COND (switch_expr),
default_case, labels);
gimple_seq_add (pre_p, gimple_switch);
gimple_seq_append (pre_p, &switch_body_seq);
@@ -1473,7 +1473,7 @@ gimplify_case_label_expr (tree *expr_p,
if (ctxp->case_labels)
break;
- gimple gimple_label = build_gimple_label (CASE_LABEL (*expr_p));
+ gimple gimple_label = gimple_build_label (CASE_LABEL (*expr_p));
VEC_safe_push (tree, heap, ctxp->case_labels, *expr_p);
gimple_seq_add (pre_p, gimple_label);
@@ -2288,7 +2288,7 @@ gimplify_call_expr (tree *expr_p, gimple
/* Now add the GIMPLE call to PRE_P. If WANT_VALUE is set, we need
to create the appropriate temporary for the call's LHS. */
- call = build_gimple_call_vec (fndecl ? fndecl : CALL_EXPR_FN (*expr_p), args);
+ call = gimple_build_call_vec (fndecl ? fndecl : CALL_EXPR_FN (*expr_p), args);
gimple_seq_add (pre_p, call);
if (want_value)
{
@@ -2709,17 +2709,17 @@ gimplify_cond_expr (tree *expr_p, gimple
arm2 = TREE_OPERAND (TREE_OPERAND (expr, 0), 1);
}
- gimple_cond = build_gimple_cond (pred_code, arm1, arm2, label_true,
+ gimple_cond = gimple_build_cond (pred_code, arm1, arm2, label_true,
label_false);
gimple_seq_add (pre_p, gimple_cond);
- gimple_seq_add (pre_p, build_gimple_label (label_true));
+ gimple_seq_add (pre_p, gimple_build_label (label_true));
have_then_clause_p = gimplify_stmt (&TREE_OPERAND (expr, 1), pre_p);
label_cont = create_artificial_label ();
- gimple_seq_add (pre_p, build_gimple_goto (label_cont));
- gimple_seq_add (pre_p, build_gimple_label (label_false));
+ gimple_seq_add (pre_p, gimple_build_goto (label_cont));
+ gimple_seq_add (pre_p, gimple_build_label (label_false));
have_else_clause_p = gimplify_stmt (&TREE_OPERAND (expr, 2), pre_p);
- gimple_seq_add (pre_p, build_gimple_label (label_cont));
+ gimple_seq_add (pre_p, gimple_build_label (label_cont));
gimple_pop_condition (pre_p);
@@ -2755,7 +2755,7 @@ gimplify_modify_expr_to_memcpy (tree *ex
to_ptr = build_fold_addr_expr (to);
t = implicit_built_in_decls[BUILT_IN_MEMCPY];
- gs = build_gimple_call (t, 3, to_ptr, from_ptr, size);
+ gs = gimple_build_call (t, 3, to_ptr, from_ptr, size);
if (want_value)
{
@@ -2789,7 +2789,7 @@ gimplify_modify_expr_to_memset (tree *ex
to_ptr = build_fold_addr_expr (to);
t = implicit_built_in_decls[BUILT_IN_MEMSET];
- gs = build_gimple_call (t, 3, to_ptr, integer_zero_node, size);
+ gs = gimple_build_call (t, 3, to_ptr, integer_zero_node, size);
if (want_value)
{
@@ -2965,10 +2965,10 @@ gimplify_init_ctor_eval_range (tree obje
/* Create and initialize the index variable. */
var_type = TREE_TYPE (upper);
var = create_tmp_var (var_type, NULL);
- gimple_seq_add (pre_p, build_gimple_assign (var, lower));
+ gimple_seq_add (pre_p, gimple_build_assign (var, lower));
/* Add the loop entry label. */
- gimple_seq_add (pre_p, build_gimple_label (loop_entry_label));
+ gimple_seq_add (pre_p, gimple_build_label (loop_entry_label));
/* Build the reference. */
cref = build4 (ARRAY_REF, array_elt_type, unshare_expr (object),
@@ -2983,22 +2983,22 @@ gimplify_init_ctor_eval_range (tree obje
gimplify_init_ctor_eval (cref, CONSTRUCTOR_ELTS (value),
pre_p, cleared);
else
- gimple_seq_add (pre_p, build_gimple_assign (cref, value));
+ gimple_seq_add (pre_p, gimple_build_assign (cref, value));
/* We exit the loop when the index var is equal to the upper bound. */
- gimple_seq_add (pre_p, build_gimple_cond (EQ_EXPR, var, upper,
+ gimple_seq_add (pre_p, gimple_build_cond (EQ_EXPR, var, upper,
loop_exit_label, NULL_TREE));
/* Otherwise, increment the index var... */
tmp = build2 (PLUS_EXPR, var_type, var,
fold_convert (var_type, integer_one_node));
- gimple_seq_add (pre_p, build_gimple_assign (var, tmp));
+ gimple_seq_add (pre_p, gimple_build_assign (var, tmp));
/* ...and jump back to the loop entry. */
- gimple_seq_add (pre_p, build_gimple_goto (loop_entry_label));
+ gimple_seq_add (pre_p, gimple_build_goto (loop_entry_label));
/* Add the loop exit label. */
- gimple_seq_add (pre_p, build_gimple_label (loop_exit_label));
+ gimple_seq_add (pre_p, gimple_build_label (loop_exit_label));
}
/* Return true if FDECL is accessing a field that is zero sized. */
@@ -3404,7 +3404,7 @@ gimplify_init_constructor (tree *expr_p,
{
tree lhs = TREE_OPERAND (*expr_p, 0);
tree rhs = TREE_OPERAND (*expr_p, 1);
- gimple init = build_gimple_assign (lhs, rhs);
+ gimple init = gimple_build_assign (lhs, rhs);
gimple_seq_add (pre_p, init);
*expr_p = NULL;
}
@@ -3696,7 +3696,7 @@ gimplify_modify_expr_complex_part (tree
else
new_rhs = build2 (COMPLEX_EXPR, TREE_TYPE (lhs), realpart, imagpart);
- gimple_seq_add (pre_p, build_gimple_assign (lhs, new_rhs));
+ gimple_seq_add (pre_p, gimple_build_assign (lhs, new_rhs));
*expr_p = (want_value) ? rhs : NULL_TREE;
return GS_ALL_DONE;
@@ -3812,7 +3812,7 @@ gimplify_modify_expr (tree *expr_p, gimp
SET_DECL_DEBUG_EXPR (*from_p, *to_p);
}
- assign = build_gimple_assign (unshare_expr (*to_p), unshare_expr (*from_p));
+ assign = gimple_build_assign (unshare_expr (*to_p), unshare_expr (*from_p));
gimple_seq_add (pre_p, assign);
if (gimplify_ctxp->into_ssa && is_gimple_reg (*to_p))
@@ -4275,7 +4275,7 @@ gimplify_asm_expr (tree *expr_p, gimple_
for (link = ASM_CLOBBERS (expr); link; ++i, link = TREE_CHAIN (link))
VEC_safe_push (tree, gc, clobbers, link);
- stmt = build_gimple_asm_vec (TREE_STRING_POINTER (ASM_STRING (expr)),
+ stmt = gimple_build_asm_vec (TREE_STRING_POINTER (ASM_STRING (expr)),
inputs, outputs, clobbers);
if (TREE_THIS_VOLATILE (expr))
gimple_asm_set_volatile (stmt);
@@ -4410,8 +4410,8 @@ gimple_push_cleanup (tree var ATTRIBUTE_
*/
tree flag = create_tmp_var (boolean_type_node, "cleanup");
- gimple ffalse = build_gimple_assign (flag, boolean_false_node);
- gimple ftrue = build_gimple_assign (flag, boolean_true_node);
+ gimple ffalse = gimple_build_assign (flag, boolean_false_node);
+ gimple ftrue = gimple_build_assign (flag, boolean_true_node);
cleanup = build3 (COND_EXPR, void_type_node, flag, cleanup, NULL);
wce = build1 (WITH_CLEANUP_EXPR, void_type_node, cleanup);
gimple_seq_add (&gimplify_ctxp->conditional_cleanups, ffalse);
@@ -5986,14 +5986,14 @@ gimplify_expr (tree *expr_p, gimple_seq
if (TREE_CODE (GOTO_DESTINATION (*expr_p)) != LABEL_DECL)
ret = gimplify_expr (&GOTO_DESTINATION (*expr_p), pre_p,
NULL, is_gimple_val, fb_rvalue);
- gimple_seq_add (pre_p, build_gimple_goto (GOTO_DESTINATION (*expr_p)));
+ gimple_seq_add (pre_p, gimple_build_goto (GOTO_DESTINATION (*expr_p)));
break;
case LABEL_EXPR:
ret = GS_ALL_DONE;
gcc_assert (decl_function_context (LABEL_EXPR_LABEL (*expr_p))
== current_function_decl);
- gimple_seq_add (pre_p, build_gimple_label (LABEL_EXPR_LABEL (*expr_p)));
+ gimple_seq_add (pre_p, gimple_build_label (LABEL_EXPR_LABEL (*expr_p)));
break;
case CASE_LABEL_EXPR:
@@ -6073,7 +6073,7 @@ gimplify_expr (tree *expr_p, gimple_seq
case TRY_CATCH_EXPR:
{
gimple try
- = build_gimple_try (NULL, NULL,
+ = gimple_build_try (NULL, NULL,
TREE_CODE (*expr_p) == TRY_FINALLY_EXPR ?
GIMPLE_TRY_FINALLY : GIMPLE_TRY_CATCH);
@@ -6680,13 +6680,13 @@ gimplify_body (tree *body_p, tree fndecl
outer_bind = gimple_seq_first (&seq);
if (!outer_bind)
{
- outer_bind = build_gimple_nop ();
+ outer_bind = gimple_build_nop ();
gimple_seq_add (&seq, outer_bind);
}
/* If there isn't an outer GIMPLE_BIND, add one. */
if (gimple_code (outer_bind) != GIMPLE_BIND)
- outer_bind = build_gimple_bind (NULL_TREE, &seq);
+ outer_bind = gimple_build_bind (NULL_TREE, &seq);
*body_p = NULL_TREE;
@@ -6764,13 +6764,13 @@ gimplify_function_tree (tree fndecl)
tree x;
gimple tf;
- tf = build_gimple_try (seq, NULL, GIMPLE_TRY_FINALLY);
+ tf = gimple_build_try (seq, NULL, GIMPLE_TRY_FINALLY);
x = implicit_built_in_decls[BUILT_IN_PROFILE_FUNC_EXIT];
- gimple_seq_add (gimple_try_cleanup (tf), build_gimple_call (x, 0));
+ gimple_seq_add (gimple_try_cleanup (tf), gimple_build_call (x, 0));
- bind = build_gimple_bind (NULL, NULL);
+ bind = gimple_build_bind (NULL, NULL);
x = implicit_built_in_decls[BUILT_IN_PROFILE_FUNC_ENTER];
- gimple_seq_add (gimple_bind_body (bind), build_gimple_call (x, 0));
+ gimple_seq_add (gimple_bind_body (bind), gimple_build_call (x, 0));
gimple_seq_add (gimple_bind_body (bind), tf);
}
@@ -6778,7 +6778,7 @@ gimplify_function_tree (tree fndecl)
with the new GIMPLE body. */
seq = gimple_seq_alloc ();
gimple_seq_add (seq, bind);
- set_gimple_body (fndecl, seq);
+ gimple_set_body (fndecl, seq);
DECL_SAVED_TREE (fndecl) = NULL_TREE;
current_function_decl = oldfn;
Index: coretypes.h
===================================================================
--- coretypes.h (revision 129427)
+++ coretypes.h (working copy)
@@ -55,6 +55,7 @@ union section;
typedef union section section;
struct gimple_sequence;
typedef struct gimple_sequence *gimple_seq;
+typedef const struct gimple_sequence *const_gimple_seq;
/* The major intermediate representations of GCC. */
enum ir_type {
Index: tree-mudflap.c
===================================================================
--- tree-mudflap.c (revision 129427)
+++ tree-mudflap.c (working copy)
@@ -470,8 +470,8 @@ mf_decl_cache_locals (void)
/* Build initialization nodes for the cache vars. We just load the
globals into the cache variables. */
- g = build_gimple_assign (mf_cache_shift_decl_l, mf_cache_shift_decl);
- set_gimple_locus (g, DECL_SOURCE_LOCATION (current_function_decl));
+ g = gimple_build_assign (mf_cache_shift_decl_l, mf_cache_shift_decl);
+ gimple_set_locus (g, DECL_SOURCE_LOCATION (current_function_decl));
/* FIXME tuples. */
#if 0
insert_edge_copies (g, ENTRY_BLOCK_PTR);
@@ -479,8 +479,8 @@ mf_decl_cache_locals (void)
gcc_unreachable ();
#endif
- g = build_gimple_assign (mf_cache_mask_decl_l, mf_cache_mask_decl);
- set_gimple_locus (g, DECL_SOURCE_LOCATION (current_function_decl));
+ g = gimple_build_assign (mf_cache_mask_decl_l, mf_cache_mask_decl);
+ gimple_set_locus (g, DECL_SOURCE_LOCATION (current_function_decl));
/* FIXME tuples. */
#if 0
insert_edge_copies (g, ENTRY_BLOCK_PTR);
Index: tree-nested.c
===================================================================
--- tree-nested.c (revision 129427)
+++ tree-nested.c (working copy)
@@ -362,7 +362,7 @@ init_tmp_var_with_call (struct nesting_i
t = create_tmp_var_for (info, TREE_TYPE (TREE_TYPE (gimple_call_fn (call))),
NULL);
gimple_call_set_lhs (call, t);
- set_gimple_locus (call, gimple_locus (gsi_stmt (gsi)));
+ gimple_set_locus (call, gimple_locus (gsi_stmt (gsi)));
gsi_link_before (gsi, call, GSI_SAME_STMT);
return t;
@@ -379,8 +379,8 @@ init_tmp_var (struct nesting_info *info,
gimple stmt;
t = create_tmp_var_for (info, TREE_TYPE (exp), NULL);
- stmt = build_gimple_assign (t, exp);
- set_gimple_locus (stmt, gimple_locus (gsi_stmt (gsi)));
+ stmt = gimple_build_assign (t, exp);
+ gimple_set_locus (stmt, gimple_locus (gsi_stmt (gsi)));
gsi_link_before (gsi, stmt, GSI_SAME_STMT);
return t;
@@ -409,8 +409,8 @@ save_tmp_var (struct nesting_info *info,
gimple stmt;
t = create_tmp_var_for (info, TREE_TYPE (exp), NULL);
- stmt = build_gimple_assign (exp, t);
- set_gimple_locus (stmt, gimple_locus (gsi_stmt (gsi)));
+ stmt = gimple_build_assign (exp, t);
+ gimple_set_locus (stmt, gimple_locus (gsi_stmt (gsi)));
gsi_link_after (gsi, stmt, GSI_SAME_STMT);
return t;
@@ -1454,7 +1454,7 @@ convert_nl_goto_reference (gimple stmt,
x = get_frame_field (info, target_context, field, wi->gsi);
x = build_addr (x, target_context);
x = gsi_gimplify_val (info, x, wi->gsi);
- call = build_gimple_call (implicit_built_in_decls[BUILT_IN_NONLOCAL_GOTO], 2,
+ call = gimple_build_call (implicit_built_in_decls[BUILT_IN_NONLOCAL_GOTO], 2,
build_addr (new_label, target_context), x);
gsi_replace (wi->gsi, call, false);
@@ -1494,12 +1494,12 @@ convert_nl_goto_receiver (tree *tp, int
gsi_prev (tmp_gsi);
if (gsi_end_p (tmp_gsi) || gimple_stmt_may_fallthru (gsi_stmt (tmp_gsi)))
{
- gimple stmt = build_gimple_goto (label);
+ gimple stmt = gimple_build_goto (label);
gsi_link_before (wi->gsi, stmt, GSI_SAME_STMT);
}
new_label = (tree) *slot;
- stmt = build_gimple_label (new_label);
+ stmt = gimple_build_label (new_label);
gsi_link_before (wi->gsi, stmt, GSI_SAME_STMT);
return NULL_TREE;
@@ -1556,7 +1556,7 @@ convert_tramp_reference_op (tree *tp, in
/* Do machine-specific ugliness. Normally this will involve
computing extra alignment, but it can really be anything. */
builtin = implicit_built_in_decls[BUILT_IN_ADJUST_TRAMPOLINE];
- call = build_gimple_call (builtin, 1, x);
+ call = gimple_build_call (builtin, 1, x);
x = init_tmp_var_with_call (info, wi->gsi, call);
/* Cast back to the proper function type. */
@@ -1761,7 +1761,7 @@ finalize_nesting_tree_1 (struct nesting_
y = build3 (COMPONENT_REF, TREE_TYPE (field),
root->frame_decl, field, NULL_TREE);
- stmt = build_gimple_assign (y, x);
+ stmt = gimple_build_assign (y, x);
gimple_seq_add (stmt_list, stmt);
}
}
@@ -1772,7 +1772,7 @@ finalize_nesting_tree_1 (struct nesting_
{
tree x = build3 (COMPONENT_REF, TREE_TYPE (root->chain_field),
root->frame_decl, root->chain_field, NULL_TREE);
- stmt = build_gimple_assign (x, get_chain_decl (root));
+ stmt = gimple_build_assign (x, get_chain_decl (root));
gimple_seq_add (stmt_list, stmt);
}
@@ -1800,7 +1800,7 @@ finalize_nesting_tree_1 (struct nesting_
arg1 = build_addr (x, context);
x = implicit_built_in_decls[BUILT_IN_INIT_TRAMPOLINE];
- stmt = build_gimple_call (x, 3, arg1, arg2, arg3);
+ stmt = gimple_build_call (x, 3, arg1, arg2, arg3);
gimple_seq_add (stmt_list, stmt);
}
}
Index: gimple.c
===================================================================
--- gimple.c (revision 129427)
+++ gimple.c (working copy)
@@ -180,11 +180,11 @@ gimple_alloc_ops (gimple stmt, size_t nu
for the new tuple. NUM_OPS is the number of operands to allocate. */
static gimple
-build_gimple_with_ops (enum gimple_code code, enum tree_code subcode,
+gimple_build_with_ops (enum gimple_code code, enum tree_code subcode,
size_t num_ops)
{
gimple s = gimple_alloc (code);
- set_gimple_subcode (s, subcode);
+ gimple_set_subcode (s, subcode);
if (num_ops > 0)
gimple_alloc_ops (s, num_ops);
@@ -195,26 +195,26 @@ build_gimple_with_ops (enum gimple_code
/* Build a GIMPLE_RETURN statement returning RETVAL. */
gimple
-build_gimple_return (tree retval)
+gimple_build_return (tree retval)
{
gimple s;
gcc_assert (retval == NULL_TREE
|| TREE_CODE (retval) == RESULT_DECL
|| is_gimple_val (retval));
- s = build_gimple_with_ops (GIMPLE_RETURN, 0, 1);
+ s = gimple_build_with_ops (GIMPLE_RETURN, 0, 1);
if (retval)
gimple_return_set_retval (s, retval);
return s;
}
-/* Helper for build_gimple_call and build_gimple_call_vec. Build the basic
+/* Helper for gimple_build_call and gimple_build_call_vec. Build the basic
components of a GIMPLE_CALL statement to function FN with NARGS
arguments. */
static inline gimple
-build_gimple_call_1 (tree fn, size_t nargs)
+gimple_build_call_1 (tree fn, size_t nargs)
{
- gimple s = build_gimple_with_ops (GIMPLE_CALL, 0, nargs + 3);
+ gimple s = gimple_build_with_ops (GIMPLE_CALL, 0, nargs + 3);
s->with_ops.op[1] = fn;
return s;
}
@@ -224,11 +224,11 @@ build_gimple_call_1 (tree fn, size_t nar
specified in vector ARGS. */
gimple
-build_gimple_call_vec (tree fn, VEC(tree, gc) *args)
+gimple_build_call_vec (tree fn, VEC(tree, gc) *args)
{
size_t i;
size_t nargs = VEC_length (tree, args);
- gimple call = build_gimple_call_1 (fn, nargs);
+ gimple call = gimple_build_call_1 (fn, nargs);
for (i = 0; i < nargs; i++)
gimple_call_set_arg (call, i, VEC_index (tree, args, i));
@@ -241,7 +241,7 @@ build_gimple_call_vec (tree fn, VEC(tree
arguments. The ... are the arguments. */
gimple
-build_gimple_call (tree fn, size_t nargs, ...)
+gimple_build_call (tree fn, size_t nargs, ...)
{
va_list ap;
gimple call;
@@ -249,7 +249,7 @@ build_gimple_call (tree fn, size_t nargs
gcc_assert (TREE_CODE (fn) == FUNCTION_DECL || is_gimple_call_addr (fn));
- call = build_gimple_call_1 (fn, nargs);
+ call = gimple_build_call_1 (fn, nargs);
va_start (ap, nargs);
for (i = 0; i < nargs; i++)
@@ -301,13 +301,13 @@ extract_ops_from_tree (tree expr, enum t
RHS of the assignment which can be unary or binary. */
gimple
-build_gimple_assign (tree lhs, tree rhs)
+gimple_build_assign (tree lhs, tree rhs)
{
enum tree_code subcode;
tree op1, op2;
extract_ops_from_tree (rhs, &subcode, &op1, &op2);
- return build_gimple_assign_with_ops (subcode, lhs, op1, op2);
+ return gimple_build_assign_with_ops (subcode, lhs, op1, op2);
}
@@ -316,7 +316,7 @@ build_gimple_assign (tree lhs, tree rhs)
GIMPLE_UNARY_RHS or GIMPLE_SINGLE_RHS. */
gimple
-build_gimple_assign_with_ops (enum tree_code subcode, tree lhs, tree op1,
+gimple_build_assign_with_ops (enum tree_code subcode, tree lhs, tree op1,
tree op2)
{
size_t num_ops;
@@ -326,7 +326,7 @@ build_gimple_assign_with_ops (enum tree_
code). */
num_ops = get_gimple_rhs_num_ops (subcode) + 1;
- p = build_gimple_with_ops (GIMPLE_ASSIGN, subcode, num_ops);
+ p = gimple_build_with_ops (GIMPLE_ASSIGN, subcode, num_ops);
gimple_assign_set_lhs (p, lhs);
gimple_assign_set_rhs1 (p, op1);
if (op2)
@@ -346,13 +346,13 @@ build_gimple_assign_with_ops (enum tree_
F_LABEL is teh label to jump to otherwise. */
gimple
-build_gimple_cond (enum tree_code pred_code, tree lhs, tree rhs,
+gimple_build_cond (enum tree_code pred_code, tree lhs, tree rhs,
tree t_label, tree f_label)
{
gimple p;
gcc_assert (TREE_CODE_CLASS (pred_code) == tcc_comparison);
- p = build_gimple_with_ops (GIMPLE_COND, pred_code, 4);
+ p = gimple_build_with_ops (GIMPLE_COND, pred_code, 4);
gimple_cond_set_lhs (p, lhs);
gimple_cond_set_rhs (p, rhs);
gimple_cond_set_true_label (p, t_label);
@@ -364,9 +364,9 @@ build_gimple_cond (enum tree_code pred_c
/* Build a GIMPLE_LABEL statement for LABEL. */
gimple
-build_gimple_label (tree label)
+gimple_build_label (tree label)
{
- gimple p = build_gimple_with_ops (GIMPLE_LABEL, 0, 1);
+ gimple p = gimple_build_with_ops (GIMPLE_LABEL, 0, 1);
gimple_label_set_label (p, label);
return p;
}
@@ -374,9 +374,9 @@ build_gimple_label (tree label)
/* Build a GIMPLE_GOTO statement to label DEST. */
gimple
-build_gimple_goto (tree dest)
+gimple_build_goto (tree dest)
{
- gimple p = build_gimple_with_ops (GIMPLE_GOTO, 0, 1);
+ gimple p = gimple_build_with_ops (GIMPLE_GOTO, 0, 1);
gimple_goto_set_dest (p, dest);
return p;
}
@@ -385,7 +385,7 @@ build_gimple_goto (tree dest)
/* Build a GIMPLE_NOP statement. */
gimple
-build_gimple_nop (void)
+gimple_build_nop (void)
{
return gimple_alloc (GIMPLE_NOP);
}
@@ -396,7 +396,7 @@ build_gimple_nop (void)
VARS are the variables in BODY. */
gimple
-build_gimple_bind (tree vars, gimple_seq body)
+gimple_build_bind (tree vars, gimple_seq body)
{
gimple p = gimple_alloc (GIMPLE_BIND);
gimple_bind_set_vars (p, vars);
@@ -414,11 +414,11 @@ build_gimple_bind (tree vars, gimple_seq
*/
static inline gimple
-build_gimple_asm_1 (const char *string, size_t ninputs, size_t noutputs,
+gimple_build_asm_1 (const char *string, size_t ninputs, size_t noutputs,
size_t nclobbers)
{
gimple p;
- p = build_gimple_with_ops (GIMPLE_ASM, 0, ninputs + noutputs + nclobbers);
+ p = gimple_build_with_ops (GIMPLE_ASM, 0, ninputs + noutputs + nclobbers);
p->gimple_asm.ni = ninputs;
p->gimple_asm.no = noutputs;
@@ -439,12 +439,12 @@ build_gimple_asm_1 (const char *string,
CLOBBERS is a vector of the clobbered register parameters. */
gimple
-build_gimple_asm_vec (const char *string, VEC(tree,gc)* inputs,
+gimple_build_asm_vec (const char *string, VEC(tree,gc)* inputs,
VEC(tree,gc)* outputs, VEC(tree,gc)* clobbers)
{
gimple p;
size_t i;
- p = build_gimple_asm_1 (string,
+ p = gimple_build_asm_1 (string,
VEC_length (tree, inputs),
VEC_length (tree, outputs),
VEC_length (tree, clobbers));
@@ -470,14 +470,14 @@ build_gimple_asm_vec (const char *string
... are trees for each input, output and clobbered register. */
gimple
-build_gimple_asm (const char *string, size_t ninputs, size_t noutputs,
+gimple_build_asm (const char *string, size_t ninputs, size_t noutputs,
size_t nclobbers, ...)
{
gimple p;
size_t i;
va_list ap;
- p = build_gimple_asm_1(string, ninputs, noutputs, nclobbers);
+ p = gimple_build_asm_1(string, ninputs, noutputs, nclobbers);
va_start (ap, nclobbers);
@@ -501,7 +501,7 @@ build_gimple_asm (const char *string, si
HANDLER is the exception handler. */
gimple
-build_gimple_catch (tree types, gimple_seq handler)
+gimple_build_catch (tree types, gimple_seq handler)
{
gimple p = gimple_alloc (GIMPLE_CATCH);
gimple_catch_set_types (p, types);
@@ -517,7 +517,7 @@ build_gimple_catch (tree types, gimple_s
FAILURE is the filter's failure action. */
gimple
-build_gimple_eh_filter (tree types, gimple_seq failure)
+gimple_build_eh_filter (tree types, gimple_seq failure)
{
gimple p = gimple_alloc (GIMPLE_EH_FILTER);
gimple_eh_filter_set_types (p, types);
@@ -535,14 +535,14 @@ build_gimple_eh_filter (tree types, gimp
whether this is a try/catch or a try/finally respectively. */
gimple
-build_gimple_try (gimple_seq eval, gimple_seq cleanup,
+gimple_build_try (gimple_seq eval, gimple_seq cleanup,
enum gimple_try_kind kind)
{
gimple p;
gcc_assert (kind == GIMPLE_TRY_CATCH || kind == GIMPLE_TRY_FINALLY);
p = gimple_alloc (GIMPLE_TRY);
- set_gimple_subcode (p, kind);
+ gimple_set_subcode (p, kind);
if (eval)
gimple_try_set_eval (p, eval);
if (cleanup)
@@ -556,7 +556,7 @@ build_gimple_try (gimple_seq eval, gimpl
CLEANUP is the cleanup expression. */
gimple
-build_gimple_wce (gimple_seq cleanup)
+gimple_build_wce (gimple_seq cleanup)
{
gimple p = gimple_alloc (GIMPLE_WITH_CLEANUP_EXPR);
if (cleanup)
@@ -572,7 +572,7 @@ build_gimple_wce (gimple_seq cleanup)
leave. */
gimple
-build_gimple_resx (int region)
+gimple_build_resx (int region)
{
gimple p = gimple_alloc (GIMPLE_RESX);
gimple_resx_set_region (p, region);
@@ -586,10 +586,10 @@ build_gimple_resx (int region)
DEFAULT_LABEL is the default label for the switch statement. */
static inline gimple
-build_gimple_switch_1 (size_t nlabels, tree index, tree default_label)
+gimple_build_switch_1 (size_t nlabels, tree index, tree default_label)
{
/* nlabels + 1 default label + 1 index. */
- gimple p = build_gimple_with_ops (GIMPLE_SWITCH, 0, nlabels + 1 + 1);
+ gimple p = gimple_build_with_ops (GIMPLE_SWITCH, 0, nlabels + 1 + 1);
gimple_switch_set_index (p, index);
gimple_switch_set_default_label (p, default_label);
return p;
@@ -603,13 +603,13 @@ build_gimple_switch_1 (size_t nlabels, t
... are the labels excluding the default. */
gimple
-build_gimple_switch (size_t nlabels, tree index, tree default_label, ...)
+gimple_build_switch (size_t nlabels, tree index, tree default_label, ...)
{
va_list al;
size_t i;
gimple p;
- p = build_gimple_switch_1 (nlabels, index, default_label);
+ p = gimple_build_switch_1 (nlabels, index, default_label);
/* Store the rest of the labels. */
va_start (al, default_label);
@@ -628,11 +628,11 @@ build_gimple_switch (size_t nlabels, tre
ARGS is a vector of labels excluding the default. */
gimple
-build_gimple_switch_vec (tree index, tree default_label, VEC(tree, heap) *args)
+gimple_build_switch_vec (tree index, tree default_label, VEC(tree, heap) *args)
{
size_t i;
size_t nlabels = VEC_length (tree, args);
- gimple p = build_gimple_switch_1 (nlabels, index, default_label);
+ gimple p = gimple_build_switch_1 (nlabels, index, default_label);
/* Put labels in labels[1 - (nlabels + 1)].
Default label is in labels[0]. */
@@ -649,7 +649,7 @@ build_gimple_switch_vec (tree index, tre
NAME is optional identifier for this critical block. */
gimple
-build_gimple_omp_critical (gimple_seq body, tree name)
+gimple_build_omp_critical (gimple_seq body, tree name)
{
gimple p = gimple_alloc (GIMPLE_OMP_CRITICAL);
gimple_omp_critical_set_name (p, name);
@@ -672,7 +672,7 @@ build_gimple_omp_critical (gimple_seq bo
INCR is the increment expression. */
gimple
-build_gimple_omp_for (gimple_seq body, tree clauses, tree index,
+gimple_build_omp_for (gimple_seq body, tree clauses, tree index,
tree initial, tree final, tree incr,
gimple_seq pre_body, enum tree_code omp_for_cond)
{
@@ -700,7 +700,7 @@ build_gimple_omp_for (gimple_seq body, t
DATA_ARG are the shared data argument(s). */
gimple
-build_gimple_omp_parallel (gimple_seq body, tree clauses, tree child_fn,
+gimple_build_omp_parallel (gimple_seq body, tree clauses, tree child_fn,
tree data_arg)
{
gimple p = gimple_alloc (GIMPLE_OMP_PARALLEL);
@@ -719,7 +719,7 @@ build_gimple_omp_parallel (gimple_seq bo
BODY is the sequence of statements in the section. */
gimple
-build_gimple_omp_section (gimple_seq body)
+gimple_build_omp_section (gimple_seq body)
{
gimple p = gimple_alloc (GIMPLE_OMP_SECTION);
if (body)
@@ -734,7 +734,7 @@ build_gimple_omp_section (gimple_seq bod
BODY is the sequence of statements to be executed by just the master. */
gimple
-build_gimple_omp_master (gimple_seq body)
+gimple_build_omp_master (gimple_seq body)
{
gimple p = gimple_alloc (GIMPLE_OMP_MASTER);
if (body)
@@ -748,7 +748,7 @@ build_gimple_omp_master (gimple_seq body
FIXME tuples: BODY. */
gimple
-build_gimple_omp_continue (gimple_seq body)
+gimple_build_omp_continue (gimple_seq body)
{
gimple p = gimple_alloc (GIMPLE_OMP_CONTINUE);
if (body)
@@ -763,7 +763,7 @@ build_gimple_omp_continue (gimple_seq bo
sequence. */
gimple
-build_gimple_omp_ordered (gimple_seq body)
+gimple_build_omp_ordered (gimple_seq body)
{
gimple p = gimple_alloc (GIMPLE_OMP_ORDERED);
if (body)
@@ -777,11 +777,11 @@ build_gimple_omp_ordered (gimple_seq bod
WAIT_P is true if this is a non-waiting return. */
gimple
-build_gimple_omp_return (bool wait_p)
+gimple_build_omp_return (bool wait_p)
{
gimple p = gimple_alloc (GIMPLE_OMP_RETURN);
if (wait_p)
- set_gimple_subcode (p, OMP_RETURN_NOWAIT_FLAG);
+ gimple_set_subcode (p, OMP_RETURN_NOWAIT_FLAG);
return p;
}
@@ -794,7 +794,7 @@ build_gimple_omp_return (bool wait_p)
firstprivate, lastprivate, reduction, and nowait. */
gimple
-build_gimple_omp_sections (gimple_seq body, tree clauses)
+gimple_build_omp_sections (gimple_seq body, tree clauses)
{
gimple p = gimple_alloc (GIMPLE_OMP_SECTIONS);
if (body)
@@ -812,7 +812,7 @@ build_gimple_omp_sections (gimple_seq bo
copyprivate, nowait. */
gimple
-build_gimple_omp_single (gimple_seq body, tree clauses)
+gimple_build_omp_single (gimple_seq body, tree clauses)
{
gimple p = gimple_alloc (GIMPLE_OMP_SINGLE);
if (body)
@@ -900,8 +900,8 @@ gimple_seq_add (gimple_seq seq, gimple g
else
{
/* Otherwise, link GS to the end of SEQ. */
- set_gimple_prev (gs, gimple_seq_last (seq));
- set_gimple_next (gimple_seq_last (seq), gs);
+ gimple_set_prev (gs, gimple_seq_last (seq));
+ gimple_set_next (gimple_seq_last (seq), gs);
gimple_seq_set_last (seq, gs);
}
}
@@ -923,8 +923,8 @@ gimple_seq_append (gimple_seq dst, gimpl
gimple_seq_copy (dst, src);
else
{
- set_gimple_next (gimple_seq_last (dst), gimple_seq_first (src));
- set_gimple_prev (gimple_seq_first (src), gimple_seq_last (dst));
+ gimple_set_next (gimple_seq_last (dst), gimple_seq_first (src));
+ gimple_set_prev (gimple_seq_first (src), gimple_seq_last (dst));
gimple_seq_set_last (dst, gimple_seq_last (src));
}
}
@@ -1260,7 +1260,7 @@ walk_gimple_stmt (gimple stmt, walk_stmt
/* Set sequence SEQ to be the GIMPLE body for function FN. */
void
-set_gimple_body (tree fn, gimple_seq seq)
+gimple_set_body (tree fn, gimple_seq seq)
{
void **slot;
size_t index;
@@ -1351,7 +1351,7 @@ gimple_remove (gimple stmt, gimple_seq s
{
gimple next, prev;
- set_gimple_bb (stmt, NULL);
+ gimple_set_bb (stmt, NULL);
delink_stmt_imm_use (stmt);
mark_stmt_modified (stmt);
if (remove_eh_info)
@@ -1364,7 +1364,7 @@ gimple_remove (gimple stmt, gimple_seq s
prev = gimple_prev (stmt);
if (prev)
- set_gimple_next (prev, next);
+ gimple_set_next (prev, next);
else
{
/* If STMT has no predecessor, it must be the first statement in
@@ -1374,7 +1374,7 @@ gimple_remove (gimple stmt, gimple_seq s
}
if (next)
- set_gimple_prev (next, prev);
+ gimple_set_prev (next, prev);
else
{
/* If STMT has no successor, it must be the last statement in
@@ -1385,8 +1385,8 @@ gimple_remove (gimple stmt, gimple_seq s
/* Clear any links this statement may have, just in case someone is
still using it. */
- set_gimple_next (stmt, NULL);
- set_gimple_prev (stmt, NULL);
+ gimple_set_next (stmt, NULL);
+ gimple_set_prev (stmt, NULL);
}
@@ -1403,8 +1403,8 @@ gimple_seq_reverse (gimple_seq seq)
for (g = first; g; )
{
gimple next = gimple_next (g);
- set_gimple_next (g, gimple_prev (g));
- set_gimple_prev (g, next);
+ gimple_set_next (g, gimple_prev (g));
+ gimple_set_prev (g, next);
g = next;
}
@@ -1418,7 +1418,7 @@ gimple_seq_reverse (gimple_seq seq)
/* Set BB to be the basic block holding G. */
void
-set_gimple_bb (gimple stmt, basic_block bb)
+gimple_set_bb (gimple stmt, basic_block bb)
{
stmt->gsbase.bb = bb;
@@ -1542,7 +1542,7 @@ gimple_assign_set_rhs_with_ops (gimple s
gimple_assign_set_lhs (stmt, lhs);
}
- set_gimple_subcode (stmt, code);
+ gimple_set_subcode (stmt, code);
gimple_assign_set_rhs1 (stmt, op1);
if (num_ops > 1)
gimple_assign_set_rhs2 (stmt, op2);
Index: gimple.h
===================================================================
--- gimple.h (revision 129427)
+++ gimple.h (working copy)
@@ -55,7 +55,7 @@ struct gimple_sequence GTY(())
/* Return the first statement in GIMPLE sequence S. */
static inline gimple
-gimple_seq_first (gimple_seq s)
+gimple_seq_first (const_gimple_seq s)
{
return s ? s->first : NULL;
}
@@ -63,7 +63,7 @@ gimple_seq_first (gimple_seq s)
/* Return the last statement in GIMPLE sequence S. */
static inline gimple
-gimple_seq_last (gimple_seq s)
+gimple_seq_last (const_gimple_seq s)
{
return s ? s->last : NULL;
}
@@ -104,7 +104,7 @@ gimple_seq_alloc (void)
/* Copy the sequence SRC into the sequence DEST. */
static inline void
-gimple_seq_copy (gimple_seq dest, gimple_seq src)
+gimple_seq_copy (gimple_seq dest, const_gimple_seq src)
{
gimple_seq_set_first (dest, gimple_seq_first (src));
gimple_seq_set_last (dest, gimple_seq_last (src));
@@ -114,7 +114,7 @@ gimple_seq_copy (gimple_seq dest, gimple
/* Return true if GIMPLE sequence S is empty. */
static inline bool
-gimple_seq_empty_p (gimple_seq s)
+gimple_seq_empty_p (const_gimple_seq s)
{
return s == NULL || s->first == NULL;
}
@@ -276,6 +276,7 @@ enum gimple_try_kind {
};
/* GIMPLE_WITH_CLEANUP_EXPR */
+
struct gimple_statement_wce GTY(())
{
struct gimple_statement_base gsbase;
@@ -412,7 +413,7 @@ union gimple_statement_d GTY ((desc ("gi
/* Set PREV to be the previous statement to G. */
static inline void
-set_gimple_prev (gimple g, gimple prev)
+gimple_set_prev (gimple g, gimple prev)
{
g->gsbase.prev = prev;
}
@@ -421,7 +422,7 @@ set_gimple_prev (gimple g, gimple prev)
/* Set NEXT to be the next statement to G. */
static inline void
-set_gimple_next (gimple g, gimple next)
+gimple_set_next (gimple g, gimple next)
{
g->gsbase.next = next;
}
@@ -451,7 +452,7 @@ gimple_flags (const_gimple g)
/* Set the flags for statement G to FLAGS. */
static inline void
-set_gimple_flags (gimple g, unsigned int flags)
+gimple_set_flags (gimple g, unsigned int flags)
{
/* We only have 8 bits for flags. Assert that we are not
overflowing them. */
@@ -463,7 +464,7 @@ set_gimple_flags (gimple g, unsigned int
/* Add the flags set in FLAG to the set of flags for statement G. */
static inline void
-add_gimple_flag (gimple g, unsigned int flag)
+gimple_add_flag (gimple g, unsigned int flag)
{
/* We only have 8 bits for flags. Assert that we are not
overflowing them. */
@@ -475,7 +476,7 @@ add_gimple_flag (gimple g, unsigned int
/* Set SUBCODE to be the code of the expression computed by statement G. */
static inline void
-set_gimple_subcode (gimple g, enum tree_code subcode)
+gimple_set_subcode (gimple g, enum tree_code subcode)
{
/* We only have 8 bits for the RHS code. Assert that we are not
overflowing it. */
@@ -532,7 +533,7 @@ gimple_block (const_gimple g)
/* Set BLOCK to be the lexical scope block holding statement G. */
static inline void
-set_gimple_block (gimple g, tree block)
+gimple_set_block (gimple g, tree block)
{
g->gsbase.block = block;
}
@@ -552,7 +553,7 @@ gimple_locus (const_gimple g)
mapped location support. */
static inline void
-set_gimple_locus (gimple g, location_t locus)
+gimple_set_locus (gimple g, location_t locus)
{
g->gsbase.locus = locus;
}
@@ -561,7 +562,7 @@ set_gimple_locus (gimple g, location_t l
/* Return true if G contains no locus information. */
static inline bool
-gimple_locus_empty_p (gimple g)
+gimple_locus_empty_p (const_gimple g)
{
return gimple_locus (g).file == NULL && gimple_locus (g).line == 0;
}
@@ -570,7 +571,7 @@ gimple_locus_empty_p (gimple g)
/* Return true if GIMPLE statement G has register or memory operands. */
static inline bool
-gimple_has_ops (gimple g)
+gimple_has_ops (const_gimple g)
{
return gimple_code (g) >= GIMPLE_ASSIGN && gimple_code (g) <= GIMPLE_RETURN;
}
@@ -579,7 +580,7 @@ gimple_has_ops (gimple g)
/* Return true if GIMPLE statement G has memory operands. */
static inline bool
-gimple_has_mem_ops (gimple g)
+gimple_has_mem_ops (const_gimple g)
{
return gimple_code (g) >= GIMPLE_ASM && gimple_code (g) <= GIMPLE_RETURN;
}
@@ -597,7 +598,7 @@ gimple_no_warning_p (const_gimple stmt)
/* Return the set of DEF operands for statement G. */
static inline struct def_optype_d *
-gimple_def_ops (gimple g)
+gimple_def_ops (const_gimple g)
{
if (!gimple_has_ops (g))
return NULL;
@@ -608,7 +609,7 @@ gimple_def_ops (gimple g)
/* Set DEF to be the set of DEF operands for statement G. */
static inline void
-set_gimple_def_ops (gimple g, struct def_optype_d *def)
+gimple_set_def_ops (gimple g, struct def_optype_d *def)
{
gcc_assert (gimple_has_ops (g));
g->with_ops.def_ops = def;
@@ -618,7 +619,7 @@ set_gimple_def_ops (gimple g, struct def
/* Return the set of USE operands for statement G. */
static inline struct use_optype_d *
-gimple_use_ops (gimple g)
+gimple_use_ops (const_gimple g)
{
if (!gimple_has_ops (g))
return NULL;
@@ -629,7 +630,7 @@ gimple_use_ops (gimple g)
/* Set USE to be the set of USE operands for statement G. */
static inline void
-set_gimple_use_ops (gimple g, struct use_optype_d *use)
+gimple_set_use_ops (gimple g, struct use_optype_d *use)
{
gcc_assert (gimple_has_ops (g));
g->with_ops.use_ops = use;
@@ -639,7 +640,7 @@ set_gimple_use_ops (gimple g, struct use
/* Return the set of VUSE operands for statement G. */
static inline struct voptype_d *
-gimple_vuse_ops (gimple g)
+gimple_vuse_ops (const_gimple g)
{
if (!gimple_has_mem_ops (g))
return NULL;
@@ -650,7 +651,7 @@ gimple_vuse_ops (gimple g)
/* Set OPS to be the set of VUSE operands for statement G. */
static inline void
-set_gimple_vuse_ops (gimple g, struct voptype_d *ops)
+gimple_set_vuse_ops (gimple g, struct voptype_d *ops)
{
gcc_assert (gimple_has_mem_ops (g));
g->with_mem_ops.vuse_ops = ops;
@@ -660,7 +661,7 @@ set_gimple_vuse_ops (gimple g, struct vo
/* Return the set of VDEF operands for statement G. */
static inline struct voptype_d *
-gimple_vdef_ops (gimple g)
+gimple_vdef_ops (const_gimple g)
{
if (!gimple_has_mem_ops (g))
return NULL;
@@ -671,7 +672,7 @@ gimple_vdef_ops (gimple g)
/* Set OPS to be the set of VDEF operands for statement G. */
static inline void
-set_gimple_vdef_ops (gimple g, struct voptype_d *ops)
+gimple_set_vdef_ops (gimple g, struct voptype_d *ops)
{
gcc_assert (gimple_has_mem_ops (g));
g->with_mem_ops.vdef_ops = ops;
@@ -682,7 +683,7 @@ set_gimple_vdef_ops (gimple g, struct vo
set is the DECL_UID of the corresponding symbol. */
static inline bitmap
-gimple_loaded_syms (gimple g)
+gimple_loaded_syms (const_gimple g)
{
if (!gimple_has_mem_ops (g))
return NULL;
@@ -694,7 +695,7 @@ gimple_loaded_syms (gimple g)
the set is the DECL_UID of the corresponding symbol. */
static inline bitmap
-gimple_stored_syms (gimple g)
+gimple_stored_syms (const_gimple g)
{
if (!gimple_has_mem_ops (g))
return NULL;
@@ -706,7 +707,7 @@ gimple_stored_syms (gimple g)
been set. */
static inline bool
-gimple_modified (gimple g)
+gimple_modified (const_gimple g)
{
if (gimple_has_ops (g))
return (bool) g->with_ops.modified;
@@ -719,7 +720,7 @@ gimple_modified (gimple g)
a MODIFIED field. */
static inline void
-set_gimple_modified (gimple g, bool modifiedp)
+gimple_set_modified (gimple g, bool modifiedp)
{
if (gimple_has_ops (g))
g->with_ops.modified = (unsigned) modifiedp;
@@ -730,7 +731,7 @@ set_gimple_modified (gimple g, bool modi
OMP_RETURN_NOWAIT_FLAG set. */
static inline bool
-gimple_omp_return_nowait_p (gimple g)
+gimple_omp_return_nowait_p (const_gimple g)
{
gcc_assert (gimple_code (g) == GIMPLE_OMP_RETURN);
return gimple_subcode (g) & OMP_RETURN_NOWAIT_FLAG;
@@ -741,7 +742,7 @@ gimple_omp_return_nowait_p (gimple g)
OMP_SECTION_LAST_FLAG set. */
static inline bool
-gimple_omp_section_last_p (gimple g)
+gimple_omp_section_last_p (const_gimple g)
{
gcc_assert (gimple_code (g) == GIMPLE_OMP_SECTION);
return gimple_subcode (g) & OMP_SECTION_LAST_FLAG;
@@ -752,7 +753,7 @@ gimple_omp_section_last_p (gimple g)
OMP_PARALLEL_COMBINED_FLAG set. */
static inline bool
-gimple_omp_parallel_combined_p (gimple g)
+gimple_omp_parallel_combined_p (const_gimple g)
{
gcc_assert (gimple_code (g) == GIMPLE_OMP_PARALLEL);
return gimple_subcode (g) & OMP_PARALLEL_COMBINED_FLAG;
@@ -760,55 +761,55 @@ gimple_omp_parallel_combined_p (gimple g
/* In gimple.c. */
-gimple build_gimple_return (tree);
-gimple build_gimple_assign (tree, tree);
-gimple build_gimple_assign_with_ops (enum tree_code, tree, tree, tree);
-gimple build_gimple_call_vec (tree, VEC(tree, gc) *);
-gimple build_gimple_call (tree, size_t, ...);
-gimple build_gimple_cond (enum tree_code, tree, tree, tree, tree);
+gimple gimple_build_return (tree);
+gimple gimple_build_assign (tree, tree);
+gimple gimple_build_assign_with_ops (enum tree_code, tree, tree, tree);
+gimple gimple_build_call_vec (tree, VEC(tree, gc) *);
+gimple gimple_build_call (tree, size_t, ...);
+gimple gimple_build_cond (enum tree_code, tree, tree, tree, tree);
void gimple_cond_invert (gimple);
-gimple build_gimple_label (tree label);
-gimple build_gimple_goto (tree dest);
-gimple build_gimple_nop (void);
-gimple build_gimple_bind (tree, gimple_seq);
-gimple build_gimple_asm (const char *, size_t, size_t, size_t, ...);
-gimple build_gimple_asm_vec (const char *, VEC(tree,gc) *, VEC(tree,gc) *,
+gimple gimple_build_label (tree label);
+gimple gimple_build_goto (tree dest);
+gimple gimple_build_nop (void);
+gimple gimple_build_bind (tree, gimple_seq);
+gimple gimple_build_asm (const char *, size_t, size_t, size_t, ...);
+gimple gimple_build_asm_vec (const char *, VEC(tree,gc) *, VEC(tree,gc) *,
VEC(tree,gc) *);
-gimple build_gimple_catch (tree, gimple_seq);
-gimple build_gimple_eh_filter (tree, gimple_seq);
-gimple build_gimple_try (gimple_seq, gimple_seq, unsigned int);
-gimple build_gimple_wce (gimple_seq);
-gimple build_gimple_resx (int);
-gimple build_gimple_switch (size_t, tree, tree, ...);
-gimple build_gimple_switch_vec (tree, tree, VEC(tree,heap) *);
-gimple build_gimple_omp_parallel (gimple_seq, tree, tree, tree);
-gimple build_gimple_omp_for (gimple_seq, tree, tree, tree, tree, tree,
+gimple gimple_build_catch (tree, gimple_seq);
+gimple gimple_build_eh_filter (tree, gimple_seq);
+gimple gimple_build_try (gimple_seq, gimple_seq, unsigned int);
+gimple gimple_build_wce (gimple_seq);
+gimple gimple_build_resx (int);
+gimple gimple_build_switch (size_t, tree, tree, ...);
+gimple gimple_build_switch_vec (tree, tree, VEC(tree,heap) *);
+gimple gimple_build_omp_parallel (gimple_seq, tree, tree, tree);
+gimple gimple_build_omp_for (gimple_seq, tree, tree, tree, tree, tree,
gimple_seq, enum tree_code);
-gimple build_gimple_omp_critical (gimple_seq, tree);
-gimple build_gimple_omp_section (gimple_seq);
-gimple build_gimple_omp_continue (gimple_seq);
-gimple build_gimple_omp_master (gimple_seq);
-gimple build_gimple_omp_return (bool);
-gimple build_gimple_omp_ordered (gimple_seq);
-gimple build_gimple_omp_sections (gimple_seq, tree);
-gimple build_gimple_omp_single (gimple_seq, tree);
+gimple gimple_build_omp_critical (gimple_seq, tree);
+gimple gimple_build_omp_section (gimple_seq);
+gimple gimple_build_omp_continue (gimple_seq);
+gimple gimple_build_omp_master (gimple_seq);
+gimple gimple_build_omp_return (bool);
+gimple gimple_build_omp_ordered (gimple_seq);
+gimple gimple_build_omp_sections (gimple_seq, tree);
+gimple gimple_build_omp_single (gimple_seq, tree);
enum gimple_statement_structure_enum gimple_statement_structure (gimple);
void gimple_seq_add (gimple_seq, gimple);
enum gimple_statement_structure_enum gss_for_assign (enum tree_code);
void sort_case_labels (VEC(tree,heap) *);
-void set_gimple_body (tree, gimple_seq);
+void gimple_set_body (tree, gimple_seq);
gimple_seq gimple_body (tree);
void gimple_seq_append (gimple_seq, gimple_seq);
int gimple_call_flags (gimple);
bool gimple_assign_copy_p (gimple);
void gimple_remove (gimple, gimple_seq, bool);
gimple_seq gimple_seq_reverse (gimple_seq);
-void set_gimple_bb (gimple, struct basic_block_def *);
+void gimple_set_bb (gimple, struct basic_block_def *);
tree gimple_fold (const_gimple);
void gimple_assign_set_rhs_from_tree (gimple, tree);
void gimple_assign_set_rhs_with_ops (gimple, enum tree_code, tree, tree);
gimple gimple_copy (gimple);
-bool is_gimple_operand (tree);
+bool is_gimple_operand (const_tree);
/* In builtins.c */
extern bool validate_arglist (const_gimple, ...);
@@ -870,7 +871,7 @@ gimple_num_ops (const_gimple gs)
/* Return the array of operands for statement GS. */
static inline tree *
-gimple_ops (gimple gs)
+gimple_ops (const_gimple gs)
{
if (gimple_code (gs) >= GIMPLE_ASSIGN && gimple_code (gs) <= GIMPLE_RETURN)
return gs->with_ops.op;
@@ -895,7 +896,7 @@ gimple_op (const_gimple gs, size_t i)
/* Return a pointer to operand I for statement GS. */
static inline tree *
-gimple_op_ptr (gimple gs, size_t i)
+gimple_op_ptr (const_gimple gs, size_t i)
{
if (gimple_code (gs) >= GIMPLE_ASSIGN && gimple_code (gs) <= GIMPLE_RETURN)
{
@@ -998,7 +999,7 @@ gimple_assign_set_rhs2 (gimple gs, tree
/* Return the LHS of call statement GS. */
static inline tree
-gimple_call_lhs (gimple gs)
+gimple_call_lhs (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_CALL);
return gimple_op (gs, 0);
@@ -1053,7 +1054,7 @@ gimple_call_fndecl (const_gimple gs)
/* Return the type returned by call statement GS. */
static inline tree
-gimple_call_return_type (gimple gs)
+gimple_call_return_type (const_gimple gs)
{
tree fn = gimple_call_fn (gs);
tree type = TREE_TYPE (fn);
@@ -1073,7 +1074,7 @@ gimple_call_return_type (gimple gs)
/* Return the static chain for call statement GS. */
static inline tree
-gimple_call_chain (gimple gs)
+gimple_call_chain (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_CALL);
return gimple_op (gs, 2);
@@ -1116,7 +1117,7 @@ gimple_call_arg (const_gimple gs, size_t
statement GS. */
static inline tree *
-gimple_call_arg_ptr (gimple gs, size_t index)
+gimple_call_arg_ptr (const_gimple gs, size_t index)
{
GIMPLE_CHECK (gs, GIMPLE_CALL);
return gimple_op_ptr (gs, index + 3);
@@ -1151,7 +1152,7 @@ gimple_cond_set_code (gimple gs, enum tr
{
GIMPLE_CHECK (gs, GIMPLE_COND);
gcc_assert (TREE_CODE_CLASS (code) == tcc_comparison);
- set_gimple_subcode (gs, code);
+ gimple_set_subcode (gs, code);
}
@@ -1203,7 +1204,7 @@ gimple_cond_set_rhs (gimple gs, tree rhs
predicate evaluates to true. */
static inline tree
-gimple_cond_true_label (gimple gs)
+gimple_cond_true_label (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_COND);
return gimple_op (gs, 2);
@@ -1238,7 +1239,7 @@ gimple_cond_set_false_label (gimple gs,
predicate evaluates to false. */
static inline tree
-gimple_cond_false_label (gimple gs)
+gimple_cond_false_label (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_COND);
return gimple_op (gs, 3);
@@ -1250,7 +1251,7 @@ gimple_cond_false_label (gimple gs)
static inline void
gimple_cond_make_false (gimple gs)
{
- set_gimple_subcode (gs, EQ_EXPR);
+ gimple_set_subcode (gs, EQ_EXPR);
gimple_cond_set_lhs (gs, boolean_true_node);
gimple_cond_set_rhs (gs, boolean_false_node);
}
@@ -1261,7 +1262,7 @@ gimple_cond_make_false (gimple gs)
static inline void
gimple_cond_make_true (gimple gs)
{
- set_gimple_subcode (gs, EQ_EXPR);
+ gimple_set_subcode (gs, EQ_EXPR);
gimple_cond_set_lhs (gs, boolean_true_node);
gimple_cond_set_lhs (gs, boolean_true_node);
}
@@ -1313,7 +1314,7 @@ gimple_goto_set_dest (gimple gs, tree de
/* Return the variables declared in the GIMPLE_BIND statement GS. */
static inline tree
-gimple_bind_vars (gimple gs)
+gimple_bind_vars (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_BIND);
return gs->gimple_bind.vars;
@@ -1345,7 +1346,7 @@ gimple_bind_body (gimple gs)
statement GS. */
static inline void
-gimple_bind_set_body (gimple gs, gimple_seq seq)
+gimple_bind_set_body (gimple gs, const_gimple_seq seq)
{
GIMPLE_CHECK (gs, GIMPLE_BIND);
gimple_seq_copy (&(gs->gimple_bind.body), seq);
@@ -1356,7 +1357,7 @@ gimple_bind_set_body (gimple gs, gimple_
GS. */
static inline tree
-gimple_bind_block (gimple gs)
+gimple_bind_block (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_BIND);
return gs->gimple_bind.block;
@@ -1378,7 +1379,7 @@ gimple_bind_set_block (gimple gs, tree b
/* Return the number of input operands for GIMPLE_ASM GS. */
static inline size_t
-gimple_asm_ninputs (gimple gs)
+gimple_asm_ninputs (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
return gs->gimple_asm.ni;
@@ -1388,7 +1389,7 @@ gimple_asm_ninputs (gimple gs)
/* Return the number of output operands for GIMPLE_ASM GS. */
static inline size_t
-gimple_asm_noutputs (gimple gs)
+gimple_asm_noutputs (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
return gs->gimple_asm.no;
@@ -1398,7 +1399,7 @@ gimple_asm_noutputs (gimple gs)
/* Return the number of clobber operands for GIMPLE_ASM GS. */
static inline size_t
-gimple_asm_nclobbers (gimple gs)
+gimple_asm_nclobbers (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
return gs->gimple_asm.nc;
@@ -1408,7 +1409,7 @@ gimple_asm_nclobbers (gimple gs)
/* Return input operand INDEX of GIMPLE_ASM GS. */
static inline tree
-gimple_asm_input_op (gimple gs, size_t index)
+gimple_asm_input_op (const_gimple gs, size_t index)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
gcc_assert (index <= gs->gimple_asm.ni);
@@ -1431,7 +1432,7 @@ gimple_asm_set_input_op (gimple gs, size
/* Return output operand INDEX of GIMPLE_ASM GS. */
static inline tree
-gimple_asm_output_op (gimple gs, size_t index)
+gimple_asm_output_op (const_gimple gs, size_t index)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
gcc_assert (index <= gs->gimple_asm.no);
@@ -1454,7 +1455,7 @@ gimple_asm_set_output_op (gimple gs, siz
/* Return clobber operand INDEX of GIMPLE_ASM GS. */
static inline tree
-gimple_asm_clobber_op (gimple gs, size_t index)
+gimple_asm_clobber_op (const_gimple gs, size_t index)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
gcc_assert (index <= gs->gimple_asm.nc);
@@ -1478,7 +1479,7 @@ gimple_asm_set_clobber_op (gimple gs, si
GIMPLE_ASM GS. */
static inline const char *
-gimple_asm_string (gimple gs)
+gimple_asm_string (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
return gs->gimple_asm.string;
@@ -1488,7 +1489,7 @@ gimple_asm_string (gimple gs)
/* Return true if GS is an asm statement marked volatile. */
static inline bool
-gimple_asm_volatile_p (gimple gs)
+gimple_asm_volatile_p (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
return gs->gsbase.subcode & GF_ASM_VOLATILE;
@@ -1518,7 +1519,7 @@ gimple_asm_clear_volatile (gimple gs)
/* Return the types handled by GIMPLE_CATCH statement GS. */
static inline tree
-gimple_catch_types (gimple gs)
+gimple_catch_types (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_CATCH);
return gs->gimple_catch.types;
@@ -1539,7 +1540,7 @@ gimple_catch_types_ptr (gimple gs)
GIMPLE_CATCH statement GS. */
static inline gimple_seq
-gimple_catch_handler (gimple gs)
+gimple_catch_handler (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_CATCH);
return gs->gimple_catch.handler;
@@ -1569,7 +1570,7 @@ gimple_catch_set_handler (gimple gs, gim
/* Return the types handled by GIMPLE_EH_FILTER statement GS. */
static inline tree
-gimple_eh_filter_types (gimple gs)
+gimple_eh_filter_types (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
return gs->gimple_eh_filter.types;
@@ -1591,7 +1592,7 @@ gimple_eh_filter_types_ptr (gimple gs)
statement fails. */
static inline gimple_seq
-gimple_eh_filter_failure (gimple gs)
+gimple_eh_filter_failure (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
return gs->gimple_eh_filter.failure;
@@ -1622,7 +1623,7 @@ gimple_eh_filter_set_failure (gimple gs,
/* Return the kind of try block represented by GIMPLE_TRY GS. */
static inline enum gimple_try_kind
-gimple_try_kind (gimple gs)
+gimple_try_kind (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_TRY);
return (enum gimple_try_kind) gimple_subcode (gs);
@@ -1654,7 +1655,7 @@ gimple_try_cleanup (gimple gs)
GIMPLE_TRY GS. */
static inline void
-gimple_try_set_eval (gimple gs, gimple_seq eval)
+gimple_try_set_eval (gimple gs, const_gimple_seq eval)
{
GIMPLE_CHECK (gs, GIMPLE_TRY);
gimple_seq_copy (gimple_try_eval (gs), eval);
@@ -1665,14 +1666,14 @@ gimple_try_set_eval (gimple gs, gimple_s
body for GIMPLE_TRY GS. */
static inline void
-gimple_try_set_cleanup (gimple gs, gimple_seq cleanup)
+gimple_try_set_cleanup (gimple gs, const_gimple_seq cleanup)
{
GIMPLE_CHECK (gs, GIMPLE_TRY);
gimple_seq_copy (gimple_try_cleanup (gs), cleanup);
}
-/* GIMPLE_WITH_CLEANUP_EXPR accessors. */
+/* Return the cleanup sequence for cleanup statement GS. */
static inline gimple_seq
gimple_wce_cleanup (gimple gs)
@@ -1681,34 +1682,41 @@ gimple_wce_cleanup (gimple gs)
return &gs->gimple_wce.cleanup;
}
+
+/* Set CLEANUP to be the cleanup sequence for GS. */
+
static inline void
-gimple_wce_set_cleanup (gimple gs, gimple_seq cleanup)
+gimple_wce_set_cleanup (gimple gs, const_gimple_seq cleanup)
{
GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
gimple_seq_copy (gimple_wce_cleanup (gs), cleanup);
}
+
/* Return the CLEANUP_EH_ONLY flag for a WCE tuple. */
+
static inline bool
-gimple_wce_cleanup_eh_only (gimple gs)
+gimple_wce_cleanup_eh_only (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
return (bool) gimple_subcode (gs);
}
+
/* Set the CLEANUP_EH_ONLY flag for a WCE tuple. */
+
static inline void
gimple_wce_set_cleanup_eh_only (gimple gs, bool eh_only_p)
{
GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
- set_gimple_subcode (gs, (unsigned int) eh_only_p);
+ gimple_set_subcode (gs, (unsigned int) eh_only_p);
}
/* Return the maximum number of arguments supported by GIMPLE_PHI GS. */
static inline size_t
-gimple_phi_capacity (gimple gs)
+gimple_phi_capacity (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_PHI);
return gs->gimple_phi.capacity;
@@ -1720,7 +1728,7 @@ gimple_phi_capacity (gimple gs)
GS. FIXME tuples, this field is useless then. */
static inline size_t
-gimple_phi_num_args (gimple gs)
+gimple_phi_num_args (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_PHI);
return gs->gimple_phi.nargs;
@@ -1730,7 +1738,7 @@ gimple_phi_num_args (gimple gs)
/* Return the SSA name created by GIMPLE_PHI GS. */
static inline tree
-gimple_phi_result (gimple gs)
+gimple_phi_result (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_PHI);
return gs->gimple_phi.result;
@@ -1774,12 +1782,14 @@ gimple_phi_set_arg (gimple gs, size_t in
/* Return the region number for GIMPLE_RESX GS. */
static inline int
-gimple_resx_region (gimple gs)
+gimple_resx_region (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_RESX);
return gs->gimple_resx.region;
}
+/* Set REGION to be the region number for GIMPLE_RESX GS. */
+
static inline void
gimple_resx_set_region (gimple gs, int region)
{
@@ -1788,16 +1798,19 @@ gimple_resx_set_region (gimple gs, int r
}
-/* GIMPLE_SWITCH accessors. */
+/* Return the number of labels associated with the switch statement GS. */
static inline size_t
-gimple_switch_num_labels (gimple gs)
+gimple_switch_num_labels (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_SWITCH);
gcc_assert (gs->with_ops.num_ops > 1);
return gs->with_ops.num_ops - 1;
}
+
+/* Set NLABELS to be the number of labels for the switch statement GS. */
+
static inline void
gimple_switch_set_num_labels (gimple g, size_t nlabels)
{
@@ -1805,6 +1818,9 @@ gimple_switch_set_num_labels (gimple g,
g->with_ops.num_ops = nlabels + 1;
}
+
+/* Return the index variable used by the switch statement GS. */
+
static inline tree
gimple_switch_index (const_gimple gs)
{
@@ -1812,6 +1828,9 @@ gimple_switch_index (const_gimple gs)
return gimple_op (gs, 0);
}
+
+/* Set INDEX to be the index variable for switch statement GS. */
+
static inline void
gimple_switch_set_index (gimple gs, tree index)
{
@@ -1820,11 +1839,12 @@ gimple_switch_set_index (gimple gs, tree
gimple_set_op (gs, 0, index);
}
+
/* Return the label numbered INDEX. The default label is 0, followed by any
labels in a switch statement. */
static inline tree
-gimple_switch_label (gimple gs, size_t index)
+gimple_switch_label (const_gimple gs, size_t index)
{
GIMPLE_CHECK (gs, GIMPLE_SWITCH);
gcc_assert (gs->with_ops.num_ops > index + 1);
@@ -1845,7 +1865,7 @@ gimple_switch_set_label (gimple gs, size
/* Return the default label for a switch statement. */
static inline tree
-gimple_switch_default_label (gimple gs)
+gimple_switch_default_label (const_gimple gs)
{
return gimple_switch_label (gs, 0);
}
@@ -1859,7 +1879,7 @@ gimple_switch_set_default_label (gimple
}
-/* GIMPLE_OMP_* accessors. */
+/* Return the body for the OMP statement GS. */
static inline gimple_seq
gimple_omp_body (gimple gs)
@@ -1867,21 +1887,27 @@ gimple_omp_body (gimple gs)
return &(gs->omp.body);
}
+/* Set BODY to be the body for the OMP statement GS. */
+
static inline void
-gimple_omp_set_body (gimple gs, gimple_seq body)
+gimple_omp_set_body (gimple gs, const_gimple_seq body)
{
gimple_seq_copy (&(gs->omp.body), body);
}
-/* GIMPLE_OMP_CRITICAL accessors. */
+
+/* Return the name associated with OMP_CRITICAL statement GS. */
static inline tree
-gimple_omp_critical_name (gimple gs)
+gimple_omp_critical_name (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
return gs->gimple_omp_critical.name;
}
+
+/* Return a pointer to the name associated with OMP critical statement GS. */
+
static inline tree *
gimple_omp_critical_name_ptr (gimple gs)
{
@@ -1889,6 +1915,9 @@ gimple_omp_critical_name_ptr (gimple gs)
return &gs->gimple_omp_critical.name;
}
+
+/* Set NAME to be the name associated with OMP critical statement GS. */
+
static inline void
gimple_omp_critical_set_name (gimple gs, tree name)
{
@@ -1896,15 +1925,19 @@ gimple_omp_critical_set_name (gimple gs,
gs->gimple_omp_critical.name = name;
}
-/* GIMPLE_OMP_FOR accessors. */
+
+/* Return the clauses associated with OMP_FOR GS. */
static inline tree
-gimple_omp_for_clauses (gimple gs)
+gimple_omp_for_clauses (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
return gs->gimple_omp_for.clauses;
}
+
+/* Return a pointer to the OMP_FOR GS. */
+
static inline tree *
gimple_omp_for_clauses_ptr (gimple gs)
{
@@ -1912,6 +1945,9 @@ gimple_omp_for_clauses_ptr (gimple gs)
return &gs->gimple_omp_for.clauses;
}
+
+/* Set CLAUSES to be the list of clauses associated with OMP_FOR GS. */
+
static inline void
gimple_omp_for_set_clauses (gimple gs, tree clauses)
{
@@ -1919,13 +1955,19 @@ gimple_omp_for_set_clauses (gimple gs, t
gs->gimple_omp_for.clauses = clauses;
}
+
+/* Return the index variable for OMP_FOR GS. */
+
static inline tree
-gimple_omp_for_index (gimple gs)
+gimple_omp_for_index (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
return gs->gimple_omp_for.index;
}
+
+/* Return a pointer to the index variable for OMP_FOR GS. */
+
static inline tree *
gimple_omp_for_index_ptr (gimple gs)
{
@@ -1933,6 +1975,9 @@ gimple_omp_for_index_ptr (gimple gs)
return &gs->gimple_omp_for.index;
}
+
+/* Set INDEX to be the index variable for OMP_FOR GS. */
+
static inline void
gimple_omp_for_set_index (gimple gs, tree index)
{
@@ -1940,13 +1985,19 @@ gimple_omp_for_set_index (gimple gs, tre
gs->gimple_omp_for.index = index;
}
+
+/* Return the initial value for OMP_FOR GS. */
+
static inline tree
-gimple_omp_for_initial (gimple gs)
+gimple_omp_for_initial (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
return gs->gimple_omp_for.initial;
}
+
+/* Return a pointer to the initial value for OMP_FOR GS. */
+
static inline tree *
gimple_omp_for_initial_ptr (gimple gs)
{
@@ -1954,6 +2005,9 @@ gimple_omp_for_initial_ptr (gimple gs)
return &gs->gimple_omp_for.initial;
}
+
+/* Set INITIAL to be the initial value for OMP_FOR GS. */
+
static inline void
gimple_omp_for_set_initial (gimple gs, tree initial)
{
@@ -1961,13 +2015,19 @@ gimple_omp_for_set_initial (gimple gs, t
gs->gimple_omp_for.initial = initial;
}
+
+/* Return the final value for OMP_FOR GS. */
+
static inline tree
-gimple_omp_for_final (gimple gs)
+gimple_omp_for_final (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
return gs->gimple_omp_for.final;
}
+
+/* Return a pointer to the final value for OMP_FOR GS. */
+
static inline tree *
gimple_omp_for_final_ptr (gimple gs)
{
@@ -1975,6 +2035,9 @@ gimple_omp_for_final_ptr (gimple gs)
return &gs->gimple_omp_for.final;
}
+
+/* Set FINAL to be the final value for OMP_FOR GS. */
+
static inline void
gimple_omp_for_set_final (gimple gs, tree final)
{
@@ -1982,13 +2045,19 @@ gimple_omp_for_set_final (gimple gs, tre
gs->gimple_omp_for.final = final;
}
+
+/* Return the increment value for OMP_FOR GS. */
+
static inline tree
-gimple_omp_for_incr (gimple gs)
+gimple_omp_for_incr (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
return gs->gimple_omp_for.incr;
}
+
+/* Return a pointer to the increment value for OMP_FOR GS. */
+
static inline tree *
gimple_omp_for_incr_ptr (gimple gs)
{
@@ -1996,6 +2065,9 @@ gimple_omp_for_incr_ptr (gimple gs)
return &gs->gimple_omp_for.incr;
}
+
+/* Set INCR to be the increment value for OMP_FOR GS. */
+
static inline void
gimple_omp_for_set_incr (gimple gs, tree incr)
{
@@ -2003,6 +2075,10 @@ gimple_omp_for_set_incr (gimple gs, tree
gs->gimple_omp_for.incr = incr;
}
+
+/* Return the sequence of statements to execute before the OMP_FOR
+ statement GS starts. */
+
static inline gimple_seq
gimple_omp_for_pre_body (gimple gs)
{
@@ -2010,22 +2086,30 @@ gimple_omp_for_pre_body (gimple gs)
return &(gs->gimple_omp_for.pre_body);
}
+
+/* Set PRE_BODY to be the sequence of statements to execute before the
+ OMP_FOR statement GS starts. */
+
static inline void
-gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body)
+gimple_omp_for_set_pre_body (gimple gs, const_gimple_seq pre_body)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
gimple_seq_copy (&(gs->gimple_omp_for.pre_body), pre_body);
}
-/* GIMPLE_OMP_PARALLEL accessors. */
+
+/* Return the clauses associated with OMP_PARALLEL GS. */
static inline tree
-gimple_omp_parallel_clauses (gimple gs)
+gimple_omp_parallel_clauses (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
return gs->gimple_omp_parallel.clauses;
}
+
+/* Return a pointer to the clauses associated with OMP_PARALLEL GS. */
+
static inline tree *
gimple_omp_parallel_clauses_ptr (gimple gs)
{
@@ -2033,6 +2117,10 @@ gimple_omp_parallel_clauses_ptr (gimple
return &gs->gimple_omp_parallel.clauses;
}
+
+/* Set CLAUSES to be the list of clauses associated with OMP_PARALLEL
+ GS. */
+
static inline void
gimple_omp_parallel_set_clauses (gimple gs, tree clauses)
{
@@ -2040,13 +2128,19 @@ gimple_omp_parallel_set_clauses (gimple
gs->gimple_omp_parallel.clauses = clauses;
}
+
+/* Return the child function used to hold the body of OMP_PARALLEL GS. */
+
static inline tree
-gimple_omp_parallel_child_fn (gimple gs)
+gimple_omp_parallel_child_fn (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
return gs->gimple_omp_parallel.child_fn;
}
+/* Return a pointer to the child function used to hold the body of
+ OMP_PARALLEL GS. */
+
static inline tree *
gimple_omp_parallel_child_fn_ptr (gimple gs)
{
@@ -2054,6 +2148,9 @@ gimple_omp_parallel_child_fn_ptr (gimple
return &gs->gimple_omp_parallel.child_fn;
}
+
+/* Set CHILD_FN to be the child function for OMP_PARALLEL GS. */
+
static inline void
gimple_omp_parallel_set_child_fn (gimple gs, tree child_fn)
{
@@ -2061,13 +2158,20 @@ gimple_omp_parallel_set_child_fn (gimple
gs->gimple_omp_parallel.child_fn = child_fn;
}
+
+/* Return the artificial argument used to send variables and values
+ from the parent to the children threads in OMP_PARALLEL GS. */
+
static inline tree
-gimple_omp_parallel_data_arg (gimple gs)
+gimple_omp_parallel_data_arg (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
return gs->gimple_omp_parallel.data_arg;
}
+
+/* Return a pointer to the data argument for OMP_PARALLEL GS. */
+
static inline tree *
gimple_omp_parallel_data_arg_ptr (gimple gs)
{
@@ -2075,6 +2179,9 @@ gimple_omp_parallel_data_arg_ptr (gimple
return &gs->gimple_omp_parallel.data_arg;
}
+
+/* Set DATA_ARG to be the data argument for OMP_PARALLEL GS. */
+
static inline void
gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg)
{
@@ -2082,17 +2189,19 @@ gimple_omp_parallel_set_data_arg (gimple
gs->gimple_omp_parallel.data_arg = data_arg;
}
-/* GIMPLE_OMP_SECTION accessors. */
-/* GIMPLE_OMP_SINGLE accessors. */
+/* Return the clauses associated with OMP_SINGLE GS. */
static inline tree
-gimple_omp_single_clauses (gimple gs)
+gimple_omp_single_clauses (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
return gs->gimple_omp_single.clauses;
}
+
+/* Return a pointer to the clauses associated with OMP_SINGLE GS. */
+
static inline tree *
gimple_omp_single_clauses_ptr (gimple gs)
{
@@ -2100,6 +2209,9 @@ gimple_omp_single_clauses_ptr (gimple gs
return &gs->gimple_omp_single.clauses;
}
+
+/* Set CLAUSES to be the clauses associated with OMP_SINGLE GS. */
+
static inline void
gimple_omp_single_set_clauses (gimple gs, tree clauses)
{
@@ -2107,13 +2219,19 @@ gimple_omp_single_set_clauses (gimple gs
gs->gimple_omp_single.clauses = clauses;
}
+
+/* Return the clauses associated with OMP_SECTIONS GS. */
+
static inline tree
-gimple_omp_sections_clauses (gimple gs)
+gimple_omp_sections_clauses (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
return gs->gimple_omp_sections.clauses;
}
+
+/* Return a pointer to the clauses associated with OMP_SECTIONS GS. */
+
static inline tree *
gimple_omp_sections_clauses_ptr (gimple gs)
{
@@ -2121,6 +2239,10 @@ gimple_omp_sections_clauses_ptr (gimple
return &gs->gimple_omp_sections.clauses;
}
+
+/* Set CLAUSES to be the set of clauses associated with OMP_SECTIONS
+ GS. */
+
static inline void
gimple_omp_sections_set_clauses (gimple gs, tree clauses)
{
@@ -2129,33 +2251,40 @@ gimple_omp_sections_set_clauses (gimple
}
-/* Get or set the OMP_FOR_COND stored in the subcode flags. */
+/* Set COND to be the condition code for OMP_FOR GS. */
static inline void
gimple_omp_for_set_cond (gimple gs, enum tree_code cond)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
gcc_assert (TREE_CODE_CLASS (cond) == tcc_comparison);
- set_gimple_subcode (gs, cond);
+ gimple_set_subcode (gs, cond);
}
+
+/* Return the condition code associated with OMP_FOR GS. */
+
static inline enum tree_code
-gimple_omp_for_cond (gimple gs)
+gimple_omp_for_cond (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
return gimple_subcode (gs);
}
-/* GIMPLE_RETURN accessors. */
+
+/* Return the return value for GIMPLE_RETURN GS. */
static inline tree
-gimple_return_retval (gimple gs)
+gimple_return_retval (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_RETURN);
gcc_assert (gs->with_ops.num_ops == 1);
return gimple_op (gs, 0);
}
+
+/* Set RETVAL to be the return value for GIMPLE_RETURN GS. */
+
static inline void
gimple_return_set_retval (gimple gs, tree retval)
{
@@ -2169,7 +2298,7 @@ gimple_return_set_retval (gimple gs, tre
/* Returns true when the gimple statment STMT is any of the OpenMP types. */
static inline bool
-is_gimple_omp (gimple stmt)
+is_gimple_omp (const_gimple stmt)
{
return (gimple_code (stmt) == GIMPLE_OMP_PARALLEL
|| gimple_code (stmt) == GIMPLE_OMP_FOR
@@ -2185,12 +2314,10 @@ is_gimple_omp (gimple stmt)
}
-/* GIMPLE_NOP. */
-
/* Returns TRUE if statement G is a GIMPLE_NOP. */
static inline bool
-gimple_nop_p (gimple g)
+gimple_nop_p (const_gimple g)
{
return gimple_code (g) == GIMPLE_NOP;
}
@@ -2200,7 +2327,7 @@ gimple_nop_p (gimple g)
void_type_node if the statement computes nothing. */
static inline tree
-gimple_expr_type (gimple stmt)
+gimple_expr_type (const_gimple stmt)
{
if (gimple_num_ops (stmt) > 0)
return TREE_TYPE (gimple_op (stmt, 0));
@@ -2211,7 +2338,8 @@ gimple_expr_type (gimple stmt)
/* Iterator object for GIMPLE statement sequences. */
-typedef struct {
+typedef struct
+{
/* Current statement. */
gimple stmt;
@@ -2229,8 +2357,8 @@ typedef struct {
static inline gimple_stmt_iterator *
gsi_alloc (void)
{
- return (gimple_stmt_iterator *) ggc_alloc_cleared
- (sizeof (gimple_stmt_iterator));
+ return (gimple_stmt_iterator *)
+ ggc_alloc_cleared (sizeof (gimple_stmt_iterator));
}
Index: tree-cfg.c
===================================================================
--- tree-cfg.c (revision 129427)
+++ tree-cfg.c (working copy)
@@ -211,7 +211,7 @@ static unsigned int
execute_build_cfg (void)
{
build_gimple_cfg (gimple_body (current_function_decl));
- set_gimple_body (current_function_decl, NULL);
+ gimple_set_body (current_function_decl, NULL);
return 0;
}
@@ -288,17 +288,17 @@ factor_computed_gotos (void)
factored computed goto. */
factored_label_decl = create_artificial_label ();
factored_computed_goto_label
- = build_gimple_label (factored_label_decl);
+ = gimple_build_label (factored_label_decl);
gsi_insert_after (new_gsi, factored_computed_goto_label,
GSI_NEW_STMT);
/* Build our new computed goto. */
- factored_computed_goto = build_gimple_goto (var);
+ factored_computed_goto = gimple_build_goto (var);
gsi_insert_after (new_gsi, factored_computed_goto, GSI_NEW_STMT);
}
/* Copy the original computed goto's destination into VAR. */
- assignment = build_gimple_assign (var, gimple_goto_dest (last));
+ assignment = gimple_build_assign (var, gimple_goto_dest (last));
gsi_insert_before (gsi, assignment, GSI_SAME_STMT);
/* And re-vector the computed goto to the new destination. */
@@ -339,7 +339,7 @@ make_blocks (gimple_seq seq)
/* Now add STMT to BB and create the subgraphs for special statement
codes. */
- set_gimple_bb (stmt, bb);
+ gimple_set_bb (stmt, bb);
if (computed_goto_p (stmt))
found_computed_goto = true;
@@ -791,7 +791,7 @@ label_to_block_fn (struct function *ifun
gimple_stmt_iterator *gsi = gsi_start_bb (BASIC_BLOCK (NUM_FIXED_BLOCKS));
gimple stmt;
- stmt = build_gimple_label (dest);
+ stmt = gimple_build_label (dest);
gsi_insert_before (gsi, stmt, GSI_NEW_STMT);
uid = LABEL_DECL_UID (dest);
}
@@ -1339,7 +1339,7 @@ gimple_merge_blocks (basic_block a, basi
with ordering of phi nodes. This is because A is the single
predecessor of B, therefore results of the phi nodes cannot
appear as arguments of the phi nodes. */
- copy = build_gimple_assign (def, use);
+ copy = gimple_build_assign (def, use);
gsi_insert_after (gsi, copy, GSI_NEW_STMT);
SSA_NAME_DEF_STMT (def) = copy;
remove_phi_node (phi, false);
@@ -2658,7 +2658,7 @@ last_and_only_stmt (basic_block bb)
static inline void
change_bb_for_stmt (gimple t, basic_block bb)
{
- set_gimple_bb (t, bb);
+ gimple_set_bb (t, bb);
if (gimple_code (t) == GIMPLE_LABEL)
VEC_replace (basic_block, label_to_block_map,
LABEL_DECL_UID (gimple_label_label (t)), bb);
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 129427)
+++ config/i386/i386.c (working copy)
@@ -5289,9 +5289,9 @@ ix86_gimplify_va_arg (tree valist, tree
gimplify_and_add (t, pre_p);
}
- gimple_seq_add (pre_p, build_gimple_goto (lab_over));
+ gimple_seq_add (pre_p, gimple_build_goto (lab_over));
- gimple_seq_add (pre_p, build_gimple_label (lab_false));
+ gimple_seq_add (pre_p, gimple_build_label (lab_false));
}
/* ... otherwise out of the overflow area. */
@@ -5321,7 +5321,7 @@ ix86_gimplify_va_arg (tree valist, tree
gimplify_and_add (t, pre_p);
if (container)
- gimple_seq_add (pre_p, build_gimple_label (lab_over));
+ gimple_seq_add (pre_p, gimple_build_label (lab_over));
ptrtype = build_pointer_type (type);
addr = fold_convert (ptrtype, addr);