diff options
author | Richard Guenther <rguenther@suse.de> | 2012-08-10 09:20:29 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-08-10 09:20:29 +0000 |
commit | 83d5977e2f4747bbd33cc00a807e239d0b740895 (patch) | |
tree | 538c53782d228ed64003ea7683f91c231d7ad532 /gcc/tree-ssa-pre.c | |
parent | 7b5e682ae51f6f131daf276afca59961066ab4aa (diff) | |
download | gcc-83d5977e2f4747bbd33cc00a807e239d0b740895.zip gcc-83d5977e2f4747bbd33cc00a807e239d0b740895.tar.gz gcc-83d5977e2f4747bbd33cc00a807e239d0b740895.tar.bz2 |
tree-ssa-pre.c (pretemp, [...]): Remove.
2012-08-10 Richard Guenther <rguenther@suse.de>
* tree-ssa-pre.c (pretemp, storetemp, prephitemp): Remove.
(need_creation): Remove.
(get_representative_for): Use anonymous named SSA names.
(create_expression_by_pieces): Likewise.
(insert_into_preds_of_block): Likewise.
(init_pre): Do not init removed vars.
(fini_pre): Do not free need_creation.
* tree-ssa-forwprop.c (simplify_bitwise_binary): Use anonymous
SSA names.
* tree-ssa-loop-manip.c (create_iv): Likewise.
* value-prof.c (gimple_divmod_fixed_value): Likewise.
(gimple_mod_pow2): Likewise.
(gimple_mod_subtract): Likewise.
(gimple_ic): Likewise.
(gimple_stringop_fixed_value): Likewise.
* tree-ssa-phiopt.c (condstoretemp): Remove.
(tree_ssa_phiopt_worker): Use anonymous named SSA names.
(conditional_replacement): Likewise.
(abs_replacement): Likewise.
(cond_store_replacement): Likewise.
(cond_if_else_store_replacement_1): Likewise.
* tree-ssa-loop-im.c (rewrite_reciprocal): Likewise.
(rewrite_bittest): Likewise.
* tree-ssa-reassoc.c (build_and_add_sum): Get type from callers
and build anonymous SSA names.
(undistribute_ops_list): Adjust.
(eliminate_redundant_comparison): Use anonymous SSA names.
(rewrite_expr_tree_parallel): Likewise.
(get_reassoc_pow_ssa_name): Remove.
(attempt_builtin_powi): Adjust.
(reassociate_bb): Likewise.
* tree-ssa-strlen.c (get_string_length): Use anonymous SSA names.
* tree-switch-conversion.c (emit_case_bit_tests): Likewise.
(build_arrays): Likewise.
* tree-tailcall.c (adjust_return_value_with_ops): Likewise.
(create_tailcall_accumulator): Likewise.
* tree-vect-generic.c (expand_vector_divmod): Likewise.
* tree-profile.c (gcov_type_tmp_var): Remove.
(gimple_init_edge_profiler): Do not initialize it and use anonymous
SSA names.
(gimple_gen_ic_profiler): Likewise.
(tree_profiling): Adjust.
* tree-sra.c (build_ref_for_offset): Use anonymous SSA names.
* tree-ssa-math-opts.c (execute_cse_sincos_1): Likewise.
(powi_as_mults_1): Likewise.
(powi_as_mults): Likewise.
(build_and_insert_call): Adjust.
(build_and_insert_binop): Likewise.
(build_and_insert_ref): Likewise.
(build_and_insert_cast): Likewise.
(gimple_expand_builtin_pow): Likewise.
(gimple_expand_builtin_cabs): Likewise.
(execute_optimize_bswap): Use anonymous SSA names.
(convert_mult_to_widen): Likewise.
(convert_plusminus_to_widen): Likewise.
* tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
* tree-ssa-propagate.c (update_call_from_tree): Likewise.
* tree-if-conv.c (ifc_temp_var): Likewise.
* tree-loop-distribution.c (generate_memset_builtin): Likewise.
* tree-parloops.c (take_address_of): Likewise.
* tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
(vect_permute_load_chain): Likewise.
* tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
* tree-vect-patterns.c (vect_recog_temp_ssa_var): Likewise.
(vect_handle_widen_op_by_const): Likewise.
(vect_operation_fits_smaller_type): Likewise.
(vect_recog_over_widening_pattern): Likewise.
* tree-vect-stmts.c (vect_init_vector): Likewise.
* tree-vrp.c (simplify_truth_ops_using_ranges): Likewise.
(simplify_float_conversion_using_ranges): Likewise.
From-SVN: r190288
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 49 |
1 files changed, 5 insertions, 44 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 8c5bc6b..6264b54 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -472,14 +472,6 @@ static unsigned int get_expr_value_id (pre_expr); static alloc_pool bitmap_set_pool; static bitmap_obstack grand_bitmap_obstack; -/* To avoid adding 300 temporary variables when we only need one, we - only create one temporary variable, on demand, and build ssa names - off that. We do have to change the variable if the types don't - match the current variable's type. */ -static tree pretemp; -static tree storetemp; -static tree prephitemp; - /* Set of blocks with statements that have had their EH properties changed. */ static bitmap need_eh_cleanup; @@ -1366,7 +1358,6 @@ get_expr_type (const pre_expr e) static tree get_representative_for (const pre_expr e) { - tree exprtype; tree name; unsigned int value_id = get_expr_value_id (e); @@ -1406,14 +1397,9 @@ get_representative_for (const pre_expr e) fprintf (dump_file, "\n"); } - exprtype = get_expr_type (e); - /* Build and insert the assignment of the end result to the temporary that we will return. */ - if (!pretemp || exprtype != TREE_TYPE (pretemp)) - pretemp = create_tmp_reg (exprtype, "pretmp"); - - name = make_ssa_name (pretemp, gimple_build_nop ()); + name = make_temp_ssa_name (get_expr_type (e), gimple_build_nop (), "pretmp"); VN_INFO_GET (name)->value_id = value_id; if (e->kind == CONSTANT) VN_INFO (name)->valnum = PRE_EXPR_CONSTANT (e); @@ -2602,11 +2588,6 @@ can_PRE_operation (tree op) that didn't turn out to be necessary. */ static bitmap inserted_exprs; -/* Pool allocated fake store expressions are placed onto this - worklist, which, after performing dead code elimination, is walked - to see which expressions need to be put into GC'able memory */ -static VEC(gimple, heap) *need_creation; - /* The actual worker for create_component_ref_by_pieces. */ static tree @@ -2983,7 +2964,7 @@ static tree create_expression_by_pieces (basic_block block, pre_expr expr, gimple_seq *stmts, gimple domstmt, tree type) { - tree temp, name; + tree name; tree folded; gimple_seq forced_stmts = NULL; unsigned int value_id; @@ -3101,16 +3082,8 @@ create_expression_by_pieces (basic_block block, pre_expr expr, gimple_seq_add_seq (stmts, forced_stmts); } - /* Build and insert the assignment of the end result to the temporary - that we will return. */ - if (!pretemp || exprtype != TREE_TYPE (pretemp)) - pretemp = create_tmp_reg (exprtype, "pretmp"); - - temp = pretemp; - - newstmt = gimple_build_assign (temp, folded); - name = make_ssa_name (temp, newstmt); - gimple_assign_set_lhs (newstmt, name); + name = make_temp_ssa_name (exprtype, NULL, "pretmp"); + newstmt = gimple_build_assign (name, folded); gimple_set_plf (newstmt, NECESSARY, false); gimple_seq_add_stmt (stmts, newstmt); @@ -3361,14 +3334,7 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum, return false; /* Now build a phi for the new variable. */ - if (!prephitemp || TREE_TYPE (prephitemp) != type) - prephitemp = create_tmp_var (type, "prephitmp"); - - temp = prephitemp; - - if (TREE_CODE (type) == COMPLEX_TYPE - || TREE_CODE (type) == VECTOR_TYPE) - DECL_GIMPLE_REG_P (temp) = 1; + temp = make_temp_ssa_name (type, NULL, "prephitmp"); phi = create_phi_node (temp, block); gimple_set_plf (phi, NECESSARY, false); @@ -4809,10 +4775,6 @@ init_pre (bool do_fre) in_fre = do_fre; inserted_exprs = BITMAP_ALLOC (NULL); - need_creation = NULL; - pretemp = NULL_TREE; - storetemp = NULL_TREE; - prephitemp = NULL_TREE; connect_infinite_loops_to_exit (); memset (&pre_stats, 0, sizeof (pre_stats)); @@ -4860,7 +4822,6 @@ fini_pre (bool do_fre) free (postorder); VEC_free (bitmap_set_t, heap, value_expressions); BITMAP_FREE (inserted_exprs); - VEC_free (gimple, heap, need_creation); bitmap_obstack_release (&grand_bitmap_obstack); free_alloc_pool (bitmap_set_pool); free_alloc_pool (pre_expr_pool); |