Age | Commit message (Collapse) | Author | Files | Lines |
|
2006-02-07 Jeff Law <law@redhat.com>
* tree-vrp.c (find_conditional_asserts): Update comments.
(simplify_stmt_for_jump_threading): New.
(identify_jump_threads, finalize_jump_threads): New.
(vrp_finalize): Call identify_jump_threads.
(execute_vrp): Call finalize_jump_threads.
* tree-ssa-dom.c (struct opt_stats_d): Remove num_iterations field.
(vrp_element, vrp_data, vrp_element_p): Remove.
(vrp_hash_elt, vrp_variables_stack): Remove.
(vrp_hash, vrp_eq, record_range): Remove.
(simplify_cond_and_lookup_avail_expr): Remove.
(extract_range_from_cond): Remove.
(thread_across_edge): Relocated into tree-ssa-threadedge.c.
(simplify_stmt_for_jump_threading): New.
(dom_thread_across_edge): New wrapper.
(tree_ssa_dominator_optimize): No longer initialize or
finalize any of the VRP datastructures. Remove iteration
step and simplify as a result of removal of iteration step.
(pass_dominator): Perform a cfg cleanup after DOM.
(dom_opt_finalize_block): Use the new common routines
for threading jumps. Simplify stack management slightly.
No longer need to unwind VRP state.
(record_equivalences_from_incoming_edge): No longer record
VRP information.
(eliminate_redundant_computations): No longer call
simplify_cond_and_lookup_avail_expr.
* tree-flow.h (potentially_threadable_block): Prototype.
(thread_across_edge): Likewise.
* Makefile.in (OBJS-common): Add tree-ssa-threadedge.o
(tree-ssa-threadedge.o): Add dependencies.
* tree-ssa-threadedge.c: New file.
* passes.c (init_optimization_passes): Merge PHIs before
calling VRP. Run VRP again late in the SSA optimization pipeline.
* gcc.dg/tree-ssa/vrp01.c: Update dumpfile names now that we have
multiple VRP passes.
* gcc.dg/tree-ssa/vrp09.c: Likewise.
* gcc.dg/tree-ssa/vrp18.c: Likewise.
* gcc.dg/tree-ssa/pr21582.c: Likewise.
* gcc.dg/tree-ssa/pr20657.c: Likewise.
* gcc.dg/tree-ssa/pr21001.c: Likewise.
* gcc.dg/tree-ssa/vrp02.c: Likewise
* gcc.dg/tree-ssa/vrp11.c: Likewise
* gcc.dg/tree-ssa/pr14341.c: Likewise
* gcc.dg/tree-ssa/vrp19.c: Likewise
* gcc.dg/tree-ssa/vrp20.c: Likewise
* gcc.dg/tree-ssa/vrp03.c: Likewise
* gcc.dg/tree-ssa/pr21086.c: Likewise
* gcc.dg/tree-ssa/pr21959.c: Likewise
* gcc.dg/tree-ssa/vrp21.c: Likewise
* gcc.dg/tree-ssa/vrp04.c: Likewise
* gcc.dg/tree-ssa/pr25485.c: Likewise
* gcc.dg/tree-ssa/pr22026.c: Likewise
* gcc.dg/tree-ssa/vrp22.c: Likewise
* gcc.dg/tree-ssa/vrp05.c: Likewise
* gcc.dg/tree-ssa/20030807-10.c: Likewise
* gcc.dg/tree-ssa/pr20701.c: Likewise
* gcc.dg/tree-ssa/vrp23.c: Likewise
* gcc.dg/tree-ssa/vrp06.c: Likewise
* gcc.dg/tree-ssa/pr22117.c: Likewise
* gcc.dg/tree-ssa/pr20702.c: Likewise
* gcc.dg/tree-ssa/vrp15.c: Likewise
* gcc.dg/tree-ssa/pr21090.c: Likewise
* gcc.dg/tree-ssa/pr21294.c: Likewise
* gcc.dg/tree-ssa/vrp24.c: Likewise
* gcc.dg/tree-ssa/vrp07.c: Likewise
* gcc.dg/tree-ssa/pr21563.c: Likewise
* gcc.dg/tree-ssa/pr25382.c: Likewise
* gcc.dg/tree-ssa/vrp16.c: Likewise
* gcc.dg/tree-ssa/vrp25.c: Likewise
* gcc.dg/tree-ssa/vrp08.c: Likewise
* gcc.dg/tree-ssa/20030807-6.c: Likewise
* gcc.dg/tree-ssa/vrp17.c: Likewise
* gcc.dg/tree-ssa/pr21458.c: Likewise
* g++.dg/tree-ssa/pr18178.C: Likewise
From-SVN: r110705
|
|
OMP_PARALLEL_DATA_ARG and OMP_RETURN_EXPR.
* tree-pretty-print.c (dump_generic_node): Handle
OMP_PARALLEL_FN, OMP_PARALLEL_DATA_ARG and OMP_RETURN_EXPR.
* cgraph.c (cgraph_expand_queue): Rename from
cgraph_analyze_queue.
Update all users.
* cgraphunit.c (cgraph_assemble_pending_functions): Process
cgraph_expand_queue.
(cgraph_expand_all_functions): Likewise.
(cgraph_finalize_pending_functions): Remove. Update callers.
* tree.h (OMP_DIRECTIVE_P): Define.
(OMP_PARALLEL_FN): Define.
(OMP_PARALLEL_DATA_ARG): Define.
(OMP_SECTIONS_SECTIONS): Define.
* tree-pass.h (pass_expand_omp): Declare.
* omp-low.c (struct omp_region): Declare.
(struct omp_context): Remove fields 'parallel_type',
'parallel_start_ix' and 'parallel_start_additional_args'.
Update all users.
(struct omp_for_data): Rename from struct expand_omp_for_data.
(omp_regions): New static variable.
(root_omp_region): New static variable.
(find_omp_clause): Make static.
(is_in_combined_parallel_ctx): Remove.
(is_combined_parallel): New.
(extract_omp_for_data): Move earlier in the file.
(workshare_safe_to_combine_p): New.
(get_ws_args_for): New.
(determine_parallel_type): Move earlier in the file.
(omp_copy_decl_2): Do not set DECL_CONTEXT of new local to the
child function.
(omp_copy_decl): Likewise.
(create_omp_child_function): Likewise.
(lookup_omp_region): New.
(dump_omp_region): New.
(debug_omp_region): New.
(debug_all_omp_regions): New.
(new_omp_region): New.
(scan_omp_parallel): If parallel_nesting_level > 1, the
directive is nested within another parallel directive.
Set OMP_PARALLEL_FN.
(scan_omp_for): Do not try to handle combined parallel+for
cases.
Remove FIXME comment.
(scan_omp_nested): Remove.
(scan_omp_1): Do not call scan_omp_nested when
parallel_nesting_level is > 1.
Do not change the DECL_CONTEXT of local variables found.
(lookup_decl_in_outer_ctx): New.
(lower_rec_input_clauses): Rename from expand_rec_input_clauses.
(lower_lastprivate_clauses): Rename from expand_lastprivate_clauses.
(lower_reduction_clauses): Rename from expand_reduction_clauses.
(lower_copyprivate_clauses): Rename from expand_copyprivate_clauses.
If CTX is nested, lookup VAR in the outer context when
building copy assignment.
(lower_send_clauses): Rename from expand_send_clauses.
If CTX is nested, lookup VAR in the outer context when
building copy assignments.
(lower_send_shared_vars): Rename from expand_send_shared_vars.
If CTX is nested, lookup VAR in the outer context when
building copy assignments.
(expand_parallel_call): Rename from build_parallel_call.
Handle combined parallel+workshare cases.
Re-implement to emit code into the CFG.
(list2chain): New.
(expand_omp_parallel): Re-implement to emit code into the CFG.
Call move_sese_region_to_fn to outline the sub-graph
containing the parallel region.
(expand_omp_for_1): Remove.
(expand_omp_for_generic): Re-implement to emit code into the
CFG.
(expand_omp_for_static_nochunk): Likewise.
(expand_omp_for_static_chunk): Likewise.
(expand_omp_for): Likewise.
(expand_omp_sections): Likewise.
(remove_exit_barriers): New.
(expand_omp_synch): New.
(expand_omp): New.
(build_omp_regions_1): New.
(build_omp_regions): New.
(execute_expand_omp): New.
(gate_expand_omp): New.
(pass_expand_omp): Define.
(lower_omp_sections): Rename from expand_omp_sections.
Set OMP_SECTIONS_SECTIONS.
(lower_omp_single_simple): Rename from expand_omp_single_simple.
(lower_omp_single_copy): Rename from expand_omp_single_copy.
(lower_omp_single): Rename from expand_omp_simple.
(lower_omp_master): Rename from expand_omp_master.
(lower_omp_ordered): Rename from expand_omp_ordered.
(lower_omp_critical): Rename from expand_omp_critical.
(lower_omp_for_lastprivate): Rename from expand_omp_for_lastprivate.
(lower_omp_for): Re-implement.
(lower_omp_parallel): Re-implement.
(lower_regimplify): Rename from expand_regimplify.
(lower_omp_1): Rename from expand_omp_1.
If there are syntax errors in the program, replace every
OpenMP directive with NOP.
Call lower_omp_* instead of expand_omp_*.
(lower_omp): Rename from expand_omp.
* tree-gimple.c (is_gimple_stmt): Handle OMP_RETURN_EXPR.
* tree-gimple.h (enum omp_parallel_type): Remove.
(gimple_boolify): Declare extern.
(find_omp_clause, determine_parallel_type): Remove.
* gimple-low.c (lower_omp_directive): New.
(lower_stmt): Call it.
(record_vars_into): Move from ...
(record_vars): ... here.
Call record_vars_into with current_function_decl.
* gimplify.c (struct gimplify_ctx): Remove fields
combined_pre_p and combined_ctxp. Update users.
(get_formal_tmp_var): Add documentation.
(gimple_boolify): Make extern.
(gimplify_expr_in_ctx): Remove. Update callers.
(gimplify_omp_parallel): Do not assume that OMP_PARALLEL_BODY
will always be a BIND_EXPR.
(gimplify_expr): Handle OMP_RETURN_EXPR.
* tree.def (BLOCK): Remove documentation about BLOCK_TYPE_TAGS.
(OMP_PARALLEL): Add 3 operands.
(OMP_SECTIONS): Add 1 operand.
(OMP_RETURN_EXPR): Define.
* tree-inline.c (estimate_num_insns_1): Handle OpenMP directives.
(copy_tree_r): Restore TREE_CHAIN in OMP_CLAUSE_*.
* tree-iterator.c (alloc_stmt_list): Assert that we are not
creating a circular free list.
(free_stmt_list): Assert that we are not freeing stmt_list_cache.
* tree-flow.h (move_sese_region_to_fn): Declare.
(record_vars_into): Declare.
* tree-cfg.c (make_omp_sections_edges): New.
(make_exit_edges): Handle OMP_PARALLEL, OMP_FOR, OMP_SINGLE,
OMP_MASTER, OMP_ORDERED, OMP_CRITICAL, OMP_RETURN_EXPR,
OMP_SECTIONS and OMP_SECTION.
(is_ctrl_altering_stmt): Return true for OMP_DIRECTIVE_P.
(set_bb_for_stmt): Undo change to check currently_expanding_to_rtl.
(verify_stmt): Do not handle OMP_DIRECTIVE_P.
(gather_blocks_in_sese_region): New.
(struct move_stmt_d): Declare.
(move_stmt_r): New.
(move_block_to_fn): New.
(move_sese_region_to_fn): New.
* passes.c (init_optimization_passes): Schedule
pass_expand_omp after pass_init_datastructures.
* tree-ssa-operands.c (get_expr_operands): Handle
OMP_PARALLEL, OMP_SECTIONS, OMP_FOR, OMP_RETURN_EXPR,
OMP_SINGLE, OMP_MASTER, OMP_ORDERED, OMP_CRITICAL.
testsuite/
* testsuite/gcc.dg/gomp/for-13.c: Use -fdump-tree-ompexp.
* testsuite/gcc.dg/gomp/critical-1.c: Likewise.
* testsuite/gcc.dg/gomp/critical-3.c: Likewise.
* testsuite/gcc.dg/gomp/empty.c: Likewise.
* testsuite/gcc.dg/gomp/ordered-1.c: Likewise.
* testsuite/gcc.dg/gomp/for-4.c: Likewise.
* testsuite/gcc.dg/gomp/for-6.c: Likewise.
* testsuite/gcc.dg/gomp/master-3.c: Likewise.
* testsuite/gcc.dg/gomp/for-8.c: Likewise.
* testsuite/gcc.dg/gomp/for-10.c: Likewise.
* testsuite/gcc.dg/gomp/for-18.c: Likewise.
* testsuite/gcc.dg/gomp/for-5.c: Likewise.
* testsuite/gcc.dg/gomp/for-7.c: Likewise.
* testsuite/gcc.dg/gomp/for-9.c: Likewise.
From-SVN: r109969
|
|
2006-01-16 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-operands.h (ssa_call_clobbered_cache_valid): Remove.
(ssa_ro_call_cache_valid): Ditto.
* tree-ssa-alias.c (sort_tags_by_id): New function.
(init_transitive_clobber_worklist): Ditto.
(add_to_worklist): Ditto.
(mark_aliases_call_clobbered): Ditto.
(compute_tag_properties): Ditto.
(set_initial_properties): Ditto.
(compute_call_clobbered): Ditto.
(compute_may_aliases): Call compute_call_clobbered and grouping.
(compute_flow_sensitive_aliasing): Remove clobbering related code.
(compute_flow_insensitive_aliasing): Grouping now happens in our
caller.
(setup_pointers_and_addressables): Remove clobbering related code.
(add_may_alias): Ditto.
(replace_may_alias): Ditto.
(get_nmt_for): Ditto.
(create_global_var):
(is_escape_site): Return an escape_type enumeration.
* tree-flow-inline.h (is_call_clobbered): Global var does not
imply call clobbered.
(mark_call_clobbered): Take a reason for marking this. Remove
marking of globalness, and cache invalidation.
(clear_call_clobbered): Remove cache invalidation code.
* tree-dfa.c (dump_variable): If details is on, dump the reason
for escaping.
* tree-outof-ssa.c (create_temp): Copy escape mask from original
variable.
* tree-flow.h (struct ptr_info_def): Add escape mask member.
(struct var_ann_d): Ditto.
(enum escape_type): New.
(mark_call_clobbered): Adjust prototype.
* tree-ssa-structalias.c (update_alias_info): Unmodifiable vars
are never call clobbered.
Record reasons for escaping.
* tree-ssa-structalias.h (is_escape_site): Update prototype.
* tree-ssa-operands.c (ssa_call_clobbered_cache_valid): Remove.
(ssa_ro_call_cache_valid): Ditto.
(clobbered_v_may_defs): Ditto.
(clobbered_vuses): Ditto.
(ro_call_vuses): Ditto.
(clobber_stats): New.
(init_ssa_operands): Zero out clobber stats.
(fini_ssa_operands): Print out clobber stats.
(get_call_expr_operands): Pass callee fndecl to
add_call_read_ops).
(add_call_clobber_ops): Remove use of cache.
Add use of PURE_CONST information.
(add_call_read_ops): Remove use of cache.
Add use of static not_read information.
From-SVN: r109938
|
|
* tree-ssa-threadupdate.c (threaded_edges): New VEC to
hold edge pairs.
(mark_threaded_blocks, register_jump_thread): New functions.
(thread_through_all_blocks): Remove unwanted argument. No
longer rely on e->aux to communicate thread target info.
Call mark_threaded_blocks. Release the threaded_blocks
bitmap and threaded_edges vector when complete.
* tree-ssa-dom.c (struct edge_info): Remove redirection_target field.
(threaded_blocks): Remove.
(tree_ssa_dominator_optimize): Remove initialization and
finalization of threaded_blocks. Simplify call to
thread_through_all_blocks.
(thread_across_edge): Call register_jump_thread rather than
storing thread information into e->aux.
(free_all_edge_infos): Simplify now that e->aux is no longer
used to communicate with thread_through_all_blocks.
* tree-flow.h (thread_through_all_blocks): Update prototype.
(register_jump_thread): Prototype.
From-SVN: r109602
|
|
spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math))
gcc:
2006-01-11 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/23109
PR tree-optimization/23948
PR tree-optimization/24123
* Makefile.in (tree-ssa-math-opts.o): Adjust dependencies.
* tree-cfg.c (single_noncomplex_succ): New.
* tree-flow.h (single_noncomplex_succ): Declare it.
* tree-ssa-math-opts.c (enum place_reciprocal): Remove.
* tree-ssa-math-opts.c (enum place_reciprocal): Remove.
(struct occurrence, occ_head, occ_pool, is_divide_by, compute_merit,
insert_bb, register_division_in, insert_reciprocals,
replace_reciprocal, free_bb): New.
(execute_cse_reciprocals_1): Rewritten.
(execute_cse_reciprocals): Adjust calls to execute_cse_reciprocals_1.
Do not commit any edge insertion. Always compute dominators and
create the allocation pool.
* target-def.h (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL): New.
* target.h (struct gcc_target): Add min_divistions_for_recip_mul.
* targhooks.c (default_min_divistions_for_recip_mul): New.
* targhooks.h (default_min_divistions_for_recip_mul): New prototype.
* passes.c (init_optimization_passes): Run recip after tree loop
optimizations.
* doc/tm.texi (Misc): Document TARGET_MIN_DIVISIONS_FOR_RECIP_MUL.
gcc/testsuite:
2006-01-11 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/23109
PR tree-optimization/23948
PR tree-optimization/24123
* gcc.dg/tree-ssa/recip-3.c, gcc.dg/tree-ssa/recip-4.c,
gcc.dg/tree-ssa/recip-5.c, gcc.dg/tree-ssa/recip-6.c,
gcc.dg/tree-ssa/recip-7.c, gcc.dg/tree-ssa/pr23109.c,
g++.dg/tree-ssa/pr23948.C: New testcases.
* gcc.dg/tree-ssa/recip-2.c, gcc.dg/tree-ssa/pr23234.c: Provide
three divisions in order to do the optimization.
From-SVN: r109578
|
|
UPDATE_EH_INFO.
* tree-cfg.c (bsi_replace): Rename final argument from
PRESERVE_EH_INFO to UPDATE_EH_INFO. Fix typo in last
change (stmt -> orig_stmt).
* tree-eh.c (verify_eh_throw_stmt_node): New function.
(bsi_remove): Add new argument. Remove EH information
if requested.
(verify_eh_throw_table_statements): New function.
(bsi_remove): Add new argument REMOVE_EH_INFO. All callers
updated.
* tree-optimize.c (execute_free_cfg_annotations): Verify
the EH throw statement table after removing annotations.
* except.h (verify_eh_throw_table_statements): Prototype.
* tree-flow.h (bsi_remove): Update prototype.
* tree-vrp.c (remove_range_assertions): Add new argument to
bsi_remove call.
* tree-ssa-loop-im.c (move_computations_stmt): Likewise.
* tree-complex.c (expand_complex_div_wide): Likewise.
* tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Likewise
* tree-tailcall.c (eliminate_tailcall): Likewise.
* tree-ssa-dse.c (dse_optimize_stmt): Likewise.
* tree-ssa-loop-ivopts.c (remove_statement): Likewise.
* tree-nrv.c (tree_nrv): Likewise.
* tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Likewise.
* tree-if-conv.c (tree_if_convert_cond_expr): Likewise.
(combine_blocks): Likewise.
* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Likewise.
* tree-cfgcleanup.c (cleanup_ctrl_expr_graph): Likewise.
(cleanup_control_flow): Likewise.
(remove_forwarder_block): Likewise.
* tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
* tree-sra.c (sra_replace): Likewise.
* tree-ssa-forwprop.c (forward_propagate_into_cond): Likewise.
(forward_propagate_single_use_vars): Likewise.
* tree-ssa-dce.c (remove_dead_stmt): Likewise.
* tree-inline.c (expand_call_inline): Likewise.
* tree-vect-transform.c (vect_transform_loop): Likewise.
* tree-outof-ssa.c (rewrite_trees): Likewise.
* tree-cfg.c (make_goto_expr_edges): Likewise.
(cleanup_dead_labels): Likewise.
(tree_merge_blocks, remove_bb, disband_implicit_edges): Likewise.
(bsi_move_before, bsi_move_after): Likewise.
(bsi_move_to_bb_end, try_redirect_by_replacing_jump): Likewise
(tree_redirect_edge_and_branch, tree_split_block): Likewise.
From-SVN: r109421
|
|
2006-01-05 Richard Guenther <rguenther@suse.de>
Diego Novillo <dnovillo@redhat.com>
* tree-pass.h (TODO_remove_unused_locals): Define.
* gimple-low.c (expand_var_p, remove_useless_vars,
pass_remove_useless_vars): Remove. Update all users.
* tree-ssa-live.c (mark_all_vars_used_1): Handle SSA names.
(remove_unused_locals): New function.
* tree-flow.h (remove_unused_locals): Declare.
* passes.c (execute_todo): Call remove_unused_locals if
TODO_remove_unused_locals is set.
* tree-into-ssa.c (pass_build_ssa): Add TODO_remove_unused_locals.
* tree-ssa-dce.c (pass_dce): Likewise.
* tree-outof-ssa.c (pass_del_ssa): Likewise.
* gcc.dg/tree-ssa/loop-11.c: Deal with removed vars pass.
* gcc.dg/tree-ssa/loop-8.c: Likewise.
* gcc.dg/tree-ssa/loop-1.c: Likewise.
* gcc.dg/tree-ssa/pr23294.c: Likewise.
* gcc.dg/tree-ssa/pr21985.c: Likewise.
* gcc.dg/tree-ssa/loop-14.c: Likewise.
* gcc.dg/tree-ssa/loop-2.c: Likewise.
* gcc.dg/tree-ssa/loop-3.c: Likewise.
* gcc.dg/tree-ssa/loop-4.c: Likewise.
* gcc.dg/tree-ssa/pr21171.c: Likewise.
* gcc.dg/tree-ssa/loop-5.c: Likewise.
* gcc.dg/tree-ssa/loop-10.c: Likewise.
* gcc.dg/tree-ssa/loop-6.c: Likewise.
* treelang/compile/extravar.tree: Likewise.
* g++.dg/tree-ssa/ssa-cast-1.C: Likewise.
* g++.dg/tree-ssa/pointer-reference-alias.C: Likewise.
* g++.dg/tree-ssa/ssa-sra-1.C: Likewise.
* g++.dg/tree-ssa/ssa-sra-2.C: Likewise.
* gcc.dg/tree-ssa/20031106-6.c: Disable SRA.
Co-Authored-By: Diego Novillo <dnovillo@redhat.com>
From-SVN: r109379
|
|
2006-01-05 Richard Guenther <rguenther@suse.de>
* tree-flow.h (struct fieldoff): Decompose field to
type, size and decl.
* tree-ssa-alias.c (create_sft): Take type as parameter.
(create_overlap_variables_for): Store type, size and decl
in the fieldoff structure.
* tree-ssa-structalias.c (fieldoff_compare): Adjust users
of struct fieldoff.
(push_fields_onto_fieldstack): Likewise.
(create_variable_info_for): Likewise. Use offset for the
SFT name if the decl is not available.
From-SVN: r109376
|
|
2005-12-29 Daniel Berlin <dberlin@dberlin.org>
* tree.h (VALUE_HANDLE_VUSES): New.
(struct tree_value_handle): Add vuses.
* tree-vn.c (struct val_expr_pair_d): Remove stmt, add vuses.
(vn_compute): Remove stmt argument.
Don't use vuses in hash value computation.
(val_expr_pair_eq): Compare vuse lists.
(copy_vuses_from_stmt): New function.
(shared_vuses_from_stmt): Ditto.
(vn_add): Rewrite in terms of vn_add_with_vuses.
(vn_add_with_vuses): New function.
(vn_lookup): Rewrite in terms of vn_lookup_with_vuses.
(vn_lookup_with_vuses): New function.
(vuses_compare): New function.
(print_creation_to_file): Ditto.
(vn_lookup_or_add): Rewrite to handle vuses.
(sort_vuses): New function.
(vn_lookup_or_add_with_vuses): Ditto.
(vn_init): Initialize shared_lookup_vuses.
(vn_delete): Free shared_lookup_vuses.
* tree-ssa-pre.c: Update todo list.
(bb_value_sets_t): Add rvuse_in, rvuse_out, rvuse_gen, and
rvuse_kill.
(RVUSE_IN): New macro.
(RVUSE_GEN): Ditto.
(RVUSE_KILL): Ditto.
(RVUSE_OUT): Ditto.
(modify_expr_node_pool): New function.
(pretemp): New.
(storetemp): Ditto.
(mergephitemp): Ditto.
(prephitemp): Ditto.
(struct expr_pred_trans_d): Add vuses member.
(expr_pred_trans_eq): Compare vuses.
(phi_trans_lookup): Add vuses argument.
(phi_trans_add): Ditto.
(translate_vuses_through_block): New function.
(phi_translate): Use vuses to ask about those expressions that can
have vuses.
Properly translate virtual uses through phis, and use
vn_lookup_or_add_with vuses. Handle tcc_reference.
(phi_translate_set): Don't add pointless translations to the
cache.
(get_representative): New function.
(vuses_dies_in_block_x): Ditto.
(valid_in_set): Add block argument. Check virtual use validity.
(clean): Add block argument. Update call to valid_in_set
(compute_antic_aux): Update call to clean.
(dump_bitmap_of_names): New function.
(compute_vuse_representatives): Ditto.
(compute_rvuse): Ditto.
(can_value_number_call): Modified to accept calls with vuses.
(can_value_number_operation): New function.
(can_PRE_operation): Ditto.
(need_creation): New vector of stores that may need creation.
(find_or_generate_expression): use can_PRE_operation.
(create_expression_by_pieces): Handle INDIRECT_REF.
Only create one temp until we have to change types.
Mark new vars for renaming.
(insert_into_preds_of_block): Ignore loopiness of loads.
Use can_PRE_operation.
Only create one temp until we have to chnge types.
(insert_aux): Use can_PRE_operation.
Don't pass name to insert_into_preds_of_block.
(insert_extra_phis): Only use one temp until we have to change
types.
(poolify_tree): New function.
(modify_expr_template): New var.
(poolify_modify_expr): New function.
(insert_fake_stores): Ditto.
(realify_fake_stores): Ditto.
(compute_avail): Use can_value_number_operation.
(mark_operand_necessary): Return NULL for non-SSA names.
(remove_dead_inserted_code): Update comment.
(init_pre): Initialize pretemp, need_creation, storetemp,
mergephitemp, prephitemp.
Create modify_expr_node_pool.
(fini_pre): Free modify_expr_node_pool and need_creation array.
(execute_pre): Call insert_fake_stores, compute_rvuse, and
realify_fake_stores.
* tree-flow.h (vn_compute): Fix prototype.
(vn_add): Ditto.
(vn_lookup): Ditto.
(sort_vuses): New.
(vn_lookup_or_add_with_vuses): Ditto.
(vn_add_with_vuses): Ditto.
(vn_lookup_with_vuses): Ditto.
* passes.c (pass_may_alias): Add.
From-SVN: r109180
|
|
2005-12-22 Daniel Berlin <dberlin@dberlin.org>
* ipa-reference.c (get_reference_vars_info_from_cgraph): Use
function_ann.
(get_local_reference_vars_info): Ditto.
(get_global_reference_vars_info): Ditto.
(analyze_function): Ditto.
(clean_function): Ditto.
* tree-dfa.c (create_function_ann): New function.
* tree-flow-inline.h (var_ann): FUNCTION_DECL's don't have
var_ann.
(function_ann): New.
(get_function_ann): Ditto.
* tree-flow.h (tree_ann_type): Add FUNCTION_ANN.
(struct var_ann_d): Move reference_vars_info to function annotation.
(struct function_ann_d): New.
(union tree_ann_d): Add function_ann.
From-SVN: r108950
|
|
VEC(tree, gc) *.
* tree-flow.h (struct var_ann_d): Change type of
may_aliases field to VEC(tree, gc) *.
(may_aliases): Declaration changed.
* tree-ssa-alias.c (group_aliases, add_may_alias,
replace_may_alias, dump_may_aliases_for,
is_aliased_with, add_type_alias, new_type_alias):
Work with VEC(tree, gc) * instead of varray.
* tree-flow-inline.h (may_aliases): Ditto.
* tree-ssa.c (verify_flow_insensitive_alias_info,
verify_name_tags): Ditto.
* tree-ssa-operands.c (add_stmt_operand): Ditto.
From-SVN: r108804
|
|
makes_aliased_stores fields.
* tree-flow.h (struct stmt_ann_d): Remove
makes_aliased_loads and makes_aliased_stores fields.
* tree-ssa-ccp.c (likely_value): Do not use makes_aliased_stores
and makes_aliased_loads fields.
* tree-ssa-dom.c (eliminate_redundant_computations): Do not
use makes_aliased_stores.
* tree-ssa-operands.c (clobbered_aliased_loads,
clobbered_aliased_stores, ro_call_aliased_loads): Removed.
(build_ssa_operands, add_stmt_operand, add_call_clobber_ops,
add_call_read_ops): Do not set makes_aliased_stores and
makes_aliased_loads fields.
* tree-ssa.c (verify_ssa): Do not verify makes_aliased_stores
field.
From-SVN: r108766
|
|
* tree-flow-inline.h (set_default_def, default_def): Kill.
* tree-dfa.c (default_defs): New global variable.
(default_def, set_default_def): New functions.
* tree-ssa.c (init_tree_ssa, delete_tree_ssa): Add default_def hash.
* tree-flow.h (struct var_ann_d): Kill default_def field.
(set_default_def, default_def): Update prototype.
(default_defs): Declare.
From-SVN: r108712
|
|
2005-12-15 Richard Guenther <rguenther@suse.de>
* tree-flow.h (okay_component_ref_for_subvars): Remove.
(get_ref_base_and_extent): Declare.
* tree-dfa.c (okay_component_ref_for_subvars): Remove.
(get_ref_base_and_extent): New function.
* tree-ssa-alias.c (find_used_portions): Use it.
* tree-ssa-structalias.c (get_constraint_for_component_ref):
Likewise.
* tree-ssa-operands.c (get_expr_operands): Likewise.
From-SVN: r108568
|
|
2005-12-11 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
* tree-flow.h: Allow compilation with a C++ compiler.
(struct edge_prediction): Prefix all field names with "ep_".
* predict.c (tree_predicted_by_p): Likewise for struct
edge_prediction.
(tree_predict_edge, combine_predictions_for_bb): Likewise.
(remove_predictions_associated_with_edge): Likewise.
From-SVN: r108430
|
|
* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Remove
reassociation code.
* passes.c (init_optimization_passes): Run reassociation again
after loop optimizations.
* tree-ssa-dom.c (thread_across_edge): Canonicalize condition
if necessary.
(optimize_stmt): Ditto.
(canonicalize_comparison): New function.
* tree-ssa-operands.c (swap_tree_operands): Make external.
(get_expr_operands): Stop auto-canonicalization.
* tree-ssa-reassoc.c: Rewrite.
(init_optimization_passes):
* tree-flow.h (swap_tree_operands): Prototype.
* Makefile.in (tree-ssa-reassoc.o): Update dependencies.
* gcc.dg/tree-ssa/ssa-pre-2.c: Update due to reassociation changes.
* gcc.dg/tree-ssa/reassoc-1.c: Likewise.
* gcc.dg/tree-ssa/reassoc-2.c: Likewise.
* gcc.dg/tree-ssa/reassoc-3.c: Likewise.
* gcc.dg/tree-ssa/reassoc-4.c: Likewise.
* gcc.dg/tree-ssa/reassoc-5.c: New.
* gcc.dg/tree-ssa/reassoc-6.c: New.
* gcc.dg/tree-ssa/reassoc-7.c: New.
* gcc.dg/tree-ssa/reassoc-8.c: New.
* gcc.dg/tree-ssa/reassoc-9.c: New.
* gcc.dg/tree-ssa/reassoc-10.c: New.
* gcc.dg/tree-ssa/reassoc-11.c: New.
From-SVN: r108425
|
|
In gcc/
2005-12-05 Daniel Berlin <dberlin@dberlin.org>
* print-tree.c (print_node): Ditto.
* tree-dfa.c (add_referenced_var): Tag's don't have DECL_INITIAL.
* tree-dump.c (dequeue_and_dump): Check for decl_common structure
before accessing DECL_ARTIFICIAL.
Handle new tag tree codes.
* tree-flow-inline.h (clear_call_clobbered): Update for tag
changes.
(unmodifiable_var_p): Ditto.
* tree-flow.h (mem_tag_kind): Remove.
(struct var_ann_d): Remove mem_tag_kind member.
* tree-gimple.c (is_gimple_reg): Tags are not gimple registers.
* tree-pretty-print.c (dump_generic_node): Handle memory tags.
* tree-ssa-alias.c (init_alias_info): Update for memory tag changes.
(group_aliases): Ditto.
(setup_pointers_and_addressables): Ditto.
(is_escape_site): Ditto.
(may_alias_p): Ditto.
(create_tag_raw): New function.
(create_memory_tag): Use it.
(dump_alias_info): Update for tags.
(may_be_aliased): Ditto.
(add_type_alias): Ditto.
(new_type_alias): Ditto.
(create_sft): Ditto.
(create_structure_vars): Ditto.
* tree-ssa-ccp.c (get_default_value): Ditto.
* tree-ssa-operands.c (get_expr_operands): Ditto.
(add_stmt_operand): Ditto.
(add_call_clobber_ops): Remove duplicated condition.
* tree-ssa.c (verify_flow_insensitive_alias_info): Update for
tags.
* tree-tailcall.c (suitable_for_tail_opt_p): Ditto.
* tree-vect-transform.c (vect_create_data_ref_ptr): Ditto.
* tree.c (init_ttree): Update structures for new tree codes.
(tree_code_size): Update sizes for new tree codes.
(make_node_stat): Don't try to set common things on minimal
structures.
(tree_node_structure): Update for tags.
(is_global_var): Ditto.
* tree.def: Add new tree codes.
* tree.h (MTAG_P): New macro.
(TREE_MEMORY_TAG_CHECK): Ditto.
(SSA_VAR_P): Update for tags.
(struct tree_memory_tag): New structure.
(MTAG_GLOBAL): New macro.
(union tree_node): Add memory tag member.
* treestruct.def (TS_MEMORY_TAG): New.
In gcc/cp
2005-12-05 Daniel Berlin <dberlin@dberlin.org>
* ptree.c (cxx_print_decl): Update to check for decl_common
structure.
From-SVN: r108102
|
|
functions are now in tree-phinodes.c.
2005-11-18 James A. Morrison <phython@gcc.gnu.org>
* tree-flow.h (reserve_phi_args_for_new_edge, create_phi_node,
add_phi_arg, remove_phi_args, remove_phi_node phi_reverse): Mention that these functions are now in tree-phinodes.c.
From-SVN: r107185
|
|
2005-11-10 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-alias.c (compute_may_aliases): Remove call to
delete_old_heap_vars.
* tree-dfa.c (referenced_var_remove): Remove function.
* tree-ssa.c (init_tree_ssa): Call init_alias_heapvars.
(delete_tree_ssa): Remove call to delete_old_heapvars.
Add call to delete_alias_heapvars.
* tree-flow.h (referenced_var_remove): Remove prototype
(init_alias_heapvars): New prototype.
(delete_alias_heapvars): Ditto.
* Makefile.in (tree-ssa-structalias.o): Add
gt-tree-ssa-structalias.o
(GTFILES): Add tree-ssa-structalias.h and
tree-ssa-structalias.c.
(s-gtype): Add gt-tree-ssa-structalias.h.
* tree-ssa-structalias.c (heapvars): Remove.
(oldheapvars): Remove.
(heapvar_for_stmt): New variable.
(heapvar_lookup): New function.
(heapvar_insert): Ditto.
(get_constraint_for): See if we have an old heapvar
to reuse.
(init_alias_heapvars): New function.
(delete_alias_heapvars): Ditto.
Add include of gt-tree-ssa-structalias.h.
From-SVN: r106743
|
|
variables in clobbered)
2005-11-08 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/23382
* tree-ssa-alias.c (compute_may_aliases): Call
delete_old_heap_vars.
* tree-dfa.c (referenced_var_remove): New function.
* tree-ssa.c (delete_tree_ssa): Call delete_old_heap_vars.
* tree-flow.h (referenced_var_remove): Add prototype.
(delete_old_heap_vars): Ditto.
* tree-ssa-structalias.c (heapvars): New variable.
(oldheapvars): Ditto.
(get_constraint_for): Put heap vars on heapvars list.
(delete_old_heap_vars): New function.
From-SVN: r106643
|
|
array_ref_contains_indirect_ref.
2005-11-04 Richard Guenther <rguenther@suse.de>
* tree-flow.h (ref_contains_indirect_ref): Rename to
array_ref_contains_indirect_ref.
* tree-flow-inline.h (ref_contains_indirect_ref): Likewise.
(array_ref_contains_indirect_ref): Make comment match the code
and vice-versa.
(ref_contains_array_ref): Likewise.
* tree-ssa-structalias.c (find_func_aliases): Remove call to
ref_contains_indirect_ref.
* tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined):
Rename calls to ref_contains_indirect_ref.
From-SVN: r106499
|
|
PR 23714
* builtins.c (expand_builtin_trap): Export.
* expr.h (expand_builtin_trap): Declare.
* expr.c (expand_assignment): Emit a trap for integral offsets
from registers that weren't reduced to bitpos.
* tree-cfg.c (mark_array_ref_addressable_1): Remove.
(mark_array_ref_addressable): Remove.
* tree-flow.h (mark_array_ref_addressable): Remove.
* tree-optimize.c (execute_cleanup_cfg_post_optimizing): Don't call it.
From-SVN: r105449
|
|
(complete loop unrolling))
PR tree-optimization/24226
* tree-cfg.c (remove_bb): Clean up unreachable loops.
* tree-flow.h (free_numbers_of_iterations_estimates_loop): Declare.
* tree-ssa-loop-niter.c (free_numbers_of_iterations_estimates_loop):
Export.
From-SVN: r105151
|
|
PR 23714
* tree-cfg.c (mark_array_ref_addressable_1): New.
(mark_array_ref_addressable): New.
* tree-flow.h (mark_array_ref_addressable): Declare.
* tree-optimize.c (execute_cleanup_cfg_post_optimizing): Use it.
From-SVN: r105022
|
|
true.
2005-09-20 Daniel Berlin <dberlin@dberlin.org>
* tree-data-ref.c (analyze_array_indexes): Only estimate when
estimate_only is true.
* tree-flow.h (ref_contains_indirect_ref): New prototype.
* tree-flow-inline.h (ref_contains_indirect_ref): Moved from
tree-ssa-structalias.c
* tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): Use
ref_contains_indirect_ref.
* tree-ssa-structalias.c (ref_contains_indirect_ref): Moved.
From-SVN: r104518
|
|
* tree-flow.h (merge_alias_info): Declare.
* tree-ssa-copy.c (merge_alias_info): Export.
* tree-vect-transform.c (vect_create_index_for_vector_ref): Remove.
(vect_create_data_ref_ptr): Use create_iv directly.
(vectorizable_load): Use correct types for integer constants.
(vect_generate_tmps_on_preheader): Likewise.
(vect_gen_niters_for_prolog_loop): Likewise.
From-SVN: r104418
|
|
* tree-pass.h, tree-flow.h, tree-ssa-dce.c: Revert last change.
* tree-ssa-loop.c (pass_vect_dce): Remove.
* passes.c (init_optimization_passes): Add pass_dce as a sub-pass
of pass_vectorize.
From-SVN: r104382
|
|
* tree-pass.h (pass_vect_dce): Declare.
* passes.c (init_optimization_passes): Add it.
* tree-flow.h (tree_ssa_dce): Declare.
* tree-ssa-dce.c (tree_ssa_dce): Export.
* tree-ssa-loop.c (tree_vectorize): Move current_loops check ...
(gate_tree_vectorize): ... here.
(pass_vect_dce): New.
From-SVN: r104376
|
|
PR tree-optimization/22236
* tree-cfg.c (print_pred_bbs, print_succ_bbs): Correctly print
successors and predecessors.
* tree-chrec.c (chrec_convert): Before converting, check that
sequences don't wrap.
* tree-data-ref.c (compute_estimated_nb_iterations): Moved ...
(analyze_array): Extern.
(find_data_references_in_loop): Remove call to
compute_estimated_nb_iterations.
* tree-data-ref.h (analyze_array): Declared.
* tree-flow-inline.h (single_ssa_tree_operand, single_ssa_use_operand,
single_ssa_def_operand, zero_ssa_operands): Fix documentation.
* tree-flow.h (scev_probably_wraps_p): Declare with an extra parameter.
* tree-scalar-evolution.c (instantiate_parameters_1): Factor entry
condition.
* tree-ssa-loop-ivcanon.c: Fix documentation.
* tree-ssa-loop-ivopts.c (idx_find_step): Add a fixme note.
* tree-ssa-loop-niter.c (compute_estimated_nb_iterations): ... here.
(infer_loop_bounds_from_undefined): New.
(estimate_numbers_of_iterations_loop): Use
infer_loop_bounds_from_undefined.
(used_in_pointer_arithmetic_p): New.
(scev_probably_wraps_p): Pass an extra parameter. Call
used_in_pointer_arithmetic_p. Check that AT_STMT is not null.
(convert_step): Fix documentation.
* tree-vrp.c (adjust_range_with_scev): Call instantiate_parameters.
Use initial_condition_in_loop_num and evolution_part_in_loop_num
instead of CHREC_LEFT and CHREC_RIGHT. Adjust the call to
scev_probably_wraps_p.
From-SVN: r103055
|
|
PR tree-optimization/22325
* tree-flow.h (compute_phi_arg_on_exit, force_expr_to_var_cost):
Declare.
* tree-scalar-evolution.c (scev_const_prop): Add generic final
value replacement.
* tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Split from ...
(force_var_cost): ... this function.
(compute_phi_arg_on_exit): Export.
From-SVN: r102426
|
|
* expr.c (highest_pow2_factor): Make extern.
* tree-data-ref.c (ptr_decl_may_alias_p): New function.
(ptr_ptr_may_alias_p, may_alias_p, record_ptr_differ_p,
record_array_differ_p, array_ptr_differ_p): Likewise.
(base_object_differ_p): Rename (from array_base_name_differ_p). Support
additional cases. Call the above functions.
(base_addr_differ_p): Moved from tree-vect-analyze.c. Call
base_object_differ_p when there are two base objects. Otherwise, compare
base address and offset. Call may_alias_p.
(dump_data_reference): Use a correct field name.
(analyze_array): Make static. Initialize new data-ref fields.
(analyze_indirect_ref): New function.
(init_data_ref): Initialize new data-ref fields.
(strip_conversion): Moved from tree-vect-analyze.c.
(analyze_offset_expr, get_ptr_offset, address_analysis, object_analysis):
Likewise.
(analyze_offset): New function.
(create_data_ref): Likewise.
(initialize_data_dependence_relation): Call base_addr_differ_p. Compare
dimensions for ARRAY_REFs only.
(build_classic_dist_vector): Make static.
(access_functions_are_affine_or_constant_p): Call macro to get the
address of access functions.
(compute_all_dependences): Add new parameter
compute_self_and_read_read_dependences. Compute self and read-read
dependences if it is true.
(find_data_references_in_loop): Call create_data_ref. Initialize new
data-ref fields.
(compute_data_dependences_for_loop): Add new parameter
compute_self_and_read_read_dependences. Remove parameter nb_loops,
compute nb_loops. Call compute_all_dependences, build_classic_dist_vector
and build_classic_dir_vector with correct parameters.
(analyze_all_data_dependences): Call compute_data_dependences_for_loop with
correct parameters. Compare dimensions for ARRAY_REFs only.
(free_data_refs): Call macro to free access functions.
* tree-data-ref.h (struct first_location_in_loop): New structure. Move
fields from stmt_vinfo.
(struct base_object_info): New structure.
(struct data_reference): Move fields to base_object_info. Add fields
first_location and object_info for above structures. Move fields from
stmt_info: memtag, ptr_info, subvars, misalignment. Add new field aligned_to.
Add macros to access the new fields.
Update functions declarations.
* tree-flow.h (is_aliased_with): Declare.
* tree-loop-linear.c (linear_transform_loops): Call
compute_data_dependences_for_loop with correct parameters.
* tree-ssa-alias.c (is_aliased_with): New function.
* tree-vect-analyze.c (vect_get_ptr_offset): Remove.
(vect_analyze_offset_expr, vect_base_addr_differ_p): Likewise.
(vect_analyze_data_ref_dependence): Get ddr. Remove call to
vect_base_addr_differ_p, compute_subscript_distance and
build_classic_dist_vector. Add printings. Check absolute value of
distance.
(vect_analyze_data_ref_dependences): Go through ddrs instead of data-refs.
(vect_compute_data_ref_alignment): Get the fields of data-ref instead of
stmt. Check aligned_to. Check if the base is aligned. Remove conversion
to bytes. Add printing.
(vect_compute_data_refs_alignment): Go through loads and stores in one loop.
(vect_enhance_data_refs_alignment, vect_analyze_data_refs_alignment,
vect_analyze_data_ref_access): Likewise.
(vect_analyze_pointer_ref_access): Remove.
(vect_address_analysis, vect_object_analysis): Likewise.
(vect_analyze_data_refs): Call compute_data_dependences_for_loop to find
and analyze data-refs in the loop.
* tree-vect-transform.c (vect_create_addr_base_for_vector_ref): Get the
fields of data-ref instead of stmt. Add init to the offset from the base.
(vect_create_data_ref_ptr): Get the fields of data-ref instead of stmt.
(vect_update_init_of_dr): Likewise.
(vect_update_inits_of_drs): Go through loads and stores in one loop.
* tree-vectorizer.c (new_stmt_vec_info): Remove initialization of removed
fields.
(new_loop_vec_info): Initialize new fields.
(destroy_loop_vec_info): Free new fields.
(vect_strip_conversion): Remove.
* tree-vectorizer.h (enum verbosity_levels): Add new verbosity level.
(struct _loop_vec_info): Unify data_ref_writes and data_ref_reads into
datarefs. Add new field ddrs.
Add macros for the new fields access.
(struct _stmt_vec_info): Remove: base_address, initial_offset, step,
base_aligned_p, misalignment, memtag, ptr_info and subvars.
Remove their macros.
* tree.h (highest_pow2_factor): Declare.
From-SVN: r102356
|
|
gcc:
2005-07-21 Paolo Bonzini <bonzini@gnu.org>
Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/19210
* common.opt (Wunsafe-loop-optimizations, funsafe-loop-optimizations):
New.
* Makefile.in (tree-ssa-loop-niter.o): Depend intl.o.
* loop-iv.c (get_simple_loop_desc): If -funsafe-loop-optimizations,
rely on unproven assumptions.
* predict.c (predict_loops): Adjust call to number_of_iterations_exit.
* tree-flow.h (number_of_iterations_exit): Add final parameter.
* tree-scalar-evolution.c (number_of_iterations_in_loop): Adjust call
to number_of_iterations_exit.
* tree-ssa-loop-ivcanon.c (empty_loop_p): Likewise.
* tree-ssa-loop-ivopts.c (niter_for_exit): Likewise.
* tree-ssa-loop-niter.c (find_loop_niter,
estimate_numbers_of_iterations_loop): Likewise.
(number_of_iterations_exit): Honor the new options.
* doc/invoke.texi (Wunsafe-loop-optimizations,
funsafe-loop-optimizations): Document them.
gcc/testsuite:
2005-07-21 Paolo Bonzini <bonzini@gnu.org>
* gcc.dg/tree-ssa/pr19210-1.c: New.
* gcc.dg/tree-ssa/pr19210-2.c: New.
Co-Authored-By: Zdenek Dvorak <dvorakz@suse.cz>
From-SVN: r102225
|
|
2005-07-20 James A. Morrison <phython@gcc.gnu.org>
* tree.h (tree_expr_nonzero_p): Export.
* fold-const.c (tree_expr_nonzero_p): Likewise.
Return true for CALL_EXPRs that are alloca calls.
(fold_binary): Use omit_one_operand when checking EQ_EXPRs or NE_EXPRs
against zero.
* tree-flow.h (expr_computes_nonzero): Remove.
* tree-vrp.c (expr_computes_nonzero): Remove.
(vrp_expr_computes_nonzero): Use tree_expr_nonzero_p.
(extract_range_from_unary_expr): Likewise.
* tree-ssa-dom.c (record_equivalences_from_stmt): Use
tree_expr_nonzero_p.
From-SVN: r102201
|
|
var_decl in is_old_name, at tree-into-ssa.c:466)
2005-07-18 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/22483
* tree-complex.c (create_components): Use
safe_referenced_var_iterator and FOR_EACH_REFERENCED_VAR_SAFE.
* tree-flow-inline.h (fill_referenced_var_vec): New function.
* tree-flow.h (safe_referenced_var_iterator): New structure.
(FOR_EACH_REFERENCED_VAR_SAFE): New macro.
* tree-ssa-alias.c (setup_pointers_and_addressables): Use
safe_referenced_var iterator.
(add_type_alias): Ditto.
From-SVN: r102150
|
|
2005-07-16 Danny Berlin <dberlin@dberlin.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
* Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c,
ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c,
ipa-type-escape.h, tree-promote-statics.c
* ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c,
ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h,
tree-promote-statics.c: new files.
* alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p,
nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1,
int nonlocal_set_p, mark_constant_function): Deleted.
(rest_of_handle_cfg): Removed call to mark_constant_function.
(nonoverlapping_component_refs_p): Added calls to support
type based aliasing.
* tree-ssa-alias.c (may_alias_p,
compute_flow_insensitive_aliasing): Ditto.
* calls.c (flags_from_decl_or_type): Removed reference to
cgraph_rtl_info.
(flags_from_decl_or_type): Support ECF_POINTER_NO_CAPTURE attribute.
* c-common.c (handle_pointer_no_capture_attribute): New function
and added pointer_no_capture attribute.
* c-typeck.c (convert_arguments): Make builtins tolerant of having
too many arguments. This is necessary for Spec 2000.
* cgraph.h (const_function, pure_function): Removed.
* common.opt: Added "fipa-pure-const", "fipa-reference",
"fipa-type-escape", and "ftree-promote-static".
* opts.c: Ditto.
* passes.c: Added ipa and tree-promote-statics passes.
* timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE,
TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS.
* tree.h: Support ECF_POINTER_NO_CAPTURE attribute.
* tree-dfa.c (referenced_var_lookup_if_exists): New function.
* tree-flow.h: Added exposed sra calls and addition of
reference_vars_info field for FUNCTION_DECLS.
* tree-pass.h: Added passes.
* tree-sra.c: (sra_init_cache): New function.
(sra_insert_before, sra_insert_after) Made public.
(type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p
and made public.
* tree-ssa-alias.c (dump_alias_stats): Added stats for type based
aliasing. (may_alias_p): Added code to use type escape analysis to
improve alias sets.
* tree-ssa-operands.c (add_call_clobber_ops): Added parameter and
code to prune clobbers of static variables based on information
produced in ipa-reference pass. Changed call clobbering so that
statics are not marked as clobbered if the call does not clobber
them.
2005-07-16 Danny Berlin <dberlin@dberlin.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
* gcc.dg/tree-ssa/ssa-dce-2.c: Changed dg-options to run at -O2
since pure const detection cannot run at -O1 in c compiler.
* gcc.dg/tree-ssa/20030714-1.c Changed scanning patterns because we
can now optimize this case properly.
* gcc.dg/tree-ssa/sra-2.c: Changed to -O3 and removed xfail
because we now pass.
* gcc.dg/vect/vect-92.c: Removed out of bounds array access.
Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com>
From-SVN: r102098
|
|
* tree-flow.h (remove_empty_loops, single_dom_exit): Declare.
* passes.c (init_optimization_passes): Add pass_empty_loop.
* tree-pass.h (pass_empty_loop): Declare.
* tree-ssa-loop-ivcanon.c (empty_loop_p, remove_empty_loop,
try_remove_empty_loop, remove_empty_loops): New functions.
* tree-ssa-loop-ivopts.c (single_dom_exit): Export.
* tree-ssa-loop.c (tree_ssa_empty_loop, pass_empty_loop): New.
* gcc.dg/tree-ssa/loop-10.c: New test.
From-SVN: r101901
|
|
* Makefile.in (tree-ssa-alias.o): Depend on tree-ssa-structalias.h
* tree-cfg.c (CHECK_OP): Only test for is_gimple_val.
* tree-dfa.c (dump_subvars_for): New.
(debug_subvars_for): New.
(dump_variable): Show subvariables if VAR has them.
* tree-flow-inline.h (get_subvar_at): New.
(overlap_subvar): Change offset and size to unsigned HOST_WIDE_INT.
* tree-flow.h (struct ptr_info_def): Remove field pt_malloc.
Update all users.
(struct subvar): Change fields offset and size to unsigned
HOST_WIDE_INT.
(dump_subvars_for): Declare.
(debug_subvars_for): Declare.
(get_subvar_at): Declare.
(okay_component_ref_for_subvars): Change 2nd and 3rd argument
to unsigned HOST_WIDE_INT *.
(overlap_subvar): Likewise.
* tree-gimple.c (is_gimple_reg): Always return false for
SFTs and memory tags.
* tree-pass.h (pass_build_pta, pass_del_pta): Remove.
Update all callers.
* tree-ssa-alias.c: Include tree-ssa-structalias.h.
(compute_may_aliases): Call compute_points_to_sets.
(collect_points_to_info_for): Remove.
(compute_points_to_and_addr_escape): Remove.
(delete_alias_info): Call delete_points_to_sets.
(compute_flow_sensitive_aliasing): If the call to
find_what_p_points_to returns false, call set_pt_anything.
(add_may_alias): Set TREE_ADDRESSABLE when adding a new alias.
(set_pt_anything): Clear pi->pt_vars.
(set_pt_malloc): Remove.
(merge_pointed_to_info): Remove.
(add_pointed_to_expr): Remove.
(add_pointed_to_var): Remove.
(collect_points_to_info_r): Remove.
(is_escape_site): Make extern.
(create_sft): New.
(create_overlap_variables_for): Call it.
* tree-ssa-copy.c (merge_alias_info): Never merge
flow-sensitive alias information.
* tree-ssa-operands.c (get_expr_operands): Adjust variables
offset and size to be unsigned HOST_WIDE_INT.
(add_to_addressable_set): Rename from note_addressable.
Set TREE_ADDRESSABLE as the variables are added to the set.
Update all users.
(add_stmt_operand): Do not try to micro-optimize unmodifiable
operands into VUSEs when adding V_MAY_DEFs for members in an
alias set.
* tree-ssa-operands.h (add_to_addressable_set): Declare.
* tree-ssa-structalias.c: Include tree-ssa-structalias.h last.
(struct variable_info): Add bitfield is_heap_var.
(var_anyoffset, anyoffset_tree, anyoffset_id): Declare.
(new_var_info): Initialize is_heap_var.
(get_constraint_for): Add HEAP variables to the symbol table.
Mark them with is_heap_var.
(update_alias_info): New. Taken mostly from the old
compute_points_to_and_addr_escape.
(handle_ptr_arith): New.
(find_func_aliases): Call update_alias_info.
Call handle_ptr_info for tcc_binary expressions.
Call mark_stmt_modified.
(create_variable_info_for): If DECL has subvars, do not create
variables for its subvars. Always add all the fields.
(set_uids_in_ptset): If the solution includes ANYOFFSET and
SFTs, then add all the SFTs of the structure.
If VI->DECL is an aggregate with subvariables, add the SFT at
VI->OFFSET.
(find_what_p_points_to): If VI is an artificial variable,
translate to bitfields in SSA_NAME_PTR_INFO.
If the solution is empty, set pi->pt_vars to NULL
(init_base_vars): Create ANYOFFSET.
(compute_points_to_sets): Rename from create_alias_vars.
Make extern.
(pass_build_pta): Remove.
(delete_points_to_sets): Rename from delete_alias_vars.
(pass_del_pta): Remove.
* tree-ssa-structalias.h (struct alias_info): Move from
tree-ssa-alias.h.
(NUM_REFERENCES, NUM_REFERENCES_CLEAR, NUM_REFERENCES_INC,
NUM_REFERENCES_SET): Likewise.
(compute_points_to_sets, delete_points_to_sets): Declare.
testsuite/ChangeLog
* gcc.dg/tree-ssa/pta-fp.c: Use -fdump-tree-alias1.
From-SVN: r101841
|
|
* tree-vrp.c (simplify_using_ranges): Kill.
(vrp_finalize): Remove call to simplify_using_ranges.
(simplify_stmt_using_ranges): New function extracted from
simplify_using_ranges.
(simplify_div_or_mod_using_ranges): Likewise.
(simplify_abs_using_ranges): Likewise.
(simplify_cond_using_ranges): New function.
* tree-flow.h (simplify_stmt_using_ranges): Prototype.
* tree-ssa-propagate.c (substitute_and_fold): Call
simplify_stmt_using_ranges if we have range information.
* gcc.dg/tree-ssa/vrp17.c: New test.
From-SVN: r101685
|
|
2005-06-29 Daniel Berlin <dberlin@dberlin.org>
* tree-complex.c (complex_variable_components): Now a hashtable.
(cvc_lookup): Ditto.
(cvc_insert): Ditto.
(create_components): Use referenced var iterator.
Initialize hashtable. Use cvc_insert/lookup.
(extract_components): Use cvc_insert/lookup.
(update_complex_components): Ditto.
(update_complex_components_on_edge): Ditto.
* tree-dfa.c (referenced_vars): Now a hashtable.
(dump_referenced_vars): Use iterator.
(referenced_var_lookup): New function.
(referenced_var_insert): Ditto.
(add_referenced_var): Use referenced_var_insert.
(mark_new_vars_to_rename): Use DECL_UID.
* tree-flow-inline.h (first_htab_element): New function.
(end_htab_p): Ditto.
(next_htab_element): Ditto.
(first_referenced_var): Ditto.
(end_referenced_vars_p): Ditto.
(next_referenced_var): Ditto.
(is_call_clobbered): Use DECL_UID.
(mark_call_clobbered): Ditto.
(clear_call_clobbered): Ditto.
(mark_non_addressable): Ditto.
* tree-flow.h (htab_iterator): New struct.
(FOR_EACH_HTAB_ELEMENT): New macro.
(struct int_tree_map): New struct.
(int_tree_map_hash): Prototype.
(int_tree_map_eq): Ditto.
(referenced_var_iterator): Ditto.
(FOR_EACH_REFERENCED_VAR): New macro.
(referenced_vars): Now a hashtable.
* tree-into-ssa.c (symbol_marked_for_renaming): Use DECL_UID.
(add_new_name_mapping): Ditto.
(mark_def_sites): Ditto.
(insert_phi_nodes): Use referenced_var iterator.
(mark_def_site_blocks): Ditto.
(mark_sym_for_renaming): Use DECL_UID.
* tree-sra.c (is_sra_candidate_decl): Use DECL_UID.
(lookup_element): Ditto.
(find_candidates_for_sra): Use referenced_vars iterator.
Use DECL_UID.
* tree-ssa-alias.c (NUM_REFERENCES): New macro.
(NUM_REFERENCES_CLEAR): Ditto.
(NUM_REFERENCES_INC): Ditto.
(NUM_REFERENCES_SET): Ditto.
(alias_obstack): New bitmap obstack.
(struct alias_map_d): Use bitmap, not sbitmap.
(struct alias_info): Remove num_references.
(init_alias_info): Use referenced_var iterator.
Initialize bitmap obstack.
(delete_alias_info): Use referenced_var iterator.
Free bitmap obstack.
(compute_points_to_and_addr_escape): Use DECL_UID.
Use new NUM_REFERENCES macros.
(compute_flow_sensitive_aliasing): may_aliases is now a bitmap.
Use new NUM_REFERENCES macros.
(group_aliases_into): Update prototype to use bitmap.
(setup_pointers_and_addressables): Use referenced_vars iterator.
Use DECL_UID. Use new NUM_REFERENCES macros.
(add_pointed_to_var): Use DECL_UID.
(dump_alias_info): Use referenced_var iterator.
(add_type_alias): Ditto.
(used_portions): Now a hashtable.
(used_part_map_eq): New function.
(used_part_map_hash): Ditto.
(free_used_part_map): Ditto.
(up_lookup): Ditto.
(up_insert): Ditto.
(get_or_create_used_part_for): Use up_lookup.
(create_overlap_variables_for): Ditto.
(find_used_portions): Use up_insert.
Use DECL_UID.
(create_structure_vars): Init used_portions hashtable, use
referenced_vars iterator.
* tree-ssa-live.c (create_ssa_var_map): sbitmaps became bitmaps.
Use DECL_UID.
* tree-ssa-loop-im.c (gather_mem_refs_stmt): Use DECL_UID.
* tree-ssa-operands.c (get_asm_expr_operands): Ditto.
(note_addressable): Ditto.
* tree-ssa-structalias.c (set_uids_in_ptset): Ditto.
* tree-ssa.c (verify_flow_insensitive_alias_info): Use
referenced_var iterator.
Use DECL_UID.
(delete_tree_ssa): Ditto.
(int_tree_map_eq): New function.
(int_tree_map_hash): Ditto.
* tree-stdarg.c (find_va_list_reference): Use DECL_UID.
(va_list_ptr_read): Ditto.
(va_list_counter_struct_op): Ditto.
(va_list_ptr_write): Ditto.
(check_va_list_escapes): Ditto.
(check_all_va_list_escapes): Ditto.
(execute_optimize_stdarg): Ditto.
* tree-tailcall.c (suitable_for_tail_opt_p): Used referenced_var
iterator.
2005-06-30 Daniel Berlin <dberlin@dberlin.org>
* hashtab.h (HTAB_DELETED_ENTRY): New macro.
(HTAB_EMPTY_ENTRY): New macro.
2005-06-30 Daniel Berlin <dberlin@dberlin.org>
* hashtab.c (EMPTY_ENTRY): Moved and renamed.
(DELETED_ENTRY): Ditto.
From-SVN: r101480
|
|
From-SVN: r101317
|
|
2005-06-08 Daniel Berlin <dberlin@dberlin.org>
* Makefile.in (OBJS-common): Add tree-ssa-structalias.o.
* tree-flow.h (find_what_p_points_to): Add prototype.
(push_fields_onto_fieldstack): Ditto.
(sort_fieldstack): Ditto.
* tree-optimize.c (init_tree_optimization_passes): Add
pass_build_pta and pass_del_pta.
* tree-pass.h (pass_build_pta): New structure.
(pass_del_pta): Ditto.
* tree-ssa-alias.c (compute_flow_sensitive_aliasing): Disambiguate
using new alias analyzer.
(push_fields_onto_fieldstack): Removed from here.
(bitpos_of_field): Ditto.
(fieldoff_compare): Ditto.
* tree-ssa-structalias.c: New file.
* tree-ssa-structalias.h: Ditto.
From-SVN: r100800
|
|
* Makefile.in (tree-chrec.o): Depend on CFGLOOP_H and TREE_FLOW_H.
* tree-chrec.c: Include cfgloop.h and tree-flow.h.
(evolution_function_is_invariant_rec_p,
evolution_function_is_invariant_p): New.
(chrec_convert): Use an extra parameter AT_STMT for refining the
information that is passed down to convert_step. Integrate the
code that was in count_ev_in_wider_type.
* tree-chrec.h (count_ev_in_wider_type): Removed.
(chrec_convert): Modify its declaration.
(evolution_function_is_invariant_p): Declared.
(evolution_function_is_affine_p): Use evolution_function_is_invariant_p.
* tree-flow.h (can_count_iv_in_wider_type): Renamed convert_step.
(scev_probably_wraps_p): Declared.
* tree-scalar-evolution.c (count_ev_in_wider_type): Removed.
(follow_ssa_edge_in_rhs, interpret_rhs_modify_expr):
Use an extra parameter AT_STMT for refining the information that is
passed down to convert_step.
(follow_ssa_edge_inner_loop_phi, follow_ssa_edge,
analyze_scalar_evolution_1): Initialize AT_STMT with the current
analyzed statement.
(instantiate_parameters_1): Don't know yet how to initialize AT_STMT.
* tree-ssa-loop-ivopts.c (idx_find_step): Update the use of
can_count_iv_in_wider_type to use convert_step.
* tree-ssa-loop-niter.c (can_count_iv_in_wider_type_bound): Move
code that is independent of the loop over the known iteration
bounds to convert_step_widening, the rest is moved to
proved_non_wrapping_p.
(scev_probably_wraps_p): New.
(can_count_iv_in_wider_type): Renamed convert_step.
* tree-vrp.c (adjust_range_with_scev): Take an extra AT_STMT parameter.
Use scev_probably_wraps_p for computing init_is_max.
(vrp_visit_assignment): Pass the current analyzed statement to
adjust_range_with_scev.
(execute_vrp): Call estimate_numbers_of_iterations for refining the
information provided by scev analyzer.
testsuite:
* testsuite/gcc.dg/vect/vect-77.c: Remove xfail from lp64.
* testsuite/gcc.dg/vect/vect-78.c: Same.
From-SVN: r100718
|
|
* tree-ssa-address.c: New file.
* Makefile.in (tree-ssa-address.o): Add.
* expr.c (expand_expr_real_1): Do not handle REF_ORIGINAL on
INDIRECT_REFs. Handle TARGET_MEM_REFs.
* tree-eh.c (tree_could_trap_p): Handle TARGET_MEM_REFs.
* tree-flow.h (struct mem_address): New.
(struct affine_tree_combination): Moved from tree-ssa-loop-ivopts.c.
(create_mem_ref, addr_for_mem_ref, get_address_description,
maybe_fold_tmr, multiplier_allowed_in_address_p,
multiply_by_cost): Declare.
* tree-mudflap.c (mf_xform_derefs_1): Handle TARGET_MEM_REFs.
* tree-pretty-print.c (dump_generic_node): Ditto.
* tree-ssa-loop-im.c (for_each_index): Ditto.
* tree-ssa-loop-ivopts.c (may_be_unaligned_p,
find_interesting_uses_address): Ditto.
(rewrite_address_base, build_addr_strip_iref): Removed.
(struct affine_tree_combination): Moved to tree-flow.h.
(get_ref_tag, copy_ref_info): New functions.
(rewrite_use_address): Produce TARGET_MEM_REFs.
(tree_ssa_iv_optimize): Do not call update_ssa
and rewrite_into_loop_closed_ssa.
(tree_to_aff_combination): Use build_fold_addr_expr instead of
build_addr_strip_iref.
(unshare_aff_combination): New function.
(fold_affine_sum): Removed.
(get_computation_at): Use get_computation_aff. Unshare the result.
(get_computation_aff, multiplier_allowed_in_address_p): New function.
(multiply_by_cost): Exported.
(get_address_cost): Use multiplier_allowed_in_address_p.
* tree-ssa-operands.c (get_tmr_operands): New function.
(get_expr_operands): Handle TARGET_MEM_REFs.
* tree.c (copy_node_stat): Copy annotations for TARGET_MEM_REFs.
(build): Handle 7 arguments.
(build7_stat): New function.
* tree.def (TARGET_MEM_DEF): New.
* tree.h (REF_ORIGINAL): Removed.
(TMR_SYMBOL, TMR_BASE, TMR_INDEX, TMR_STEP, TMR_OFFSET, TMR_ORIGINAL,
TMR_TAG, build7): New macros.
(build7_stat, tree_mem_ref_addr, copy_mem_ref_info): Declare.
* tree-ssa-ccp.c (fold_stmt_r): Call maybe_fold_tmr.
* doc/c-tree.texi: Document TARGET_MEM_REF.
* doc/tree-ssa.texi: Add TARGET_MEM_REF to gimple grammar.
* gcc.dg/tree-ssa/loop-2.c: Update outcome.
* gcc.dg/tree-ssa/loop-3.c: Update outcome.
* gcc.dg/tree-ssa/loop-4.c: Update outcome.
* gcc.dg/tree-ssa/loop-9.c: New test.
From-SVN: r100708
|
|
-funroll-loops)
PR tree-optimization/21846
* tree-cfg.c (replace_uses_by): Update information stored at loops.
* tree-flow.h (substitute_in_loop_info): Declare.
* tree-scalar-evolution.c (initialize_scalar_evolutions_analyzer):
Ensure that chrec_dont_know and chrec_known have a type.
* tree-ssa-loop-niter.c (substitute_in_loop_info): New function.
From-SVN: r100631
|
|
* tree-flow.h (stmt_ann_d): Move aux to ...
(tree_ann_common_d): ... here.
* tree-ssa-loop-im.c (LIM_DATA, determine_invariantness_stmt,
move_computations_stmt, schedule_sm): Update references to
aux.
* tree-vectorizer.h (set_stmt_info, vinfo_for_stmt): Likewise.
* tree-vect-transform.c (vect_create_index_for_vector_ref): Update
call to set_stmt_info.
(vect_transform_loop): Likewise.
* tree-vectorizer.c (new_loop_vec_info, destroy_loop_vec_info):
Likewise.
* tree-vect-analyze.c (vect_analyze_scalar_cycles): Made void instead of
bool.
(vect_mark_relevant): Takes two additional arguments - live_p and
relevant_p. Set RELEVANT_P and LIVE_P according to these arguments.
(vect_stmt_relevant_p): Differentiate between a live stmt and a
relevant stmt. Return two values = live_p and relevant_p.
(vect_mark_stmts_to_be_vectorized): Call vect_mark_relevant and
vect_stmt_relevant_p with additional arguments. Phis are no longer
put into the worklist (analyzed seperately in analyze_scalar_cycles).
(vect_determine_vectorization_factor): Also check for LIVE_P, because a
stmt that is marked as irrelevant and live, cause it's only used out
side the loop, may need to be vectorized (e.g. reduction).
(vect_analyze_operations): Examine phis. Call
vectorizable_live_operation for for LIVE_P stmts. Check if
need_to_vectorize.
(vect_analyze_scalar_cycles): Update documentation. Don't fail
vectorization - just classify the scalar cycles created by the loop
phis. Call vect_is_simple_reduction.
(vect_analyze_loop): Call to analyze_scalar_cycles moved earlier.
* tree-vect-transform.c (vect_create_index_for_vector_ref): Update
call to set_stmt_info.
(vect_get_vec_def_for_operand): Code reorganized - the code that
classifies the type of use was factored out to vect_is_simple_use.
(vectorizable_store, vect_is_simple_cond): Call vect_is_simple_use with
additional arguments.
(vectorizable_assignment): Likewise. Also make sure the stmt is relevant
and computes a loop_vec_def.
(vectorizable_operation, vectorizable_load, vectorizable_condition):
Likewise.
(vectorizable_live_operation): New.
(vect_transform_stmt): Handle LIVE_P stmts.
* tree-vectorizer.c (new_stmt_vec_info): Initialize the new fields
STMT_VINFO_LIVE_P and STMT_VINFO_DEF_TYPE.
(new_loop_vec_info, destroy_loop_vec_info): Also handle phis.
(vect_is_simple_use): Determine the type of the def and return it
in a new function argument. Consider vect_reduction_def and
vect_induction_def, but for now these are not supported.
(vect_is_simple_reduction): New. Empty for now.
* tree-vectorizer.h (vect_def_type): New enum type.
(_stmt_vec_info): Added new fields - live and _stmt_vec_info.
(STMT_VINFO_LIVE_P, STMT_VINFO_DEF_TYPE): New accessor macros.
(vect_is_simple_use): New arguments added to function declaration.
(vect_is_simple_reduction): New function declaration.
(vectorizable_live_operation): New function declaration.
* tree-vect-analyze.c (vect_can_advance_ivs_p): Add debug printout.
(vect_can_advance_ivs_p): Likewise.
* tree-vect-transform.c (vect_update_ivs_after_vectorizer): Likewise.
From-SVN: r100617
|
|
2005-06-01 Diego Novillo <dnovillo@redhat.com>
PR 14341, PR 21332, PR 20701, PR 21029, PR 21086, PR 21090
PR 21289, PR 21348, PR 21367, PR 21368, PR 21458.
* fold-const.c (invert_tree_comparison): Make extern.
* tree-flow.h (enum value_range_type): Move to tree-ssa-propagate.
(struct value_range_def): Limewise.
(get_value_range): Remove.
(dump_value_range): Remove.
(dump_all_value_ranges): Remove.
(debug_all_value_ranges): Remove.
(vrp_evaluate_conditional): Declare.
* tree-ssa-propagate.c (struct prop_stats_d): Add field
num_pred_folded.
(substitute_and_fold): Add argument use_ranges_p.
Update all callers.
If use_ranges_p is true, call fold_predicate_in to fold
predicates using range information.
Ignore ASSERT_EXPRs.
Change debugging output to only show statements that have been
folded.
(replace_phi_args_in): Move debugging output code from
substitute and fold.
(fold_predicate_in): New local function.
* tree-ssa-propagate.h (enum value_range_type): Move from
tree-flow.h.
(struct value_range_d): Likewise.
Add field 'equiv'.
(value_range_t): Rename from value_range.
* tree-vrp.c (found_in_subgraph): Rename from found.
(get_opposite_operand): Remove.
(struct assert_locus_d): Declare.
(assert_locus_t): Declare.
(need_assert_for): Declare.
(asserts_for): Declare.
(blocks_visited): Declare.
(vr_value): Declare.
(set_value_range): Add argument 'equiv'.
Don't drop to VARYING ranges that cover all values in the
type.
Make deep copy of equivalence set 'equiv'.
(copy_value_range): New local function.
(set_value_range_to_undefined): New local function.
(compare_values): Return -2 if either value has overflowed.
(range_includes_zero_p): New local function.
(extract_range_from_assert): Flip the predicate code if the
name being asserted is on the RHS of the predicate.
Avoid creating unnecessary symbolic ranges if the comparison
includes another name with a known numeric range.
Update the equivalnce set of the new range when asserting
EQ_EXPR predicates.
(extract_range_from_ssa_name): Update the equivalence set of
the new range with VAR.
(extract_range_from_binary_expr): Also handle TRUTH_*_EXPR.
If -fwrapv is used, set the resulting range to VARYING if the
operation overflows. Otherwise, use TYPE_MIN_VALUE and
TYPE_MAX_VALUE to represent -INF and +INF.
Fix handling of *_DIV_EXPR.
(extract_range_from_unary_expr): Handle MINUS_EXPR and
ABS_EXPR properly by switching the range around if necessary.
(extract_range_from_comparison): New local function.
(extract_range_from_expr): Call it.
(adjust_range_with_scev): Do not adjust the range if using
wrapping arithmetic (-fwrapv).
(dump_value_range): Also show equivalence set.
Show -INF and +INF for TYPE_MIN_VALUE and TYPE_MAX_VALUE.
(build_assert_expr_for): Also build ASSERT_EXPR for EQ_EXPR.
(infer_value_range): Change return value to bool.
Add arguments 'comp_code_p' and 'val_p'.
Do not attempt to infer ranges from statements that may throw.
Store the comparison code in comp_code_p.
Store the other operand to be used in the predicate in val_p.
(dump_asserts_for): New.
(debug_asserts_for): New.
(dump_all_asserts): New.
(debug_all_asserts): New.
(register_new_assert_for): New.
(register_edge_assert_for): New.
(find_conditional_asserts): New.
(find_assert_locations): New.
(process_assert_insertions_for): New.
(process_assert_insertions): New.
(insert_range_assertions): Initialize found_in_subgraph,
blocks_visited, need_assert_for and asserts_for.
Call find_assert_locations and process_assert_insertions.
(remove_range_assertions): Add more documentation.
(vrp_initialize): Change return type to void.
Do not try to guess if running VRP is worth it.
(compare_name_with_value): New.
(compare_names): New.
(vrp_evaluate_conditional): Add argument 'use_equiv_p'. If
use_equiv_p is true, call compare_names and
compare_name_with_value to compare all the ranges for every
name in the equivalence set of the predicate operands.
Update all callers.
(vrp_meet): Try harder not to derive a VARYING range.
If two values meet, the resulting equivalence set is the
intersection of the two equivalence sets.
(vrp_visit_phi_node): Call copy_value_range to get the current
range information of the LHS.
(vrp_finalize): Create a value vector representing all the
names that ended up with exactly one value in their range.
Call substitute_and_fold.
(execute_vrp): Document equivalence sets in ranges.
* tree.h (SSA_NAME_VALUE_RANGE): Remove.
(struct tree_ssa_name): Remove field value_range.
(invert_tree_comparison): Declare.
testsuite/ChangeLog
2005-06-01 Diego Novillo <dnovillo@redhat.com>
PR 14341, PR 21332, PR 20701, PR 21086, PR 21090
PR 21289, PR 21348, PR 21367, PR 21368, PR 21458.
* gcc.dg/tree-ssa/pr14341.c: New test.
* gcc.dg/tree-ssa/pr14841.c: New test.
* gcc.dg/tree-ssa/pr20701.c: New test.
* gcc.dg/tree-ssa/pr21086.c: New test.
* gcc.dg/tree-ssa/pr21090.c: New test.
* gcc.dg/tree-ssa/pr21332.c: New test.
* gcc.dg/tree-ssa/pr21458.c: New test.
* gcc.dg/tree-ssa/pr21658.c: New test.
* gcc.dg/tree-ssa/vrp01.c: New test.
* gcc.dg/tree-ssa/vrp02.c: New test.
* gcc.dg/tree-ssa/vrp03.c: New test.
* gcc.dg/tree-ssa/vrp04.c: New test.
* gcc.dg/tree-ssa/vrp05.c: New test.
* gcc.dg/tree-ssa/vrp06.c: New test.
* gcc.dg/tree-ssa/vrp07.c: New test.
* gcc.dg/tree-ssa/vrp08.c: New test.
* gcc.dg/tree-ssa/vrp09.c: New test.
* gcc.dg/tree-ssa/vrp10.c: New test.
* gcc.dg/tree-ssa/vrp11.c: New test.
* gcc.dg/tree-ssa/vrp12.c: New test.
* gcc.dg/tree-ssa/vrp13.c: New test.
2005-06-01 Alexandre Oliva <aoliva@redhat.com>
PR 21029
* gcc.dg/tree-ssa/pr21029.c: New test.
From-SVN: r100478
|
|
for a pointer with a may-alias set...
2005-05-29 Keith Besaw <kbesaw@us.ibm.com>
* tree-ssa-alias.c (new_type_alias): New procedure to
create a type memory tag for a pointer with a may-alias
set determined from a variable declaration.
* tree-flow.h: export declaration of new_type_alias
* tree-optimize.c (init_tree_optimization_passes): document
that pass_may_alias cannot be called after pass_vectorize.
* tree-vect-transform (vect_create_data_ref_ptr): Call
new_type_alias when an type memory tag isn't available
for a reference.
(vectorizable_store): Use copy_virtual_operands to update
virtual defs in place (so that loop_version can be called).
Call mark_for_renaming for the virtual defs in case peeling
is done and virtual uses outside the loop need to be updated.
From-SVN: r100322
|
|
* Makefile.in (OBJS-common): Add tree-cfgcleanup.o.
* tree-flow.h: Add prototypes for start_recording_case_labels
and end_recording_case_labels.
* tree-cfg.c (start_recording_case_labels,
end_recording_case_labels): Export.
(cleanup_tree_cfg_loop, modified_noreturn_calls,
cleanup_control_flow, cleanup_control_expr_graph,
remove_fallthru_edge, phi_alternatives_equal,
tree_forwarder_block_p, has_abnormal_incoming_edge_p,
remove_forwarder_block, cleanup_forwarder_blocks,
remove_forwarder_block_with_phi, merge_phi_nodes,
gate_merge_phi, pass_merge_phi): Move to ...
* tree-cfgcleanup.c: ... here.
From-SVN: r100302
|
|
* basic-block.h (basic_block_def): Add phi_nodes and
predictions. Remove tree_annotations.
* predict.c (tree_predicted_by_p, tree_predict_edge,
combine_predictions_for_bb): Adjust references to predictions.
* tree-cfg.c (init_empty_tree_cfg, create_bb): Don't call
create_block_annotation.
(create_block_annotation, free_blocks_annotatios,
clear_blocks_annotations): Remove.
(dump_cfg_stats): Don't print out the memory spent on
bb_ann_d.
(delete_tree_cfg_annotations): Don't call free_blocks_annotations.
* tree-flow-inline.h (bb_ann): Remove.
(phi_nodes, set_phi_nodes): Update references to phi_nodes.
* tree-flow.h (bb_ann_d): Remove.
* tree-if-conv.c (process_phi_nodes): Update a reference to
phi_nodes.
* tree-phinodes.c (reserve_phi_args_for_new_edge,
create_phi_node, remove_phi_node): Likewise.
* tree-pretty-print.c (dump_generic_bb_buff): Don't call bb_ann.
* tree-ssa-dom.c (threaded_blocks): New.
(tree_ssa_dominator_optimize): Initialize, clear, and free
threaded_blocks. Update a call to thread_through_all_blocks.
(thread_across_edge): Use threaded_blocks instead of setting
incoming_edge_threaded.
* tree-ssa-threadupdate.c (threaded_through_all_blocks): Take
a bitmap of blocks that are threaded through.
* tree.h: Move the prototype of threaded_through_blocks to
tree-flow.h.
From-SVN: r100279
|
|
* tree-flow.h (bb_ann_d): Remove has_escape_site.
* tree-ssa-alias.c (compute_points_to_addr_escape): Don't
write to has_escape_site.
From-SVN: r100109
|