summaryrefslogtreecommitdiff
path: root/gcc/var-tracking.c
Commit message (Collapse)AuthorAgeFilesLines
* * bitmap.c (bitmap_and, bitmap_and_into, bitmap_and_compl,hubicka2010-06-131-10/+10
| | | | | | | | | | | | | | | | | | | | bitmap_and_compl_into, bitmap_compl_and_into, bitmap_ior, bitmap_ior_into, bitmap_xor, bitmap_xor_into, bitmap_ior_and_compl, bitmap_ior_and_compl): Turn internal datastructure checks into checking asserts. * rtlanal.c (find_reg_note): Use gcc_checking_assert. * tree-ssa-sccvn.c (VN_INFO): Likewise. * df-scan.c (df_reorganize_refs_by_reg_by_reg, df_install_ref, df_ref_create_structure): Likewise. * alloc-pool.c (create_alloc_pool, empty_alloc_pool, pool_alloc, pool_free): Use gcc_checking_assert. * alias.c (get_alias_set): Likewise. * var-tracking.c (variable_htab_free, shared_hash_copy, canonicalize_values_mark, variable_merge_over_cur): Likewise. * lto-streamer.c (bp_unpack_value): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160681 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/41371aoliva2010-06-101-75/+37
| | | | | | | | * var-tracking.c (find_loc_in_1pdv): Remove recursion, only tail-recurse into canonical node. Fast-forward over non-canonical VALUEs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160559 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/41371jakub2010-06-041-10/+70
| | | | | | | | | * var-tracking.c (find_loc_in_1pdv): Mark initial value before recursing. Check that recursion is bounded. Rename inner var to avoid hiding incoming argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160280 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (dataflow_set_equiv_regs): Shortcut the loop if ↵jakub2010-06-031-2/+2
| | | | | | | set->regs[i] is NULL or has just one entry. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160217 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (dataflow_set_equiv_regs): Shortcut the loop if ↵jakub2010-06-031-0/+5
| | | | | | | set->regs[i] is NULL or has just one entry. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160216 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-vrp.c (debug_value_range, debug_all_value_ranges,hubicka2010-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | debug_asserts_for, debug_all_asserts): Annotate with DEBUG_FUNCTION. * tree-into-ssa.c (debug_decl_set, debug_defs_stack, debug_currdefs, debug_tree_ssa, debug_tree_ssa_stats, debug_def_blocks, debug_names_replaced_by, debug_update_ssa): Likewise. * sbitmap.c (debug_sbitmap): Likewise. * genrecog.c (debug_decision, debug_decision_list): Likewise. * tree-pretty-print.c (debug_generic_expr, debug_generic_stmt, debug_tree_chain): Likewise. * tree-loop-distribution.c (debug_rdg_partitions): Likewise. * cgraph.c (debug_cgraph_node, debug_cgraph): Likewise. * optabs.c (debug_optab_libfuncs): Likewise. (verify_loop_closed_ssa): Likewise. * value-prof.c (verify_histograms): Likewise. * reload.c (debug_reload_to_stream, debug_reload): Likewise. * bitmap.c (debug_bitmap_file, debug_bitmap, bitmap_print): Likewise. * cfghooks.c (verify_flow_info): Likewise. * fold-const.c (debug_fold_checksum): Likewise. * omp-low.c (debug_omp_region, debug_all_omp_regions): Likewise. * cfg.c (debug_regset, debug_flow_info, debug_bb, debug_bb_n): Likewise. * omega.c (debug_omega_problem): Likewise. * cgraphunit.c (verify_cgraph_node, verify_cgraph): Likewise. * tree-ssa-ccp.c (debug_lattice_value): Likewise. * dominance.c (verify_dominators, debug_dominance_info, debug_dominance_tree): Likewise. * df-core.c (df_insn_uid_debug, df_insn_debug, df_insn_debug_regno, * df_regno_debug, df_ref_debug, debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref, debug_df_defno, debug_df_useno, debug_df_chain): Likewise. * tree-ssa-dom.c (debug_dominator_optimization_stats): Likewise. * sel-sched.c (debug_state): Likewise. * tree-ssa-alias.c (debug_alias_info, debug_points_to_info_for): Likewise. * cfganal.c (print_edge_list, verify_edge_list): Likewise. * dwarf2out.c (debug_dwarf_die, debug_dwarf): Likewise. * tree-eh.c (verify_eh_edges, verify_eh_dispatch_edge): Likewise. * gimple-pretty-print.c (debug_gimple_stmt, debug_gimple_seq): Likewise. * c-pretty-print.c (debug_c_tree): Likewise. * sel-sched-dump.c (debug_insn_rtx, debug_vinsn, debug_expr, debug_insn debug_av_set, debug_lv_set, debug_ilist, debug_blist, debug_insn_vector, debug_hard_reg_set, debug_mem_addr_value): Likewise. * ebitmap.c (debug_ebitmap): Likewise. * function.c (debug_find_var_in_block_tree): Likewise. * print-rtl.c (debug_rtx): Likewise. (debug_rtx_count): Likewise. (debug_rtx_list, debug_rtx_range, debug_rtx_find): Likewise. * stor-layout.c (debug_rli): Likewise. * ipa.c (debug_cgraph_node_set, debug_varpool_node_set): Likewise. * tree-data-ref.c (debug_data_references, debug_data_dependence_relations, debug_data_reference, debug_data_dependence_relation, debug_rdg_vertex, debug_rdg_component, debug_rdg): Likewise. * tree-affine.c (debug_aff): Likewise. * tree-dfa.c (debug_referenced_vars, debug_variable, debug_dfa_stats): Likewise. * except.c (debug_eh_tree, verify_eh_tree): Likewise. * emit-rtl.c (verify_rtl_sharing): Likewise. * tree-ssa-pre.c (debug_pre_expr, debug_bitmap_set, debug_value_expressions): Likewise. * tree-ssa-live.c (debug_scope_block, debug_scope_blocks): Likewise. * sese.c (debug_rename_map, debug_ivtype_map): Likewise. * print-tree.c (debug_tree, debug_vec_tree): Likewise. * cfglayout.c (verify_insn_chain): Likewise. * graphite-clast-to-gimple.c (debug_clast_name_indexes, debug_clast_stmt, debug_generated_program): Likewise. * ggc-page.c (debug_print_page_list): Likewise. * tree-ssa-ter.c (debug_ter): Likewise. * graphite-dependences.c (debug_pddr): Likewise. * sched-deps.c (debug_ds): Likewise. * tree-ssa.c (verify_ssa): Likewise. * graphite-poly.c (debug_scattering_function, debug_iteration_domain, debug_scattering_functions, debug_iteration_domains, debug_pdr, debug_pdrs, debug_pbb_domain, debug_pbb, debug_scop_context, debug_scop, debug_cloog, debug_scop_params, debug_lst): Likewise. * tree-inline.c (debug_find_tree): Likewise. * graphite-ppl.c (debug_ppl_linear_expr, debug_ppl_polyhedron_matrix, debug_ppl_powerset_matrix): Likewise. * var-tracking.c (debug_dv): Likewise. * system.h (DEBUG_FUNCTION, DEBUG_VARIABLE): Define. * cfgloop.c (verify_loop_structure): Likewise. * plugin.c (dump_active_plugins, debug_active_plugins): Likewise. * c-common.c (verify_sequence_points): Likewise. * sched-rgn.c (debug_regions, debug_region, debug_candidate, debug_candidates, debug_rgn_dependencies): Likewise. * tree-ssa-structalias.c (debug_constraint, debug_constraints, * debug_constraint_graph, debug_solution_for_var, debug_sa_points_to_info): Likewise. * sched-vis.c (debug_insn_slim, debug_bb_slim, debug_bb_n_slim): Likewie. * tree-cfg.c (debug_cfg_stats, verify_stmts, debug_function, debug_loops, debug_loop, debug_loop_num): Likewise. * passes.c (debug_pass): Likewise. (dump_properties): Likewise; add cfglayout property. (debug_properties): Likewise. * tree-ssa-reassoc.c (debug_ops_vector): Likewise. * varpool.c (debug_varpool): Likewise. * regcprop.c (debug_value_data): Likewise. * tree-ssa-operands.c (verify_imm_links, debug_immediate_uses, debug_immediate_uses_for): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160036 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/41371jakub2010-05-251-0/+31
| | | | | | | | | | | * var-tracking.c (find_loc_in_1pdv): Guard asserts with ENABLE_CHECKING. (intersect_loc_chains): Walk the s2var's loc_chain together with s1node chain as long as the locations are equal, don't call find_loc_in_1pdv in that case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159829 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.c: Don't include tm.h, tree.h, tm_p.h, langhooks.h orjsm282010-05-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | langhooks-def.h. (diagnostic_initialize): Initialize x_data not last_function. (diagnostic_report_current_function): Move to tree-diagnostic.c. (default_diagnostic_starter): Call diagnostic_report_current_module not diagnostic_report_current_function. (diagnostic_report_diagnostic): Initialize x_data not abstract_origin. (verbatim): Likewise. * diagnostic.h (struct diagnostic_info): Change abstract_origin to x_data. (struct diagnostic_context): Change last_function to x_data. (diagnostic_auxiliary_data): Replace with diagnostic_context_auxiliary_data and diagnostic_info_auxiliary_data. (diagnostic_last_function_changed, diagnostic_set_last_function, diagnostic_report_current_function): Move to tree-diagnostic.h. (print_declaration, dump_generic_node, print_generic_stmt, print_generic_stmt_indented, print_generic_expr, print_generic_decl, debug_c_tree, dump_omp_clauses, print_call_name, debug_generic_expr, debug_generic_stmt, debug_tree_chain, default_tree_printer): Move to tree-pretty-print.h. (debug_gimple_stmt, debug_gimple_seq, print_gimple_seq, print_gimple_stmt, print_gimple_expr, dump_gimple_stmt): Move to gimple-pretty-print.h. * pretty-print.c: Don't include tree.h (pp_base_format): Don't handle %K here. (pp_base_tree_identifier): Move to tree-pretty-print.c. * pretty-print.h (text_info): Change abstract_origin to x_data. (pp_tree_identifier, pp_unsupported_tree, pp_base_tree_identifier): Move to tree-pretty-print.h. * gimple-pretty-print.h, tree-diagnostic.c, tree-diagnostic.h, tree-pretty-print.h: New files. * tree-pretty-print.c: Include tree-pretty-print.h. (percent_K_format): New. Moved from pretty-print.c. (pp_base_tree_identifier): Move from pretty-print.c. * c-objc-common.c: Include tree-pretty-print.h. (c_tree_printer): Handle %K here. * langhooks.c: Include tree-diagnostic.h. (lhd_print_error_function): Use diagnostic_abstract_origin macro. * toplev.c: Include tree-diagnostic.h and tree-pretty-print.h. (default_tree_printer): Handle %K using percent_K_format. (general_init): Use default_tree_diagnostic_starter. * tree.c: Include tree-diagnostic.h and tree-pretty-print.h. (free_lang_data): Use default_tree_diagnostic_starter. * c-pretty-print.c: Include tree-pretty-print.h. * cfgexpand.c: Include tree-pretty-print.h and gimple-pretty-print.h. * cgraphunit.c: Include tree-pretty-print.h and gimple-pretty-print.h. * dwarf2out.c: Include tree-pretty-print.h. * except.c: Include tree-pretty-print.h. * gimple-pretty-print.c: Include tree-pretty-print.h and gimple-pretty-print.h. * gimplify.c: Include tree-pretty-print.h. * graphite-poly.c: Include tree-pretty-print.h and gimple-pretty-print.h. * ipa-cp.c: Include tree-pretty-print.h. * ipa-inline.c: Include gimple-pretty-print.h. * ipa-prop.c: Include tree-pretty-print.h and gimple-pretty-print.h. * ipa-pure-const.c: Include gimple-pretty-print.h. * ipa-struct-reorg.c: Include tree-pretty-print.h and gimple-pretty-print.h. * ipa-type-escape.c: Include tree-pretty-print.h. * print-rtl.c: Include tree-pretty-print.h. * print-tree.c: Include gimple-pretty-print.h. * sese.c: Include tree-pretty-print.h. * tree-affine.c: Include tree-pretty-print.h. * tree-browser.c: Include tree-pretty-print.h. * tree-call-cdce.c: Include gimple-pretty-print.h. * tree-cfg.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-chrec.c: Include tree-pretty-print.h. * tree-data-ref.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-dfa.c: Include tree-pretty-print.h. * tree-if-conv.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-inline.c: Include tree-pretty-print.h. * tree-into-ssa.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-nrv.c: Include tree-pretty-print.h. * tree-object-size.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-outof-ssa.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-parloops.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-predcom.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-scalar-evolution.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-sra.c: Include tree-pretty-print.h. * tree-ssa-address.c: Include tree-pretty-print.h. * tree-ssa-alias.c: Include tree-pretty-print.h. * tree-ssa-ccp.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-coalesce.c: Include tree-pretty-print.h. * tree-ssa-copy.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-copyrename.c: Include tree-pretty-print.h. * tree-ssa-dce.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-dom.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-dse.c: Include gimple-pretty-print.h. * tree-ssa-forwprop.c: Include tree-pretty-print.h. * tree-ssa-ifcombine.c: Include tree-pretty-print.h. * tree-ssa-live.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-loop-im.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-loop-ivcanon.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-loop-ivopts.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-loop-niter.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-loop-prefetch.c: Include tree-pretty-print.h. * tree-ssa-math-opts.c: Include gimple-pretty-print.h. * tree-ssa-operands.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-phiprop.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-pre.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-propagate.c: Include gimple-pretty-print.h. * tree-ssa-reassoc.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-sccvn.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-sink.c: Include gimple-pretty-print.h. * tree-ssa-ter.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-uninit.c: Include gimple-pretty-print.h. * tree-ssa.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-stdarg.c: Include gimple-pretty-print.h. * tree-switch-conversion.c: Include gimple-pretty-print.h. * tree-tailcall.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vect-data-refs.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vect-loop-manip.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vect-loop.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vect-patterns.c: Include gimple-pretty-print.h. * tree-vect-slp.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vect-stmts.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vectorizer.c: Include tree-pretty-print.h. * tree-vrp.c: Include tree-pretty-print.h and gimple-pretty-print.h. * value-prof.c: Include tree-pretty-print.h and gimple-pretty-print.h. * var-tracking.c: Include tree-pretty-print.h. * Makefile.in (OBJS-common): Add tree-diagnostic.o. (tree-diagnostic.o): New dependencies. (c-objc-common.o, c-pretty-print.o, langhooks.o, tree.o, tree-inline.o, print-tree.o, stor-layout.o, tree-ssa-uninit.o, tree-ssa.o, tree-into-ssa.o, tree-ssa-ter.o, tree-ssa-coalesce.o, tree-outof-ssa.o, tree-ssa-forwprop.o, tree-ssa-phiprop.o, tree-ssa-ifcombine.o, tree-nrv.o, tree-ssa-copy.o, tree-ssa-propagate.o, tree-ssa-dom.o, tree-ssa-uncprop.o, tree-ssa-live.o, tree-ssa-copyrename.o, tree-ssa-pre.o, tree-ssa-sccvn.o, tree-vrp.o, tree-cfg.o, tree-tailcall.o, tree-ssa-sink.o, tree-if-conv.o, tree-dfa.o, tree-ssa-operands.o, tree-ssa-address.o, tree-ssa-loop-niter.o, tree-ssa-loop-ivcanon.o, tree-ssa-loop-prefetch.o, tree-predcom.o, tree-ssa-loop-ivopts.o, tree-affine.o, tree-ssa-loop-im.o, tree-ssa-math-opts.o, tree-ssa-alias.o, tree-ssa-reassoc.o, gimplify.o, tree-browser.o, tree-chrec.o, tree-scalar-evolution.o, tree-data-ref.o, sese.o, graphite-poly.o, tree-vect-loop.o, tree-vect-loop-manip.o, tree-vect-patterns.o, tree-vect-slp.o, tree-vect-stmts.o, tree-vect-data-refs.o, tree-vectorizer.o, tree-parloops.o, tree-stdarg.o, tree-object-size.o, gimple-pretty-print.o, tree-pretty-print.o, diagnostic.o, toplev.o, print-rtl.o, except.o, dwarf2out.o, cgraphunit.o, ipa-prop.o, ipa-cp.o, ipa-inline.o, ipa-pure-const.o, ipa-type-escape.o, ipa-struct-reorg.o, tree-ssa-dce.o, tree-call-cdce.o, tree-ssa-ccp.o, tree-sra.o, tree-switch-conversion.o, var-tracking.o, value-prof.o, cfgexpand.o, pretty-print.o): Update dependencies. cp: * error.c: Include tree-diagnostic.h and tree-pretty-print.h. (cp_print_error_function): Use diagnostic_abstract_origin macro. (cp_printer): Handle %K here using percent_K_format. * cxx-pretty-print.c: Include tree-pretty-print.h. * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159685 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/41371jakub2010-05-181-20/+34
| | | | | | | | * var-tracking.c (find_loc_in_1pdv): Add a few checks from rtx_equal_p inline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159528 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-05-16 Richard Guenther <rguenther@suse.de>rguenth2010-05-161-126/+90
| | | | | | | | | | | | | | | | | | | | | * var-tracking.c (vars_copy_1): Inline ... (vars_copy): ... here. Use FOR_EACH_HTAB_ELEMENT. (variable_union): Use FOR_EACH_HTAB_ELEMENT. Merge asserts. (variable_merge_over_cur): Adjust. Merge asserts. (variable_merge_over_src): Likewise. (dataflow_set_merge): Use FOR_EACH_HTAB_ELEMENT. (variable_post_merge_new_vals): Merge asserts. (variable_post_merge_perm_vals): Likewise. (find_mem_expr_in_1pdv): Likewise. (dataflow_set_different_value): Remove. (onepart_variable_different_p): Merge asserts. (variable_different_p): Likewise. (dataflow_set_different_1): Inline ... (dataflow_set_different): ... here. Use FOR_EACH_HTAB_ELEMENT. (emit_notes_for_differences_1): Merge asserts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159456 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/43983jakub2010-05-131-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * var-tracking.c (track_expr_p): Allow tracking of variables optimized by SRA. * Makefile.in (dwarf2out.o): Depend on $(TREE_FLOW_H). * tree-sra.c (create_access_replacement): Call unshare_expr before passing expr to SET_DECL_DEBUG_EXPR, and remove any SSA_NAMEs from it. * dwarf2out.c: Include tree-flow.h. (struct var_loc_node): Rename var_loc_note field to loc, add comment. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_bit_piece. (decl_piece_bitsize, decl_piece_varloc_ptr, decl_piece_node, construct_piece_list, adjust_piece_list): New functions. (add_var_loc_to_decl): Handle SRA optimized variables. Adjust for var_loc_note to loc field renaming. (dw_loc_list_1): For WANT_ADDRESS == 2 prefer DECL_MODE of decl in VAR_LOCATION note. (new_loc_descr_op_bit_piece): New function. (dw_sra_loc_expr): New function. (dw_loc_list): Use it. Don't handle the last range after the loop, handle it inside of the loop. Adjust for var_loc_note to loc field renaming. (add_location_or_const_value_attribute): Only special case single entry loc lists if loc is NOTE_P. Adjust for var_loc_note to loc field renaming. (dwarf2out_var_location): Don't set newloc->var_loc_note and newloc->next here. * gcc.dg/guality/sra-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159357 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (var_debug_decl): Save DECL_DEBUG_EXPR valuejakub2010-05-051-5/+10
| | | | | | | | in a temporary instead of invoking the macro multiple times. (track_expr_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159058 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (vt_init_cfa_base): Use cselib_lookup_from_insnjakub2010-03-311-2/+2
| | | | | | | instead of cselib_lookup following by tweaking locs->setting_insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157870 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (use_narrower_mode_test, use_narrower_mode): Newjakub2010-03-301-5/+82
| | | | | | | | | | functions. (adjust_mems): Replace narrowing SUBREG of expression containing just PLUS, MINUS, MULT and ASHIFT of registers and constants with operations in the narrower mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157835 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/43593jakub2010-03-301-1/+1
| | | | | | | | | | | * var-tracking.c (dataflow_set_clear_at_call): Invalidate just regs_invalidated_by_call instead all call_used_reg_set registers. * gcc.dg/guality/pr43593.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157834 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (vt_expand_loc_callback): Don't runjakub2010-03-261-8/+7
| | | | | | | | cselib_expand_value_rtx_cb in dummy mode if cselib_dummy_expand_value_rtx_cb returned false. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157764 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (emit_note_insn_var_location): For one partjakub2010-03-261-2/+6
| | | | | | | | | notes with offset 0, don't add EXPR_LIST around the location. * dwarf2out.c (loc_descriptor, dw_loc_list_1, add_location_or_const_value_attribute): Adjust for that change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157763 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/43443jakub2010-03-221-4/+12
| | | | | | | | * var-tracking.c (add_cselib_value_chains): Remove ASM_OPERANDS locs from preserved VALUEs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157620 138bc75d-0d04-0410-961f-82ee72b054a4
* PR bootstrap/43399jakub2010-03-181-1/+1
| | | | | | | | * var-tracking.c (adjust_mems) <case POST_MODIFY>: Allow BLKmode mem_mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157550 138bc75d-0d04-0410-961f-82ee72b054a4
* PR bootstrap/43403jakub2010-03-181-0/+6
| | | | | | | | | * var-tracking.c (vt_init_cfa_base): Do nothing if cfa_base_rtx would be hard_frame_pointer_rtx or non-fixed register. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157549 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/42873jakub2010-03-181-0/+62
| | | | | | | | * var-tracking.c (canonicalize_vars_star): New. (dataflow_post_merge_adjust): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157548 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/43058jakub2010-03-181-2/+45
| | | | | | | | | | | | | | | | * var-tracking.c (non_suitable_const): New function. (add_uses): For DEBUG_INSNs with constants, don't record any value, instead just the constant value itself. (compute_bb_dataflow) <case MO_VAL_LOC>: If PAT_VAR_LOCATION_LOC is not VAR_LOC_UNKNOWN_P, set var to the constant. (emit_notes_in_bb): Likewise. (emit_note_insn_var_location): For onepart variables if cur_loc is a VOIDmode constant, use DECL_MODE. * gcc.dg/pr43058.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157547 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/43051jakub2010-03-161-175/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR debug/43092 * cselib.c (cselib_preserve_constants, cfa_base_preserved_val): New static variables. (preserve_only_constants): New function. (cselib_reset_table): If cfa_base_preserved_val is non-NULL, don't clear its REG_VALUES. If cselib_preserve_constants, don't empty the whole hash table, but preserve there VALUEs with constants, cfa_base_preserved_val and cfa_base_preserved_val plus constant. (cselib_preserve_cfa_base_value): New function. (cselib_invalidate_regno): Don't invalidate cfa_base_preserved_val. (cselib_init): Change argument to int bitfield. Set cselib_preserve_constants to whether CSELIB_PRESERVE_CONSTANTS is in it. (cselib_finish): Clear cselib_preserve_constants and cfa_base_preserved_val. * cselib.h (enum cselib_record_what): New enum. (cselib_init): Change argument to int. (cselib_preserve_cfa_base_value): New prototype. * postreload.c (reload_cse_regs_1): Adjust cselib_init caller. * dse.c (dse_step1): Likewise. * cfgcleanup.c (thread_jump): Likewise. * sched-deps.c (sched_analyze): Likewise. * gcse.c (local_cprop_pass): Likewise. * simplify-rtx.c (simplify_replace_fn_rtx): Add argument to callback. If FN is non-NULL, call the callback always and whenever it returns non-NULL just return that. Only do rtx_equal_p if FN is NULL. * rtl.h (simplify_replace_fn_rtx): Add argument to callback. * combine.c (propagate_for_debug_subst): Add old_rtx argument, compare from with old_rtx and if it isn't rtx_equal_p, return NULL. * Makefile.in (var-tracking.o): Depend on $(RECOG_H). * var-tracking.c: Include recog.h. (bb_stack_adjust_offset): Remove. (vt_stack_adjustments): Don't call it, instead just gather the adjustments using insn_stack_adjust_offset_pre_post on each bb insn. (adjust_stack_reference): Remove. (compute_cfa_pointer): New function. (hard_frame_pointer_adjustment, cfa_base_rtx): New static variables. (struct adjust_mem_data): New type. (adjust_mems, adjust_mem_uses, adjust_mem_stores, adjust_insn): New functions. (get_address_mode): New function. (replace_expr_with_values): Use it. (use_type): Don't do cselib_lookup for VAR_LOC_UNKNOWN_P. Use get_address_mode. For cfa_base_rtx return MO_CLOBBER. (adjust_sets): Remove. (add_uses): Don't add extra MO_VAL_USE for cfa_base_rtx plus constant. Use get_address_mode. (get_adjusted_src): Remove. (add_stores): Don't call it. Never reuse expr SET. Don't add extra MO_VAL_USE for cfa_base_rtx plus constant. Use get_address_mode. (add_with_sets): Don't call adjust_sets. (fp_setter, vt_init_cfa_base): New functions. (vt_initialize): Change return type to bool. Move most of pool etc. initialization to the beginning of the function from end. Pass CSELIB_RECORD_MEMORY | CSELIB_PRESERVE_CONSTANTS to cselib_init. If !frame_pointer_needed, call vt_stack_adjustment before mos vector is filled, call vt_init_cfa_base if argp/framep has been eliminated to sp. If frame_pointer_needed and argp/framep has been eliminated to hard frame pointer, set hard_frame_pointer_adjustment and call vt_init_cfa_base after encountering fp setter in the prologue. For MO_ADJUST, call log_op_type before pusing the op into mos vector, not afterwards. Call adjust_insn before cselib_process_insn/add_with_sets, call cancel_changes (0) afterwards. (variable_tracking_main_1): Adjust for vt_initialize calling vt_stack_adjustments and returning whether it succeeded or not. * gcc.dg/guality/pr43051-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157476 138bc75d-0d04-0410-961f-82ee72b054a4
* * cselib.c (LONG_TERM_PRESERVED_VALUE_P): Remove.jakub2010-03-121-380/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | (cselib_preserve_definitely, cselib_clear_preserve): Remove. (cselib_preserve_only_values): Remove retain argument, don't traverse hash table with cselib_{preserve_definitely,clear_preserve}. * cselib.h (cselib_preserve_only_values): Remove retain argument. * var-tracking.c (micro_operation): Move insn field before union. Add DEF_VEC_O and DEF_VEC_ALLOC_O for this type. (struct variable_tracking_info_def): Remove n_mos field, change mos into a vector of micro_operations. (count_uses, count_uses_1, count_stores, count_with_sets): Remove. (bb_stack_adjust_offset, log_op_type, add_uses, add_stores, compute_bb_dataflow, emit_notes_in_bb): Adjust for VTI (bb)->mos changing into a vector. (add_with_sets): Likewise. Ensure MO_VAL_USE uops from add_stores come before all other uops generated by add_stores. (vt_add_function_parameters): Adjust for cselib_preserve_only_values argument removal. (vt_initialize): Likewise. Adjust for VTI (bb)->mos changing into a vector. Run just one pass over the bbs instead of separate counting and computation phase. (vt_finalize): Free VTI (bb)->mos vector instead of array. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157403 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/43299jakub2010-03-091-4/+54
| | | | | | | | | | | | * var-tracking.c (adjust_sets): New function. (count_with_sets, add_with_sets): Use it. (get_adjusted_src): New inline function. (add_stores): Use it. * gcc.dg/pr43299.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157316 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/43304jakub2010-03-091-3/+10
| | | | | | | | | * var-tracking.c (vt_expand_loc_callback) <case SUBREG>: If dummy, call cselib_dummy_expand_value_rtx_cb instead of cselib_expand_value_rtx_cb. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157315 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (remove_cselib_value_chains): Define only forjakub2010-03-081-62/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | ENABLE_CHECKING. (dataflow_set_preserve_mem_locs, dataflow_set_remove_mem_locs, delete_slot_part, emit_notes_for_differences_1): Don't call remove_cselib_value_chains here. (set_slot_part, emit_notes_for_differences_2): Don't call add_cselib_value_chains here. (preserved_values): New vector. (preserve_value): New function. (add_uses, add_stores, vt_add_function_parameters): Use it instead of cselib_preserve_value. (changed_values_stack): New vector. (check_changed_vars_0): New function. (check_changed_vars_1, check_changed_vars_2): Use it. (emit_notes_for_changes): Call set_dv_changed (*, false) on all changed_values_stack VALUEs. (vt_emit_notes): For all preserved_values call add_cselib_value_chains. If ENABLE_CHECKING call remove_cselib_value_chains before verifying value_chains is empty. Initialize and free changed_values_stack. (vt_initialize): Initialize preserved_values. (vt_finalize): Free preserved_values. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157277 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/43176jakub2010-03-071-186/+440
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (var-tracking.o): Depend on pointer-set.h. * cselib.c (struct expand_value_data): Add dummy field. (cselib_expand_value_rtx, cselib_expand_value_rtx_cb): Initialize dummy to false. (cselib_dummy_expand_value_rtx_cb): New function. (cselib_expand_value_rtx_1): If evd->dummy is true, don't allocate any rtl. * cselib.h (cselib_dummy_expand_value_rtx_cb): New prototype. * var-tracking.c: Include pointer-set.h. (variable): Change n_var_parts to char from int. Add cur_loc_changed and in_changed_variables fields. (variable_canonicalize): Remove. (shared_var_p): New inline function. (unshare_variable): Maintain cur_loc_changed and in_changed_variables fields. If var was in changed_variables, replace it there with new_var. Just copy cur_loc instead of resetting it to something else. (variable_union): Don't recompute cur_loc. Use shared_var_p. (dataflow_set_union): Don't call variable_canonicalize. (loc_cmp): If both x and y are DEBUG_EXPRs, compare uids of their DEBUG_EXPR_TREE_DECLs. (canonicalize_loc_order_check): Verify that cur_loc is NULL and in_changed_variables and cur_loc_changed is false. (variable_merge_over_cur): Clear cur_loc, in_changed_variables and cur_loc_changed. Don't update cur_loc here. (variable_merge_over_src): Don't call variable_canonicalize. (dataflow_set_preserve_mem_locs): Use shared_var_p. When removing loc that is equal to cur_loc, clear cur_loc, set cur_loc_changed and ensure variable_was_changed is called. (dataflow_set_remove_mem_locs): Use shared_var_p. Only compare pointers in cur_loc check, if it is equal to loc, clear cur_loc and set cur_loc_changed. Don't recompute cur_loc here. (variable_different_p): Remove compare_current_location argument, don't compare cur_loc. (dataflow_set_different_1): Adjust variable_different_p caller. (variable_was_changed): If dv had some var in changed_variables already, reset in_changed_variables flag for it and propagate cur_loc_changed over to the new variable. On empty var always set cur_loc_changed. Set in_changed_variables on whatever var is added to changed_variables. (set_slot_part): Clear cur_loc_changed and in_changed_variables. Use shared_var_p. When removing loc that is equal to cur_loc, clear cur_loc and set cur_loc_changed. If cur_loc is NULL at the end, don't set it to something else, just call variable_was_changed. (delete_slot_part): Use shared_var_p. When cur_loc equals to loc being removed, clear cur_loc and set cur_loc_changed. Set cur_loc_changed if all locations have been removed. (struct expand_loc_callback_data): New type. (vt_expand_loc_callback): Add dummy mode in which no rtxes are allocated. Always create SUBREGs if simplify_subreg failed. Prefer to use cur_loc, when that fails and still in changed_variables (and seen first time) recompute it. Set cur_loc_changed of variables which had to change cur_loc and compute elcd->cur_loc_changed if any of the subexpressions used had to change cur_loc. (vt_expand_loc): Adjust to pass arguments in expand_loc_callback_data structure. (vt_expand_loc_dummy): New function. (emitted_notes): New variable. (emit_note_insn_var_location): For VALUEs and DEBUG_EXPR_DECLs that weren't used for any other decl in current emit_notes_for_changes call call vt_expand_loc_dummy to update cur_loc. For -fno-var-tracking-assignments, set cur_loc to first loc_chain location if NULL before. Always use just cur_loc instead of first loc_chain location. When cur_loc_changed is false, when not --enable-checking=rtl just don't emit any note. When rtl checking, compute the note and assert it is the same as previous note. Clear cur_loc_changed and in_changed_variables at the end before removing from changed_variables. (check_changed_vars_3): New function. (emit_notes_for_changes): Traverse changed_vars to call check_changed_vars_3 on each changed var. (emit_notes_for_differences_1): Clear cur_loc_changed and in_changed_variables. Recompute cur_loc of new_var. (emit_notes_for_differences_2): Clear cur_loc if new variable appears. (vt_emit_notes): Initialize and destroy emitted_notes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157264 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (dataflow_set_merge): Swap src and src2.aoliva2010-03-061-46/+25
| | | | | | | | | | | | | | Reverted: 2010-01-13 Jakub Jelinek <jakub@redhat.com> PR debug/41371 * var-tracking.c (values_to_unmark): New variable. (find_loc_in_1pdv): Clear VALUE_RECURSED_INTO of values in values_to_unmark vector. Moved body to... (find_loc_in_1pdv_1): ... this. Don't clear VALUE_RECURSED_INTO, instead queue it into values_to_unmark vector. (vt_find_locations): Free values_to_unmark vector. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157257 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/43177jakub2010-03-031-7/+133
| | | | | | | | | | | | * var-tracking.c (loc_cmp): Don't assert VALUEs have the same mode. (VAL_EXPR_HAS_REVERSE): Define. (reverse_op): New function. (add_stores): For reversible operations add an extra MO_VAL_USE. * gcc.dg/guality/pr43177.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157188 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (vt_initialize): Scan insns in ebb chunks insteadjakub2010-03-021-71/+94
| | | | | | | of bb. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157164 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (var-tracking.o): Depend on $(DIAGNOSTIC_H).jakub2010-02-261-6/+21
| | | | | | | | | * var-tracking.c: Include diagnostic.h. (debug_dv): New function. (dump_var): Print DEBUG_EXPR_DECLs as D#N instead of D.-N. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157085 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/43160jakub2010-02-261-56/+78
| | | | | | | | | | * var-tracking.c (dv_onepart_p): Return true for DEBUG_EXPR_DECLs. (add_value_chain, add_value_chains, remove_value_chain, remove_value_chains): Handle DEBUG_EXPRs. (check_changed_vars_1, check_changed_vars_2): Handle DEBUG_EXPR_DECLs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157084 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/43150jakub2010-02-241-1/+1
| | | | | | | | | | | | * gimplify.c (gimplify_type_sizes): Clear DECL_IGNORED_P for VLA bounds even for -O+. * var-tracking.c (track_expr_p): If !need_rtl, don't mandate expr needs to have DECL_NAME set. * gcc.dg/guality/vla-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157032 138bc75d-0d04-0410-961f-82ee72b054a4
* * params.def (PARAM_MAX_VARTRACK_SIZE): New.jakub2010-02-161-13/+70
| | | | | | | | | | | | | | | | | | * doc/invoke.texi: Document it. * var-tracking.c: Include toplev.h and params.h. (vt_find_locations): Return bool indicating success. Compute hash sizes unconditionally. Check new parameter, report. (variable_tracking_main_1): Check vt_find_locations results and retry. Renamed from... (variable_tracking_main): ... this. New wrapper to preserve flag_var_tracking_assignments. * Makefile.in (var-tracking.o): Adjust dependencies. * lib/prune.exp: Prune variable tracking size limit exceeded notes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156794 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-02-03 Alexandre Oliva <aoliva@redhat.com>rguenth2010-02-031-61/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR debug/42896 * cselib.h (struct cselib_val_struct): Add uid. Rename value to hash. (cselib_reset_table): Renamed from... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_uid): Renamed from... (cselib_get_next_unknown_value): ... this. * cselib.c (next_uid): Renamed from... (next_unknown_value): ... this. (cselib_clear_table): Adjust. (cselib_reset_table): Adjust. Renamed from... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_uid): Adjust. Renamed from... (cselib_get_next_unknown_value): ... this. (get_value_hash): Use hash. (cselib_hash_rtx): Likewise. (new_cselib_val): Adjust. Set and dump uid. (cselib_lookup_mem): Pass next_uid as hash. (cselib_subst_to_values): Likewise. (cselib_log_lookup): Dump uid. (cselib_lookup): Pass next_uid as hash. Adjust. (cselib_process_insn): Adjust. (cselib_init): Initialize next_uid. (cselib_finish): Adjust. (dump_cselib_table): Likewise. * dse.c (canon_address): Dump value uid. * print-rtl.c (print_rtx): Print value uid. * var-tracking.c (VARIABLE_HASH_VAL): Dropped. (dvuid): New type. (dv_uid): New function, sort of renamed from... (dv_htab_hash): ... this, reimplemented in terms of it and... (dv_uid2hash): ... this. New. (variable_htab_eq): Drop excess assertions. (tie_break_pointers): Removed. (canon_value_cmp): Compare uids. (variable_post_merge_New_vals): Print uids. (vt_add_function_parameters): Adjust. (vt_initialize): Reset table. Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156468 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/42861jakub2010-01-271-11/+23
| | | | | | | | | | | | * var-tracking.c (val_store): Add modified argument, obey it. Adjust callers. (count_uses): Move down logging of main. (compute_bb_dataflow): Use val_store for MO_VAL_USEs that don't need resolution. (emit_notes_in_bb): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156292 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/42715jakub2010-01-211-7/+15
| | | | | | | | | | | | * var-tracking.c (use_type): Choose MO_VAL_SET for REGs set without a cselib val. (count_uses): Accept MO_VAL_SET with no val on stores. (add_stores): Likewise. * gcc.dg/pr42715.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156102 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (check_value_val): Add a compile time assertion.jakub2010-01-211-20/+16
| | | | | | | | | (dv_is_decl_p): Simplify. (dv_as_decl, dv_as_value, dv_from_decl, dv_from_value): Only use gcc_assert if ENABLE_CHECKING. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156101 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/42782jakub2010-01-201-21/+46
| | | | | | | | | | | | | | | * var-tracking.c: Include tree-flow.h. (mem_dies_at_call): New. (dataflow_set_preserve_mem_locs): Use it. (dataflow_set_remove_mem_locs): Likewise. (dump_var): Renamed from dump_variable. Adjust all callers. (dump_var_slot): Renamed from dump_variable_slot. Likewise. * Makefile.in (var-tracking.o): Adjust deps. * gcc.dg/guality/pr42782.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156092 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (var_reg_delete): Don't delete the associationjakub2010-01-141-8/+14
| | | | | | | | between REGs and values or one-part variables if the register isn't clobbered. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155918 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/41371jakub2010-01-131-9/+31
| | | | | | | | | | | | * var-tracking.c (values_to_unmark): New variable. (find_loc_in_1pdv): Clear VALUE_RECURSED_INTO of values in values_to_unmark vector. Moved body to... (find_loc_in_1pdv_1): ... this. Don't clear VALUE_RECURSED_INTO, instead queue it into values_to_unmark vector. (vt_find_locations): Free values_to_unmark vector. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155858 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/41679jakub2009-12-171-2/+48
| | | | | | | | | * var-tracking.c (count_uses): Count MO_VAL_USE of original MO_VAL_SET value for COND_EXEC. (add_stores): Handle conditional stores. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155324 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/41679jakub2009-12-171-38/+40
| | | | | | | | | * var-tracking.c (use_type): Remove indirection from loc. (count_uses): Dereference incoming loc early. (add_uses): Dereference incoming loc early. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155323 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/41679jakub2009-12-171-7/+19
| | | | | | | | | | * var-tracking.c (add_stores): Avoid value mode mismatch for promoted declarations. * gcc.target/arm/pr41679.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155322 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove trailing white spaces.hjl2009-11-251-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154645 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (emit_note_insn_var_location): Don't call the secondjakub2009-10-281-0/+1
| | | | | | | | vt_expand_loc unnecessarily when location is not a register nor memory. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153666 138bc75d-0d04-0410-961f-82ee72b054a4
* * var-tracking.c (emit_note_insn_var_location): Get the mode ofjakub2009-10-281-2/+2
| | | | | | | a variable part from its REG, MEM or VALUE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153665 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-10-26 Ben Elliston <bje@au.ibm.com>uweigand2009-10-261-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153573 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rsandifo2009-10-201-24/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rtl.h (simplify_replace_fn_rtx): Declare. (wrap_constant, unwrap_constant): Delete. * cfgexpand.c (unwrap_constant, wrap_constant): Delete. (expand_debug_expr): Don't call wrap_constant. * combine.c (rtx_subst_pair): Only define for AUTO_INC_DEC. (auto_adjust_pair): Fold into... (propagate_for_debug_subst): ...here. Only define for AUTO_INC_DEC. Just return a new value. (propagate_for_debug): Use simplify_replace_fn_rtx for AUTO_INC_DEC, otherwise use simplify_replace_rtx. * cselib.c (wrap_constant): Reinstate old definition. (cselib_expand_value_rtx_1): Don't wrap constants. * gcse.c (try_replace_reg): Don't use copy_rtx in the call to simplify_replace_rtx. (bypass_block): Fix formatting in calls to simplify_replace_rtx. * reload1.c (reload): Skip all uses for an insn before adjusting it. Use simplify_replace_rtx. * simplify-rtx.c (simplify_replace_fn_rtx): New function, adapted from... (simplify_replace_rtx): ...here. Turn into a wrapper for simplify_replace_fn_rtx. (simplify_unary_operation): Don't unwrap CONSTs. * var-tracking.c (check_wrap_constant): Delete. (vt_expand_loc_callback): Don't call it. (vt_expand_loc): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153037 138bc75d-0d04-0410-961f-82ee72b054a4