aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-11-28 17:21:00 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-11-28 17:21:00 +0100
commit0f900dfafa90a1114d3768f3fe5fe4d07f250a9a (patch)
tree2f0efb6b6c95d9e1139b0c9ba7b9f6b91d064161 /gcc/tree-inline.c
parente86b4c032aa6f785d8224d17a121591a19fec986 (diff)
downloadgcc-0f900dfafa90a1114d3768f3fe5fe4d07f250a9a.zip
gcc-0f900dfafa90a1114d3768f3fe5fe4d07f250a9a.tar.gz
gcc-0f900dfafa90a1114d3768f3fe5fe4d07f250a9a.tar.bz2
matrix-reorg.c (analyze_matrix_allocation_site): Remove unused malloc_fname variable.
* matrix-reorg.c (analyze_matrix_allocation_site): Remove unused malloc_fname variable. (check_allocation_function): Remove unused gsi and bb_level_0 variables. (transform_access_sites): Remove unused d_type_size and d_type_size_k variables. * omega.c (resurrect_subs): Remove unused n variable. (omega_solve_geq): Remove unused neweqns variable. * lto-streamer-in.c (lto_read_tree): Remove unused end_marker variable. * tree-inline.c (declare_return_variable): Remove USE_P argument, return use instead of var. (remap_decl, remap_block): Remove unused fn variable. (expand_call_inline): Remove unused retvar variable, adjust declare_return_variable caller. (optimize_inline_calls): Remove unused prev_fn variable. * tree-vect-slp.c (vect_analyze_slp_instance): Remove unused ncopies variable. (vect_create_mask_and_perm): Remove unused group_size and dr_chain_size variables. * tree-ssa-loop-niter.c (split_to_var_and_offset): Handle MINUS_EXPR properly. * tree-vect-loop.c (vect_analyze_loop_form): Remove unused backedge variable. (vect_create_epilog_for_reduction): Remove unused bytesize variable. * omp-low.c (workshare_safe_to_combine_p): Remove par_entry_bb parameter. Remove unused par_stmt variable. (determine_parallel_type): Adjust workshare_safe_to_combine_p caller. (expand_omp_sections): Remove unused l1 variable. (lower_omp_for): Remove unused ilist variable. * tree-loop-distribution.c (mark_nodes_having_upstream_mem_writes): Remove unused has_upstream_mem_write_p variable. * recog.c (decode_asm_operands): Remove unused noperands variable. * tree-ssa-alias.c (refs_may_alias_p_1): Remove unused size1 and size2 variable. * libgcov.c (__gcov_merge_delta): Remove unused last variable. * tree-call-cdce.c (gen_conditions_for_pow_int_base): Remove unused base_nm variable. (gen_conditions_for_pow): Remove unused ec variable. * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove unused size variable. * ipa-struct-reorg.c (program_redefines_malloc_p): Remove unused fndecl variable. * tree-ssa-sink.c (statement_sink_location): Remove unused code variable. * regmove.c (copy_src_to_dest): Remove unused insn_uid and move_uid variables. * tree-complex.c (create_one_component_var): Remove unused inner_type variable. * calls.c (emit_call_1): Don't GEN_INT (struct_value_size) unnecessarily when GEN_*CALL omits that argument. * regrename.c (regrename_optimize): Remove unused regs_seen variable. (build_def_use): Remove unused icode variable. * ipa-pure-const.c (check_call): Remove unused callee and avail variables. * tree-dfa.c (add_referenced_var): Remove unused v_ann variable. * tree-vect-patterns.c (vect_recog_pow_pattern): Remove unused type variable. (vect_pattern_recog): Remove unused stmt variable. * sel-sched-ir.c (make_regions_from_the_rest): Remove unused new_regions variable. * postreload.c (reload_cse_simplify_operands): Remove unused mode variable. * tree-parloops.c (create_call_for_reduction_1): Remove unused addr_type variable. (create_parallel_loop): Remove unused res variable. (gen_parallel_loop): Remove unused nloop variable. * tree-vect-loop-manip.c (vect_loop_versioning): Likewise. * value-prof.c (gimple_mod_subtract_transform, gimple_stringops_transform): Remove unused value variable. (gimple_stringops_values_to_profile): Remove unused fcode variable. * tree-vrp.c (register_new_assert_for): Remove unused found variable. (vrp_visit_switch_stmt): Remove unused n variable. * tree-vect-stmts.c (vectorizable_conversion): Remove unused expr variable. (vectorizable_operation): Remove unused shift_p variable. (vectorizable_store): Remove unused first_stmt_vinfo variable. * tree-ssa-operands.c (add_stmt_operand): Remove unused v_ann variable. * tree-vect-data-refs.c (vect_analyze_data_refs): Remove unused bb variable. (vect_permute_store_chain): Remove unused scalar_dest variable. (vect_supportable_dr_alignment): Remove unused invariant_in_outerloop variable. * tree-ssa-threadupdate.c (thread_single_edge): Remove unused local_info variable. * tree-optimize.c (tree_rest_of_compilation): Remove unused node variable. * optabs.c (expand_binop): Remove unused equiv_value variable. (emit_libcall_block): Remove unused prev variable. (init_optabs): Remove unused int_mode variable. * tree-ssa-structalias.c (scc_visit): Remove unused have_ref_node variable. (do_structure_copy): Remove unused lhsbase and rhsbase variables. (find_func_aliases): Remove unused rhstype variable. (ipa_pta_execute): Remove unused varid variable. gcc/objc/ * objc-act.c (generate_shared_structures): Remove unused sc_spec and decl_specs variables. (objc_build_message_expr): Remove unused loc variable. (objc_finish_message_expr): Remove unused saved_rtype variable. (encode_field_decl): Remove unused type variable. gcc/lto/ * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num variable. From-SVN: r154726
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 2991c9e..a70b5b1c 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -118,7 +118,7 @@ eni_weights eni_time_weights;
/* Prototypes. */
-static tree declare_return_variable (copy_body_data *, tree, tree, tree *);
+static tree declare_return_variable (copy_body_data *, tree, tree);
static void remap_block (tree *, copy_body_data *);
static void copy_bind_expr (tree *, int *, copy_body_data *);
static tree mark_local_for_remap_r (tree *, int *, void *);
@@ -256,10 +256,8 @@ tree
remap_decl (tree decl, copy_body_data *id)
{
tree *n;
- tree fn;
/* We only remap local variables in the current function. */
- fn = id->src_fn;
/* See if we have remapped this declaration. */
@@ -590,7 +588,6 @@ remap_block (tree *block, copy_body_data *id)
{
tree old_block;
tree new_block;
- tree fn;
/* Make the new block. */
old_block = *block;
@@ -607,8 +604,6 @@ remap_block (tree *block, copy_body_data *id)
&BLOCK_NONLOCALIZED_VARS (new_block),
id);
- fn = id->dst_fn;
-
if (id->transform_lang_insert_block)
id->transform_lang_insert_block (new_block);
@@ -2533,13 +2528,11 @@ initialize_inlined_parameters (copy_body_data *id, gimple stmt,
is set only for CALL_EXPR_RETURN_SLOT_OPT. MODIFY_DEST, if non-null,
was the LHS of the MODIFY_EXPR to which this call is the RHS.
- The return value is a (possibly null) value that is the result of the
- function as seen by the callee. *USE_P is a (possibly null) value that
- holds the result as seen by the caller. */
+ The return value is a (possibly null) value that holds the result
+ as seen by the caller. */
static tree
-declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
- tree *use_p)
+declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest)
{
tree callee = id->src_fn;
tree caller = id->dst_fn;
@@ -2551,10 +2544,7 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
/* We don't need to do anything for functions that don't return
anything. */
if (!result || VOID_TYPE_P (callee_type))
- {
- *use_p = NULL_TREE;
- return NULL_TREE;
- }
+ return NULL_TREE;
/* If there was a return slot, then the return value is the
dereferenced address of that object. */
@@ -2705,8 +2695,7 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
/* Remember this so we can ignore it in remap_decls. */
id->retvar = var;
- *use_p = use;
- return var;
+ return use;
}
/* Callback through walk_tree. Determine if a DECL_INITIAL makes reference
@@ -3506,7 +3495,7 @@ get_indirect_callee_fndecl (struct cgraph_node *node, gimple stmt)
static bool
expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
{
- tree retvar, use_retvar;
+ tree use_retvar;
tree fn;
struct pointer_map_t *st, *dst;
tree return_slot;
@@ -3725,7 +3714,7 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
}
/* Declare the return variable for the function. */
- retvar = declare_return_variable (id, return_slot, modify_dest, &use_retvar);
+ use_retvar = declare_return_variable (id, return_slot, modify_dest);
/* Add local vars in this inlined callee to caller. */
t_step = id->src_cfun->local_decls;
@@ -3981,7 +3970,6 @@ unsigned int
optimize_inline_calls (tree fn)
{
copy_body_data id;
- tree prev_fn;
basic_block bb;
int last = n_basic_blocks;
struct gimplify_ctx gctx;
@@ -3998,12 +3986,8 @@ optimize_inline_calls (tree fn)
id.src_node = id.dst_node = cgraph_node (fn);
id.dst_fn = fn;
/* Or any functions that aren't finished yet. */
- prev_fn = NULL_TREE;
if (current_function_decl)
- {
- id.dst_fn = current_function_decl;
- prev_fn = current_function_decl;
- }
+ id.dst_fn = current_function_decl;
id.copy_decl = copy_decl_maybe_to_var;
id.transform_call_graph_edges = CB_CGE_DUPLICATE;