diff options
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 1bfa8c7..c3762e1 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -102,7 +102,7 @@ const enum gimple_code gcond::code_; /* Set the code for statement G to CODE. */ static inline void -gimple_set_code (gimple g, enum gimple_code code) +gimple_set_code (gimple *g, enum gimple_code code) { g->code = code; } @@ -119,11 +119,11 @@ gimple_size (enum gimple_code code) /* Allocate memory for a GIMPLE statement with code CODE and NUM_OPS operands. */ -gimple +gimple * gimple_alloc_stat (enum gimple_code code, unsigned num_ops MEM_STAT_DECL) { size_t size; - gimple stmt; + gimple *stmt; size = gimple_size (code); if (num_ops > 0) @@ -151,7 +151,7 @@ gimple_alloc_stat (enum gimple_code code, unsigned num_ops MEM_STAT_DECL) /* Set SUBCODE to be the code of the expression computed by statement G. */ static inline void -gimple_set_subcode (gimple g, unsigned subcode) +gimple_set_subcode (gimple *g, unsigned subcode) { /* We only have 16 bits for the RHS code. Assert that we are not overflowing it. */ @@ -168,11 +168,11 @@ gimple_set_subcode (gimple g, unsigned subcode) #define gimple_build_with_ops(c, s, n) \ gimple_build_with_ops_stat (c, s, n MEM_STAT_INFO) -static gimple +static gimple * gimple_build_with_ops_stat (enum gimple_code code, unsigned subcode, unsigned num_ops MEM_STAT_DECL) { - gimple s = gimple_alloc_stat (code, num_ops PASS_MEM_STAT); + gimple *s = gimple_alloc_stat (code, num_ops PASS_MEM_STAT); gimple_set_subcode (s, subcode); return s; @@ -536,7 +536,7 @@ gimple_build_goto (tree dest) /* Build a GIMPLE_NOP statement. */ -gimple +gimple * gimple_build_nop (void) { return gimple_alloc (GIMPLE_NOP, 0); @@ -719,10 +719,10 @@ gimple_build_try (gimple_seq eval, gimple_seq cleanup, CLEANUP is the cleanup expression. */ -gimple +gimple * gimple_build_wce (gimple_seq cleanup) { - gimple p = gimple_alloc (GIMPLE_WITH_CLEANUP_EXPR, 0); + gimple *p = gimple_alloc (GIMPLE_WITH_CLEANUP_EXPR, 0); if (cleanup) gimple_wce_set_cleanup (p, cleanup); @@ -797,7 +797,7 @@ gimple_build_eh_dispatch (int region) VAR is bound to VALUE; block and location are taken from STMT. */ gdebug * -gimple_build_debug_bind_stat (tree var, tree value, gimple stmt MEM_STAT_DECL) +gimple_build_debug_bind_stat (tree var, tree value, gimple *stmt MEM_STAT_DECL) { gdebug *p = as_a <gdebug *> (gimple_build_with_ops_stat (GIMPLE_DEBUG, @@ -818,7 +818,7 @@ gimple_build_debug_bind_stat (tree var, tree value, gimple stmt MEM_STAT_DECL) gdebug * gimple_build_debug_source_bind_stat (tree var, tree value, - gimple stmt MEM_STAT_DECL) + gimple *stmt MEM_STAT_DECL) { gdebug *p = as_a <gdebug *> ( @@ -934,10 +934,10 @@ gimple_build_omp_task (gimple_seq body, tree clauses, tree child_fn, BODY is the sequence of statements in the section. */ -gimple +gimple * gimple_build_omp_section (gimple_seq body) { - gimple p = gimple_alloc (GIMPLE_OMP_SECTION, 0); + gimple *p = gimple_alloc (GIMPLE_OMP_SECTION, 0); if (body) gimple_omp_set_body (p, body); @@ -949,10 +949,10 @@ gimple_build_omp_section (gimple_seq body) BODY is the sequence of statements to be executed by just the master. */ -gimple +gimple * gimple_build_omp_master (gimple_seq body) { - gimple p = gimple_alloc (GIMPLE_OMP_MASTER, 0); + gimple *p = gimple_alloc (GIMPLE_OMP_MASTER, 0); if (body) gimple_omp_set_body (p, body); @@ -965,10 +965,10 @@ gimple_build_omp_master (gimple_seq body) BODY is the sequence of statements to be executed by the taskgroup construct. */ -gimple +gimple * gimple_build_omp_taskgroup (gimple_seq body) { - gimple p = gimple_alloc (GIMPLE_OMP_TASKGROUP, 0); + gimple *p = gimple_alloc (GIMPLE_OMP_TASKGROUP, 0); if (body) gimple_omp_set_body (p, body); @@ -996,10 +996,10 @@ gimple_build_omp_continue (tree control_def, tree control_use) BODY is the sequence of statements inside a loop that will executed in sequence. */ -gimple +gimple * gimple_build_omp_ordered (gimple_seq body) { - gimple p = gimple_alloc (GIMPLE_OMP_ORDERED, 0); + gimple *p = gimple_alloc (GIMPLE_OMP_ORDERED, 0); if (body) gimple_omp_set_body (p, body); @@ -1010,10 +1010,10 @@ gimple_build_omp_ordered (gimple_seq body) /* Build a GIMPLE_OMP_RETURN statement. WAIT_P is true if this is a non-waiting return. */ -gimple +gimple * gimple_build_omp_return (bool wait_p) { - gimple p = gimple_alloc (GIMPLE_OMP_RETURN, 0); + gimple *p = gimple_alloc (GIMPLE_OMP_RETURN, 0); if (wait_p) gimple_omp_return_set_nowait (p); @@ -1042,7 +1042,7 @@ gimple_build_omp_sections (gimple_seq body, tree clauses) /* Build a GIMPLE_OMP_SECTIONS_SWITCH. */ -gimple +gimple * gimple_build_omp_sections_switch (void) { return gimple_alloc (GIMPLE_OMP_SECTIONS_SWITCH, 0); @@ -1146,7 +1146,7 @@ gimple_build_transaction (gimple_seq body, tree label) /* Complain of a gimple type mismatch and die. */ void -gimple_check_failed (const_gimple gs, const char *file, int line, +gimple_check_failed (const gimple *gs, const char *file, int line, const char *function, enum gimple_code code, enum tree_code subcode) { @@ -1166,7 +1166,7 @@ gimple_check_failed (const_gimple gs, const char *file, int line, *SEQ_P is NULL, a new sequence is allocated. */ void -gimple_seq_add_stmt (gimple_seq *seq_p, gimple gs) +gimple_seq_add_stmt (gimple_seq *seq_p, gimple *gs) { gimple_stmt_iterator si; if (gs == NULL) @@ -1183,7 +1183,7 @@ gimple_seq_add_stmt (gimple_seq *seq_p, gimple gs) before the def/use vectors have been constructed. */ void -gimple_seq_add_stmt_without_update (gimple_seq *seq_p, gimple gs) +gimple_seq_add_stmt_without_update (gimple_seq *seq_p, gimple *gs) { gimple_stmt_iterator si; @@ -1226,7 +1226,7 @@ gimple_seq_add_seq_without_update (gimple_seq *dst_p, gimple_seq src) /* Determine whether to assign a location to the statement GS. */ static bool -should_carry_location_p (gimple gs) +should_carry_location_p (gimple *gs) { /* Don't emit a line note for a label. We particularly don't want to emit one for the break label, since it doesn't actually correspond @@ -1240,7 +1240,7 @@ should_carry_location_p (gimple gs) /* Set the location for gimple statement GS to LOCATION. */ static void -annotate_one_with_location (gimple gs, location_t location) +annotate_one_with_location (gimple *gs, location_t location) { if (!gimple_has_location (gs) && !gimple_do_not_emit_location_p (gs) @@ -1277,7 +1277,7 @@ annotate_all_with_location (gimple_seq stmt_p, location_t location) for (i = gsi_start (stmt_p); !gsi_end_p (i); gsi_next (&i)) { - gimple gs = gsi_stmt (i); + gimple *gs = gsi_stmt (i); annotate_one_with_location (gs, location); } } @@ -1286,7 +1286,7 @@ annotate_all_with_location (gimple_seq stmt_p, location_t location) statement. */ static bool -empty_stmt_p (gimple stmt) +empty_stmt_p (gimple *stmt) { if (gimple_code (stmt) == GIMPLE_NOP) return true; @@ -1321,7 +1321,7 @@ gimple_seq_copy (gimple_seq src) { gimple_stmt_iterator gsi; gimple_seq new_seq = NULL; - gimple stmt; + gimple *stmt; for (gsi = gsi_start (src); !gsi_end_p (gsi); gsi_next (&gsi)) { @@ -1337,7 +1337,7 @@ gimple_seq_copy (gimple_seq src) /* Return true if calls C1 and C2 are known to go to the same function. */ bool -gimple_call_same_target_p (const_gimple c1, const_gimple c2) +gimple_call_same_target_p (const gimple *c1, const gimple *c2) { if (gimple_call_internal_p (c1)) return (gimple_call_internal_p (c2) @@ -1352,7 +1352,7 @@ gimple_call_same_target_p (const_gimple c1, const_gimple c2) call_expr_flags, but for gimple tuples. */ int -gimple_call_flags (const_gimple stmt) +gimple_call_flags (const gimple *stmt) { int flags; tree decl = gimple_call_fndecl (stmt); @@ -1460,7 +1460,7 @@ gimple_call_return_flags (const gcall *stmt) /* Return true if GS is a copy assignment. */ bool -gimple_assign_copy_p (gimple gs) +gimple_assign_copy_p (gimple *gs) { return (gimple_assign_single_p (gs) && is_gimple_val (gimple_op (gs, 1))); @@ -1470,7 +1470,7 @@ gimple_assign_copy_p (gimple gs) /* Return true if GS is a SSA_NAME copy assignment. */ bool -gimple_assign_ssa_name_copy_p (gimple gs) +gimple_assign_ssa_name_copy_p (gimple *gs) { return (gimple_assign_single_p (gs) && TREE_CODE (gimple_assign_lhs (gs)) == SSA_NAME @@ -1493,7 +1493,7 @@ gimple_assign_ssa_name_copy_p (gimple gs) treatment of unary NOPs is appropriate. */ bool -gimple_assign_unary_nop_p (gimple gs) +gimple_assign_unary_nop_p (gimple *gs) { return (is_gimple_assign (gs) && (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (gs)) @@ -1506,7 +1506,7 @@ gimple_assign_unary_nop_p (gimple gs) /* Set BB to be the basic block holding G. */ void -gimple_set_bb (gimple stmt, basic_block bb) +gimple_set_bb (gimple *stmt, basic_block bb) { stmt->bb = bb; @@ -1580,13 +1580,13 @@ gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *gsi, enum tree_code code, tree op1, tree op2, tree op3) { unsigned new_rhs_ops = get_gimple_rhs_num_ops (code); - gimple stmt = gsi_stmt (*gsi); + gimple *stmt = gsi_stmt (*gsi); /* If the new CODE needs more operands, allocate a new statement. */ if (gimple_num_ops (stmt) < new_rhs_ops + 1) { tree lhs = gimple_assign_lhs (stmt); - gimple new_stmt = gimple_alloc (gimple_code (stmt), new_rhs_ops + 1); + gimple *new_stmt = gimple_alloc (gimple_code (stmt), new_rhs_ops + 1); memcpy (new_stmt, stmt, gimple_size (gimple_code (stmt))); gimple_init_singleton (new_stmt); gsi_replace (gsi, new_stmt, true); @@ -1613,7 +1613,7 @@ gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *gsi, enum tree_code code, statement other than an assignment or a call. */ tree -gimple_get_lhs (const_gimple stmt) +gimple_get_lhs (const gimple *stmt) { enum gimple_code code = gimple_code (stmt); @@ -1630,7 +1630,7 @@ gimple_get_lhs (const_gimple stmt) either a GIMPLE_ASSIGN or a GIMPLE_CALL. */ void -gimple_set_lhs (gimple stmt, tree lhs) +gimple_set_lhs (gimple *stmt, tree lhs) { enum gimple_code code = gimple_code (stmt); @@ -1648,12 +1648,12 @@ gimple_set_lhs (gimple stmt, tree lhs) and VUSE operand arrays are set to empty in the new copy. The new copy isn't part of any sequence. */ -gimple -gimple_copy (gimple stmt) +gimple * +gimple_copy (gimple *stmt) { enum gimple_code code = gimple_code (stmt); unsigned num_ops = gimple_num_ops (stmt); - gimple copy = gimple_alloc (code, num_ops); + gimple *copy = gimple_alloc (code, num_ops); unsigned i; /* Shallow copy all the fields from STMT. */ @@ -1850,7 +1850,7 @@ gimple_copy (gimple stmt) - Any of its operands are marked TREE_THIS_VOLATILE or TREE_SIDE_EFFECTS. */ bool -gimple_has_side_effects (const_gimple s) +gimple_has_side_effects (const gimple *s) { if (is_gimple_debug (s)) return false; @@ -1886,7 +1886,7 @@ gimple_has_side_effects (const_gimple s) S is a GIMPLE_ASSIGN, the LHS of the assignment is also checked. */ bool -gimple_could_trap_p_1 (gimple s, bool include_mem, bool include_stores) +gimple_could_trap_p_1 (gimple *s, bool include_mem, bool include_stores) { tree t, div = NULL_TREE; enum tree_code op; @@ -1932,7 +1932,7 @@ gimple_could_trap_p_1 (gimple s, bool include_mem, bool include_stores) /* Return true if statement S can trap. */ bool -gimple_could_trap_p (gimple s) +gimple_could_trap_p (gimple *s) { return gimple_could_trap_p_1 (s, true, true); } @@ -1940,7 +1940,7 @@ gimple_could_trap_p (gimple s) /* Return true if RHS of a GIMPLE_ASSIGN S can trap. */ bool -gimple_assign_rhs_could_trap_p (gimple s) +gimple_assign_rhs_could_trap_p (gimple *s) { gcc_assert (is_gimple_assign (s)); return gimple_could_trap_p_1 (s, true, false); @@ -2411,7 +2411,7 @@ gimple_get_alias_set (tree t) /* Helper for gimple_ior_addresses_taken_1. */ static bool -gimple_ior_addresses_taken_1 (gimple, tree addr, tree, void *data) +gimple_ior_addresses_taken_1 (gimple *, tree addr, tree, void *data) { bitmap addresses_taken = (bitmap)data; addr = get_base_address (addr); @@ -2429,7 +2429,7 @@ gimple_ior_addresses_taken_1 (gimple, tree addr, tree, void *data) were any in this stmt. */ bool -gimple_ior_addresses_taken (bitmap addresses_taken, gimple stmt) +gimple_ior_addresses_taken (bitmap addresses_taken, gimple *stmt) { return walk_stmt_load_store_addr_ops (stmt, addresses_taken, NULL, NULL, gimple_ior_addresses_taken_1); @@ -2458,7 +2458,7 @@ validate_type (tree type1, tree type2) a decl of a builtin function. */ bool -gimple_builtin_call_types_compatible_p (const_gimple stmt, tree fndecl) +gimple_builtin_call_types_compatible_p (const gimple *stmt, tree fndecl) { gcc_checking_assert (DECL_BUILT_IN_CLASS (fndecl) != NOT_BUILT_IN); @@ -2487,7 +2487,7 @@ gimple_builtin_call_types_compatible_p (const_gimple stmt, tree fndecl) /* Return true when STMT is builtins call. */ bool -gimple_call_builtin_p (const_gimple stmt) +gimple_call_builtin_p (const gimple *stmt) { tree fndecl; if (is_gimple_call (stmt) @@ -2500,7 +2500,7 @@ gimple_call_builtin_p (const_gimple stmt) /* Return true when STMT is builtins call to CLASS. */ bool -gimple_call_builtin_p (const_gimple stmt, enum built_in_class klass) +gimple_call_builtin_p (const gimple *stmt, enum built_in_class klass) { tree fndecl; if (is_gimple_call (stmt) @@ -2513,7 +2513,7 @@ gimple_call_builtin_p (const_gimple stmt, enum built_in_class klass) /* Return true when STMT is builtins call to CODE of CLASS. */ bool -gimple_call_builtin_p (const_gimple stmt, enum built_in_function code) +gimple_call_builtin_p (const gimple *stmt, enum built_in_function code) { tree fndecl; if (is_gimple_call (stmt) @@ -2569,7 +2569,7 @@ dump_decl_set (FILE *file, bitmap set) /* Return true when CALL is a call stmt that definitely doesn't free any memory or makes it unavailable otherwise. */ bool -nonfreeing_call_p (gimple call) +nonfreeing_call_p (gimple *call) { if (gimple_call_builtin_p (call, BUILT_IN_NORMAL) && gimple_call_flags (call) & ECF_LEAF) @@ -2616,7 +2616,7 @@ nonfreeing_call_p (gimple call) This routine only makes a superficial check for a dereference. Thus it must only be used if it is safe to return a false negative. */ static bool -check_loadstore (gimple, tree op, tree, void *data) +check_loadstore (gimple *, tree op, tree, void *data) { if ((TREE_CODE (op) == MEM_REF || TREE_CODE (op) == TARGET_MEM_REF) && operand_equal_p (TREE_OPERAND (op, 0), (tree)data, 0)) @@ -2628,7 +2628,7 @@ check_loadstore (gimple, tree op, tree, void *data) /* Return true if OP can be inferred to be non-NULL after STMT executes, either by using a pointer dereference or attributes. */ bool -infer_nonnull_range (gimple stmt, tree op) +infer_nonnull_range (gimple *stmt, tree op) { return infer_nonnull_range_by_dereference (stmt, op) || infer_nonnull_range_by_attribute (stmt, op); @@ -2637,7 +2637,7 @@ infer_nonnull_range (gimple stmt, tree op) /* Return true if OP can be inferred to be non-NULL after STMT executes by using a pointer dereference. */ bool -infer_nonnull_range_by_dereference (gimple stmt, tree op) +infer_nonnull_range_by_dereference (gimple *stmt, tree op) { /* We can only assume that a pointer dereference will yield non-NULL if -fdelete-null-pointer-checks is enabled. */ @@ -2656,7 +2656,7 @@ infer_nonnull_range_by_dereference (gimple stmt, tree op) /* Return true if OP can be inferred to be a non-NULL after STMT executes by using attributes. */ bool -infer_nonnull_range_by_attribute (gimple stmt, tree op) +infer_nonnull_range_by_attribute (gimple *stmt, tree op) { /* We can only assume that a pointer dereference will yield non-NULL if -fdelete-null-pointer-checks is enabled. */ @@ -2933,7 +2933,7 @@ gimple_seq_discard (gimple_seq seq) for (gsi = gsi_start (seq); !gsi_end_p (gsi); ) { - gimple stmt = gsi_stmt (gsi); + gimple *stmt = gsi_stmt (gsi); gsi_remove (&gsi, true); release_defs (stmt); ggc_free (stmt); @@ -2945,7 +2945,7 @@ gimple_seq_discard (gimple_seq seq) to __builtiln_unreacahble or __cxa_pure_virutal. */ void -maybe_remove_unused_call_args (struct function *fn, gimple stmt) +maybe_remove_unused_call_args (struct function *fn, gimple *stmt) { tree decl = gimple_call_fndecl (stmt); if (TYPE_ARG_TYPES (TREE_TYPE (decl)) |