2008-12-10 Alexandre Oliva * testsuite/gcc.misc-tests/options.exp (check_for_options): Match as-new too. 2008-12-10 Alexandre Oliva * tree-stdarg.c (check_all_va_list_escapes): Ignore debug stmts. 2008-12-10 Alexandre Oliva * modulo-sched.c (const_iteration_count): Ignore debug insns. (res_MII, loop_single_full_bb_p, sms_schedule): Likewise. (sms_schedule_by_order, ps_has_conflicts): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check no non-debug insn's deps on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Ignore debug insns. (create_ddg): Count debug insns. * ddg.h (struct ddg): Add num_debug. Reorder fields for better packing on LP64 hosts. 2008-12-10 Alexandre Oliva * testsuite/lib/gcc-dg.exp (cleanup-dump, cleanup-saved-temps): Remove -fcompare-debug temp files as well. 2008-12-05 Alexandre Oliva * ifcvt.c (noce_process_if_block): Check for modifications to the insn src after the insn, rather than after the one that follows it. 2008-12-05 Alexandre Oliva * coverage.c (coverage_begin_output): Don't overwrite .gcno file during -fcompare-debug-second compilation. 2008-12-05 Alexandre Oliva * rtl-factoring.c (ABSTRACTABLE_INSN_P): Skip debug insns. (prev_insn_in_block, collect_pattern_seqs): Likewise. (clear_regs_live_in_seq): Likewise. 2008-12-05 Alexandre Oliva * rtl-factoring.c (struct hash_bucket_def): Add linked list of candidates. (struct hash_elem_def): Add pointer to successor. (collect_pattern_seqs): Iterate over linked lists. Halve the number of examined pairs. (htab_eq_elem): Compare insn rather than hash. (fill_hash_bucket): Maintain linked list. 2008-12-05 Alexandre Oliva PR target/37033 * dwarf2out.c (saved_do_cfi_asm): New. (dwarf2out_do_frame): Take it into account. (dwarf2out_d_cfi_asm): Likewise. Set it when appropriate. 2008-12-05 Alexandre Oliva * cp/repo.c (get_base_filename): Use aux_base_name rather than alternate temporary file during second compare debug compilation. 2008-12-05 Alexandre Oliva * gcc.c (compare_debug_auxbase_opt_spec_function): New. (static_spec_functions): Add it. (cc1_options): Use it instead of normal auxbase computation for the second compare-debug compilation. (compare_debug_dump_opt_spec_function): Adjust comment. (debug_auxbase_opt): New. (compare_debug_self_opt_spec_function): Adjust comment and warning. Save auxbase. 2008-11-25 Alexandre Oliva * fortran/trans-decl.c (gfc_build_qualified_array): Don't skip generation of range types. * fortran/trans.h (struct lang_type): Add base_decls. (GFC_TYPE_ARRAY_BASE_DECL): New. * fortran/trans-types.c (gfc_get_array_type_bounds): Initialize base decls proactively and excessively. (gfc_get_array_descr_info): Use existing base decls if available. 2008-11-25 Alexandre Oliva * dwarf2out.c (move_linkage_attr): New. (dwarf2out_finish): Add MIPS_linkage_name attribute to the correct die, at the right place. 2008-11-25 Alexandre Oliva * tree-inline.c (insert_debug_decl_map): Not during early non-SSA inlining. (insert_init_debug_bind): Likewise. Add id argument, adjust all callers. Mark symbols for renaming. (insert_init_stmt): Add id argument, adjust all callers. 2008-11-20 Alexandre Oliva * gcse.c (cprop_insn): Don't count changes to debug insns as changes. 2008-11-20 Alexandre Oliva * tree-inline.h (struct copy_body_data): Add debug_map. * tree-inline.c (insert_debug_decl_map): New. (copy_debug_stmt): Look up debug_map for VAR in debug stmts (self_inlining_addr_expr): Restored. (insert_init_debug_bind): New. (insert_init_stmt): Don't look in debug stmts, generate them. (setup_one_parameter): Restore optimizations to replace SSA names and VARs with their values, but preserving the generation of debug annotations. (initialize_inlined_parameters): Pass fn down. (expand_call_inline, unsave_expr_now): Maintain debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Likewise. Create BB unconditionally. (build_duplicate_type): Maintain debug_map. * tree-cfgcleanup.c (remove_forwarder_block): Copy debug stmts along with labels. 2008-11-20 Alexandre Oliva * dwarf2out.c (debug_str_hash_forced): New. (add_string): New, split out of... (add_AT_string): ... this. (gen_label_for_idirect_string): New, split out of... (AT_string_form): ... this. (get_debug_string_label): New. (mem_loc_descriptor): Handle CONST_STRINGs. (output_indirect_string): Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Preserve forced indirect strings. 2008-11-20 Alexandre Oliva * tree-parloops.c (eliminate_local_variables_stmt): Replace elements in the value portion of debug stmts. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Call it for debug bind stmts. 2008-11-20 Alexandre Oliva * cfgloopanal.c (num_loop_insns): Ensure ninsns is never zero. 2008-11-20 Alexandre Oliva * tree.c (iterative_hash_expr): Don't take a NULL built in decl. 2008-11-20 Alexandre Oliva * cfgrtl.c (purge_dead_edges): Skip debug insns at the end, along with notes among them. 2008-11-20 Alexandre Oliva * tree-inline.c (remap_gimple_stmt): Don't demand lexical blocks for debug stmts to have been remapped before, remap them. 2008-11-17 Alexandre Oliva * tree-ssa-live.c (remove_unused_scope_block_p): Keep variables that have value exprs. 2008-11-17 Alexandre Oliva * local-alloc.c (update_equiv_regs): Revert now-redundant df rescan. 2008-11-17 Alexandre Oliva * loop-invariant.c (find_invariants_bb): Ignore debug insns. 2008-11-17 Alexandre Oliva * reload1.c (emit_input_reload_insns): Don't let debug insns get in the way of optimizing away a SET in the previous non-debug insn to satisfy an input reload. 2008-10-29 Alexandre Oliva * tree.c (iterative_hash_pointer): Delete. (iterative_hash_expr): Short-circuit handling of NULL pointer. Hash UIDs and versions of SSA names. Don't special-case built-in function declarations. 2008-10-29 Alexandre Oliva * c-parser.c (c_parser_binary_expression): Initialize binary_loc. * ebitmap.h (ebitmap_iter_init): Initialize all fields. * ipa-struct-reorg.c (gen_struct_type): Replace known-true test with assertion. 2008-10-29 Alexandre Oliva * combine.c (reg_subword_p): Don't use C++ keyword new. 2008-10-29 Alexandre Oliva * tree-ssa-loop-ivopts.c (idx_remove_ssa_names): Handle ARRAY_RANGE_REFs like ARRAY_REFs. 2008-10-29 Alexandre Oliva * ira-build.c (create_bb_allocnos): Disregard debug insns. * ira-conflicts.c (add_copies): Likewise. * ira-costs.c (scan_one_insn, process_bb_node_for_hard_reg_moves): Likewise. * ira-lives.c (process_bb_node_lives): Likewise. 2008-10-29 Alexandre Oliva * tree-inline.c (tree_function_versioning): Fix merge fallout. * haifa-sched.c (schedule_block): Likewise. * ipa-reference.c (scan_stmt_for_static_refs): Likewise. 2008-10-10 Alexandre Oliva * doc/install.texi (STAGE1_TFLAGS, BUILD_CONFIG): Document. 2008-10-10 Alexandre Oliva * c-gimplify.c (c_genericize): Don't pass NULL to printf %s. Enclose multi-line ternary expression in parentheses. 2008-10-07 Alexandre Oliva * print_rtl (print_rtx): Don't assume modes in EXPR_LISTs and INSN_LISTs must refer to REG_NOTEs. 2008-10-07 Alexandre Oliva * haifa-sched.c (rank_for_schedule): Don't scan back for non-debug insn past prev_head. (schedule_insn): Don't mark debug insns as first in cycle. (get_ebb_head_tail): Skip boundary debug insns. (no_real_insns_p): Likewise. (schedule_block): Ensure last_schedule_insn is not a boundary debug insn. (set_priorities): Reject boundary debug insns. (prev_non_location_insn): New. (check_cfg): Use it in assertions. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * sched-deps.c (sd_init_insn): Mark debug insns as non-boundary. (sd_finish_insn): Check that debug insns are marked. (sched_analyze): Skip debug insns when searching back for call before head. * sched-int.h (DEBUG_INSN_SCHED_P): New. (SCHEDULE_DEBUG_INSN_P, BOUNDARY_DEBUG_INSN_P): New. * sched-rgn.c (init_ready_list): Skip boundary debug insns. (free_block_dependencies): Test for no real insns first. (schedule_region): Likewise, before setting priorities. * config/ia64/ia64.c (emit_insn_group_barriers, emit_all_insn_group_barriers): Ignore debug insns. (final_emit_insn_group_barriers): Likewise. Remove obsolete code to avoid emitting barriers because of debug insns. * config/rs6000/rs6000.c (get_next_active_insn): Skip debug insns. 2008-10-07 Alexandre Oliva * config/ia64/ia64.c (ia64_dwarf2out_def_steady_cfa): Take frame parameter. Always emit deleted label. (process_set, process_for_unwind_directive): Pass it frame, even when it wouldn't have been called. 2008-10-07 Alexandre Oliva * cfgrtl.c (rtl_merge_blocks): Drop notes before debug insns at the end of the first block. 2008-10-07 Alexandre Oliva * fortran/trans-types.c (gfc_get_nodesc_array_type): Don't vary types depending on debug info. 2008-10-07 Alexandre Oliva * cfgexpand.c (gimple_expand_cfg): Discard the source location only for builtins that are not overridden. 2008-10-07 Alexandre Oliva * cfgexpand.c (expand_debug_expr): Expand COMPLEX_CST into CONCAT. 2008-10-07 Alexandre Oliva * loop-unroll.c (struct iv_to_split): Add pointer to next. (struct var_to_expand): Likewise. (struct opt_info): Add head and tail for linked lists of the above. (analyze_insn_to_expand_var): Initialize next. (analyze_iv_to_split_insn): Likewise. (analyze_insns_in_loop): Create linked lists. (allocate_basic_variable): Simplify for use without hash table. (insert_var_expansion_initialization): Likewise, make it type-safer. (combine_var_copies_in_loop_exit): Likewise. (apply_opt_in_copies): Walk lists rather than hash tables. (release_var_copies): Simplified and inlined by hand into... (free_opt_info): ... this function. 2008-09-11 Alexandre Oliva * gcc.c (report_times_to_file): New. (execute): Implement it. (process_command): Support -time=. * doc/invoke.texi: Document it. 2008-09-11 Alexandre Oliva * toplev.c (process_options): Disregard optimize in flag_var_tracking_assignments auto-detect. Warn and disable if it's enabled without -fvar-tracking. * doc/invoke.texi (-fvar-tracking-assignments): Update. 2008-09-11 Alexandre Oliva * common.opt (fvar-tracking_assignments-toggle): New. * toplev.c (flag_var_tracking_assignments_toggle): New. (process_options): Handle it. * doc/invoke.texi: Document it. (fvar-tracking-assignments): Fix index entries. 2008-09-11 Alexandre Oliva * common.opt (fcompare-debug=, fcompare-debug-second): New. (fdump-final-insns=): New. (gtoggle): New. * doc/invoke.texi: Document them. * final.c (rest_of_clean_state): Dump final insn stream. * gcc.c (invoke_as): Hook in -fcompare-debug. (static_spec_functions): Add compare-debug-dump-opt and compare-debug-self-opt. (compare_debug, compare_debug_second, compare_debug_opt): New. (switches_debug_check, n_switches_debug_check): New. (debug_check_temp_file): New. (process_command): Handle -fno-compare-debug, -fcompare-debug and -fcompare-debug=*. (do_self_spec): Handle arguments after switches. (do_spec_1): Add .gk extension to temp file basenames for compare. (check_live_switch): Take SWITCH_IGNORE into account, and earlier. (main): Set up and implement compare debug mode. (compare_debug_dump_opt_spec_function): New. (compare_debug_self_opt_spec_function): New. * toplev.c (process_options): Handle flag_gtoggle, flag_dump_final_insns. * cp/repo.c (finish_repo): Skip during -fcompare-debug-second. * ada/lib-writ.adb (flag_compare_debug): Import. (Write_ALI): Skip during -fcompare-debug-second. * fortran/options.c (gfc_post_options): Disable dump_parse_tree during -fcompare-debug-second. * objc/objc-act.c (objc_init): Skip print_struct_values during -fcompare-debug-second. 2008-09-11 Alexandre Oliva * cfgexpand.c (expand_gimple_basic_block): Print ICE message. 2008-09-11 Alexandre Oliva * c-gimplify.c (c_genericize): Don't refer to DECL_ASSEMBLER_NAME before ensuring it's already computed. 2008-09-11 Alexandre Oliva * dwarf2out.c (deferred_asm_name): New. (add_name_and_src_coords_attributes): Defer creation of DW_AT_MIPS_linkage_name attribute if DECL_ASSEMBLER_NAME was not computed yet. (dwarf2out_finish): Revisit deferrals and emit attributes. 2008-09-10 Alexandre Oliva * dwarf2asm.c (dw2_force_const_mem): Defer creation of declarations for constants until... (dw2_output_indirect_constant_1): ... this point. 2008-09-10 Alexandre Oliva * gengtype.c (adjust_field_rtx_def): Add NOTE_INSN_DELETED_LABEL's label string. 2008-09-10 Alexandre Oliva * cfgexpand.c (expand_debug_expr): Handle negative bitpos. 2008-09-10 Alexandre Oliva * df-core.c (df_ref_debug): Honor -fdump-noaddr. 2008-09-10 Alexandre Oliva * emit-rtl (emit_insn_after, emit_jump_insn_after, emit_call_insn_after, emit_insn_before, emit_jump_insn_before, emit_call_insn_before): Take locator from non-debug insn. 2008-09-10 Alexandre Oliva * cfgexpand.c (expand_debug_expr): Don't modify pre-existing MEMs. 2008-09-10 Alexandre Oliva * local-alloc.c (memref_used_between_p): Skip debug insns. 2008-09-10 Alexandre Oliva * combine.c (move_deaths): Compare LUIDs within the same BB only. 2008-09-10 Alexandre Oliva * df-problems.c (df_note_bb_compute): Don't dump debug insns. 2008-09-10 Alexandre Oliva * cfgcleanup.c (try_crossjump_to_edge): Skip debug insns. 2008-09-10 Alexandre Oliva * gimple.c (gimple_build_debug_bind_stat): Copy block and location information from new stmt argument. * gimple.h (gimple_build_debug_bind_stat): Adjust declaration. (gimple_build_debug_bind): Adjust. * tree-inline.c (remap_gimple_stmt, setup_one_parameter): Adjust. * tree-into-ssa.c (insert_phi_nodes_for, rewrite_stmt): Adjust. 2008-09-10 Alexandre Oliva * cfgexpand.c (expand_gimple_basic_block): Remove duplicate stmt declaration. Preserve source location around expanding debug stmts. * cfglayout.c (get_curr_insn_source_location): New fn. (get_curr_insn_block): New fn. * rtl.h (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. 2008-09-10 Alexandre Oliva * cfgexpand.c (maybe_dump_rtl_for_gimple_stmt): Dump line number information if requested. 2008-09-10 Alexandre Oliva * gimple-pretty-print.c (dump_bb_header): Don't take line info from debug stmt. 2008-09-10 Alexandre Oliva * cfglayout.c (set_curr_insn_source_location): Don't refrain from switching to last_location. 2008-09-10 Alexandre Oliva * cfglayout.c (curr_location, last_location): Make static. 2008-09-04 Alexandre Oliva * print-rtl.c (print_rtx): Remove excess parenthesis after VAR_LOCATION. 2008-09-04 Alexandre Oliva PR debug/37098 * cfgexpand.c (expand_debug_expr): Handle PAREN_EXPR. 2008-08-12 Alexandre Oliva * tree-into-ssa.c (var_debug_value_for_decl): Don't track anonymous variables. 2008-08-12 Alexandre Oliva * sched-vis.c (print_insn): Dump anonymous variables. 2008-08-12 Alexandre Oliva * var-tracking.c (count_uses, add_uses, add_stores): Use Pmode for addresses. (add_uses): Compute value-based loc for MO_VAL_USE out of original loc, not tracked loc. (add_stores): Restore correct handling of MO_SET mode in MO_VAL_SET. (compute_bb_dataflow, emit_notes_in_bb): Always use value-based loc for resolution. 2008-08-12 Alexandre Oliva * tree.h (IS_DEBUG_BIND): New. * tree-ssa-loop-ivopts.c (remove_unused_ivopts): Use it. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-if-conv.c (tree_if_convert_stmt): Likewise. * tree-ssa-dce.c (eliminate_unnecessary_stmts): Likewise. * tree-ssa.c (verify_ssa): Likewise. * tree-inline.c (remap_gimple_stmt): Likewise. * tree-ssa-operands.c (parse_ssa_operands): Likewise. 2008-08-12 Alexandre Oliva * rtl.h (gen_rtx_UNKNOWN_VAR_LOC): Drop mode argument. Adjust all callers. * cfgexpand.c (expand_debug_expr_1): Removed. (expand_debug_expr): Remove wrapping of constants. Expand pointer to CONST_STRING with Pmode. Handle DECL and TYPE mode mismatches. (expand_gimple_basic_block): Hold the mode in VAR_LOCATION. * var-tracking.c (find_use_val): Take mode as argument, adjust all callers. Don't unwrap constants. (use_type): Don't unwrap constants. Take mode from VAR_LOCATION. (count_uses): Take mode from VAR_LOCATION. * combine.c (auto_adjust_pair): New, moved out of... (propagate_for_debug_subst): ... this. Handle SUBREGs. (propagate_for_debug): Don't unwrap constants. * fwprop.c (forward_propagate_and_simplify): Don't wrap constants. * local-alloc.c (adjust_debug_insns_equivs): Don't wrap constants. * cse.c (insn_live_p): Adjusted. * df-problems.c (df_note_bb_compute): Adjusted. * regmove.c (regmove_optimize): Adjusted. 2008-08-12 Alexandre Oliva * tree-dfa.c (find_referenced_vars): Not in debug stmts. * tree-inline.c (copy_tree_body_r): Don't add vars to referenced set when processing debug stmts. 2008-08-12 Alexandre Oliva * tree-ssa-propagate.c (substitute_and_fold): Don't let debug stmts trigger changes. 2008-08-12 Alexandre Oliva * rtlanal.c (side_effects_p): Not in VAR_LOCATION. 2008-08-12 Alexandre Oliva * tree-outof-ssa.c (not_ssa_name_p): New. (rewrite_trees): Use it to clean up debug stmts. 2008-08-12 Alexandre Oliva * cselib.c (new_cselib_val): Honor -fdump-noaddr. 2008-08-12 Alexandre Oliva * tree-if-conv.c (tree_if_convert_stmt, if_convertible_stmt_p): Check for GIMPLE_DEBUG rather than VAR_DEBUG_VALUE. * tree-cfgcleanup.c (tree_forwarder_block_p): Likewise. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise. (eliminate_unnecessary_stmts): Move debug stmt handler. * tree-inline.c (remap_gimple_stmt): Defer work on debug stmts. (copy_bb): Likewise. (copy_debug_stmt): Update. * tree-ssa-aliase.c (update_alias_info): Skip debug stmts. * ipa-reference.c (scan_stmt_for_static_refs): Likewise. * ipa-pure-const.c (scan_function_stmt): Likewise. 2008-08-12 Alexandre Oliva * Makefile.in (emit-rtl.o-warn): Accept warnings. 2008-08-12 Alexandre Oliva * see.c (see_merge_one_def_extension): Avoid bogus? uninitialized warning. 2008-08-01 Alexandre Oliva * var-tracking.c (variable_htab_eq): Move checking-only variables into ENABLE_CHECKING block. 2008-07-31 Alexandre Oliva Merged with trunk @138264. * common.opt (ftree-coalesce-vars): Don't use negative values. * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Adjust. * tree-cfg.c (verify_expr): Moved debug bind code... (verify_stmt): ... here. * gimple.def (GIMPLE_DEBUG): New. * gimple.h (gsi_next_nondebug, gsi_prev_nondebug, gsi_start_bb_nondebug, gsi_last_bb_nondebug): New. (gimple_debug_bind_get_var, gimple_debug_bind_get_value): New. (gimple_debug_bind_set_var, gimple_debug_bind_set_value): New. (gimple_build_debug_bind, gimple_build_debug_bind_stat): New. * tree.h (IS_DEBUG_STMT, VAR_DEBUG_VALUE_SET_VAR, VAR_DEBUG_VALUE_VAR, VAR_DEBUG_VALUE_VALUE): Adjust. * tree-inline.c (estimate_num_insns): Handle GIMPLE_DEBUG. * gimple.c (empty_body_p): Ignore debug stmts. (gimple_build_debug_bind_stat): New. (gss_for_code): Add GIMPLE_DEBUG. (gimple_has_side_effects, gimple_rhs_has_side_effects): Never for debug stmts. * tree.c (build_var_debug_value_stat): Delete. * tree-ssa-sink.c (statement_sink_location): Tuplify. * tree-dump.c (dequeue_and_dump): Remove VAR_DEBUG_VALUE support. * tree-pretty-print.c (dump_generic_node): Likewise. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. * tree-into-ssa.c (adjust_debug_stmts_for_var_def_move): Avoid zeroed-out SSA_NAMEs when re-creating rhs trees out of gimple assign. * var-tracking.c (count_uses): Preserve value of MEM address before that of the MEM itself. 2008-07-29 Alexandre Oliva * var-tracking.c (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_clear_at_call): Call it. 2008-07-29 Alexandre Oliva * cfgloopanal.c (num_loop_insns): Don't let bb-ending debug insns get an otherwise-bb-ending non-debug insns counted. (average_num_loop_insns): Likewise. 2008-06-10 Alexandre Oliva * print-rtl.c: Include cselib.h (print_rtx): Handle VALUEs. * Makefile.in (print-rtl.o): Depend on cselib.h. * rtl.c (rtx_equal_p): Handle VALUEs. * cselib.c (new_cselib_val): Add x argument. Dump it. Adjust callers. (cselib_expand_value_rtx_1): Use print-rtl support. (cselib_log_lookup): New. (cselib_lookup): Call cselib_log_lookup at every return point. (cselib_process_insn): Call cselib_reset_table_with_next_value rather than cselib_clear_table. (dump_cselib_vals, dump_cselib_table): New. * cselib.h (dump_cselib_table): Declare. * var-tracking.c (micro_operation_type_name): New. (attrs_list_mpdv_union): New. (val_init): Renamed to... (val_store): ... this. Verbosify. Handle REGs and MEMs. (val_resolve): Add INSN argument. Verbosify. Reset the node, detaching any equivalences before changing it. Merge incoming registers. Note plans for handling MEMs and other rtx types, with stopgap handlers in place. (variable_union): Remove comment about handling intersection. (VALUE_RECURSED_INTO): New. (find_loc_in_1pdv): New. (dfset_merge): New struct. (insert_into_intersection): New. (intersect_loc_chains): New. (merge_with_missing_1pdv_as_union): New. (variable_merge): New. (variable_merge2): New. (tie_break_pointers): New. (find_canonical_value): New. (variable_merge3): New. (dataflow_set_merge): New. (dfset_post_merge): New struct. (variable_post_merge): New. (dataflow_post_merge_adjust): New. (dataflow_set_different_1): Verbosify. (dataflow-set_different_2): Likewise. (replace_expr_with_values): New. (use_type): Only return MO_VAL_SET for REGs and recorded values. (log_op_type): New. (count_uses): Log. Count operation to resolve MEM address. (add_uses): Log. Likewise. Record VALUEized expressions too. (add_with_sets): Log. (compute_bb_dataflow): Fix incorrect uses of val_init for resolution. Use val_store. Handle VALUEized operands. (emit_notes_in_bb): Likewise. (vt_find_locations): Introduce second pass. Verbosify. Log total size of hash tables. (dump_variable_slot): New wrapper for... (dump_variable): ... this. Take var. Use print-rtl support. (dump_vars): Use new wrapper. (set_slot_part): Take slot rather than looking up hash table. Renamed with prototype change from... (set_variable_part): ... this. New wrapper. (vt_expand_loc_callback): Avoid infinite recursion. (vt_add_function_parameters): Set up VALUEs for incoming arguments. (vt_initialize): Verbosify. 2008-05-13 Alexandre Oliva * var-tracking.c (remove_unavailable_values): Actually remove slots with zero variable parts. 2008-05-12 Alexandre Oliva * var-tracking.c (dv_is_decl_p, dv_is_value_p): NULL is neither. (dv_as_decl): Assert dv_is_decl_p. (dv_from_value): Assert value. (dv_htab_hash): Assert ptr. (variable_htab_eq): Compare opaque pointers. (remove_unavailable_values): Deal with zero var parts. Do not remove last ref to a variable. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New, factored out from... (compute_bb_dataflow, emit_notes_bb): ... here. Clear info on modified REGs. (VAL_EXPR_IS_COPIED): Use different bit. (compute_bb_dataflow): Remove unavailable vars here... (vt_find_locations): ... not here. Don't disregard self-edges. (set_variable_part): Accept zero var parts. (clobber_variable_part): Adjust to deal with NULL. (vt_expand_loc_callback): Accept zero var parts. (check_changed_var): Deal with zero var parts. 2008-05-12 Alexandre Oliva * tree-ssa-operands.c (add_virtual_operands): Assert no debug use. (get_expr_operands): Pass opf_no_vops along with opf_debug_use. Move none into the right scope. 2008-05-12 Alexandre Oliva * cselib.c (cselib_reset_table_with_next_value): Add note to preserve constants. (cselib_record_sets): Use correct mode for IF_THEN_ELSE. 2008-05-12 Alexandre Oliva * tree-if-conv.c (tree_if_convert_stmt): Handle debug stmts. (if_convertible_stmt_p): Likewise. 2008-04-29 Alexandre Oliva * fwprop.c (forward_propagate_and_simplify): Wrap constants only in debug insns. 2008-04-29 Alexandre Oliva * var-tracking.c (struct variable_def): Declare var_part with a single element. (var_pool): Adjust comment. (valvar_pool): New. (dv_is_value_p): Improve documentation. (dv_onepart_p): New. (dv_pool): New. Use it all over, instead of var_pool. (dv_htab_hash): Attempt to reduce collisions. (unshare_variable): Take slot as argument. Adjust all callers. (vars_copy_1): Fix strict-aliasing error. (variable_union): Likewise. Ensure one-part dvs don't ever get more than one part. (struct dataflow_set_unavailable): New. (remove_unavailable_values): New. (dataflow_set_remove_unavailable): New. (dataflow_set_different_1): Fix strict-aliasing error. (dataflow_set_different_2): Likewise. (use_type): Follow var_debug_decl chain. (add_stores): Use use_type to tell whether to clobber. (find_src_set_src): Fix strict-aliasing error. (vt_find_locations): Remove unavailable values. (dump_variable): Fix strict-aliasing error. (variable_was_changed): Likewise. (set_variable_part): Ensure one-part vars get a single part at offset zero. (emit_note_insn_var_location): Fix strict-aliasing error. (check_changed_var): Likewise. (emit_notes_for_differences_1): Likewise. (emit_notes_for_differences_2): Likewise. (vt_initialize): Create valvar_pool if debug insns may exist. Adjust var_pool creation. (vt_finalize): Release valvar_pool. 2008-04-29 Alexandre Oliva * combine.c (try_combine): Don't pass uninitialized i2src or i2dest to propagate_for_debug. 2008-04-29 Alexandre Oliva * fwprop.c (forward_propagate_and_simplify): Replace entire var location rtx. Revert part of 2007-11-08 obviated by: 2008-04-02 Andy Hutchinson PR rtl-optimization/35542 * fwprop.c (forward_propagate_and_simplify): Replace loc_reg_mentioned_in_p with reg_mentioned_p. 2008-04-07 Alexandre Oliva * var-tracking.c: Include target.h. (VT_MAY_HAVE_VALUE_LOC): Remove. (vt_expand_loc): Don't discard values. Delegitimize top-level MEMs. * Makefile.in (var-tracking.o): Depend on TARGET_H. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * rtl.h (delegitimize_mem_from_attrs): Declare it. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Use it. * config/i386/i386.c (ix86_delegitimize_address): Use it. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define to... (rs600_delegitimize_address): ... this. New. * expr.c (get_inner_reference): Don't crash if the ultimate containing object is NULL. * cfgexpand.c (expand_debug_expr_1): Conditionally renamed from... (expand_debug_expr): ... this, to avoid unwrapped constants. * dwarf2out.c (mem_loc_descriptor): Check for TLS symbols, emit TLS annotations for them. (loc_descriptor): Recurse for CONSTs. Discard value exprs. * local-alloc.c (adjust_debug_insns_equivs): Wrap constants. 2008-04-02 Alexandre Oliva * var-tracking.c: Include cselib.h. (enum micro_operation_type): Remove MO_LOC_MAIN and MO_LOC_USE, add MO_VAL_USE, MO_VAL_LOC and MO_VAL_SET. (struct micro_operation_def): Document new meanings for loc. (struct decl_or_value): New. (struct emit_note_data_def): Add vars table. (struct attrs_def): Use decl_or_value dv rather than tree decl. (struct variable_def): Likewise. (struct location_chain_def): Accept VALUE in loc. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p, dv_is_value_p, dv_as_decl, dv_as_value, dv_as_opaque, dv_from_decl, dv_from_value, dv_htab_hash): New. (IS_DECL_CODE, check_value_is_not_decl): New. (variable_htab_hash): Use dv_htab_hash. (variable_htab_eq): Likewise. Handle values. (attrs_list_member, attrs_list_insert, attrs_list_union, unshare_variable, vars_copy_1, var_reg_decl_set, var_reg_reg, get_init_value, var_reg_delete_and_set, var_reg_delete, var_regno_delete, var_mem_decl_set, var_mem_set, var_mem_delete, variable_union, dataflow_set_different_1, dataflow_set_different_2): Adjust for decl_or_value. (val_init, val_resolve): New. (track_expr_p): Add need_rtl argument. Permit checking without forcing generation of RTL for a name. (track_loc_p): Adjust. (struct count_use_info): New. (find_use_val): New. (use_type): Add count_use_info argument. Choose appropriate use types for values in debug insns and for cselib-registered values. (count_uses): Handle new micro operation types. Preserve values. (count_uses_1, count_stores): Adjust for count_use_info. (count_with_sets): New. (VAL_NEEDS_RESOLUTION, VAL_HOLDS_TRACK_EXPR, VAL_EXPR_IS_COPIED, VAL_EXPR_IS_CLOBBERED): New. (add_uses): Handle new micro operation types. (add_uses_1): Adjust for count_use_info. (add_stores): Likewise. Handle new micro operation types. (add_with_sets): New. (find_src_status, find_src_set_src): Adjust for decl_or_value. (compute_bb_dataflow): Handle new micro operation types. (dump_attrs_list, dump_variables, variable_was_changed, set_variable_part, clobber_variable_part, delete_variable_part): Adjust for decl_or_value. (VT_MAY_HAVE_VALUE_LOC): New. (vt_expand_loc_callback, vt_expand_loc): New. (emit_note_insn_var_location): Use vt_expand_loc. Adjust for decl_for_value. (check_changed_value, check_changed_var): New. (emit_notes_for_changes): Take the block's variable hashtable as argument. Mark as changed VALUEs that depend on other changed values or expressions. (emit_notes_for_differences_1): Adjust for decl_or_value. (emit_notes_for_differences_2): Likewise. (emit_notes_in_bb): Pass in hashtable as argument to emit_notes_for_changes. Handle new micro operation types. (vt_add_function_parameters): Adjust for decl_or_value. (vt_initialize): Initialize cselib and scratch_regs. Move code out to cselib callbacks and use them. (vt_finalize): Finish cselib and release scratch_regs. * Makefile.in (var-tracking.o): Depend on cselib.h. * cselib.c (struct expand_value_data): New. (cselib_record_sets_rook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Rename and reintroduce in terms of... (cselib_reset_table_with_next_value): This. (cselib_get_next_unknown_value): New. (entry_and_rtx_equal_p): Avoid cast-away-constness warning. (discard_useless_locs): Don't discard preserved values. (discard_useless_values): Likewise. (cselib_preserve_value, cselib_preserved_value_p, cselib_preserve_definitely, cselib_clear_preserve, cselib_preserve_only_values): New. (wrap_constant): Moved to cfgexpand.c. (expand_loc): Replace regs_active argument with an expand_value_data. Adjust. (cselib_expand_value_rtx): Rename and reimplement in terms of... (cselib_expand_value_rtx_1): ... this, with an expand_value_data argument. Adjust. Call callback if set. Wrap constants as needed. (cselib_expand_value_rtx_cb): New. (cselib_invalidate_regno): Regard preserved values. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Moved to cselib.h, renamed as cselib_set. (cselib_record_sets): Adjust. Call new hook. * cselib.h (struct cselib_set): Moved here. (cselib_record_sets_hook, cselib_expand_callback, (cselib_expand_value_rtx_cb, cselib_reset_table_with_next_value, cselib_get_next_unknown_value, cselib_preserve_value, cselib_preserved_value_p, cselib_preserve_only_values): Declare. * rtl.h (wrap_constant, unwrap_constant): Declare. * cfgexpand.c (wrap_constant, unwrap_constant): New. (expand_debug_expr): Use wrap_constant. * combine.c (propagate_for_debug): Likewise. 2008-03-01 Alexandre Oliva * haifa-sched.c (move_insn): Revert previous change. 2008-03-01 Alexandre Oliva * df-scan.c (df_ref_chain_change_bb): Simplify. (df_insn_change_bb): Add new_bb argument. Simplify. Call set_block_for_insn if there's any change. * df.h ((df_insn_change_bb): Fix prototype. * cfgrtl.c (update_bb_for_insn_chain): Pass bb to df_insn_change_bb, don't call set_block_for_insn. * emit-rtl.c (reorder_insns): Likewise. * haifa-sched.c (move_insn): Likewise. 2008-02-27 Alexandre Oliva * tree-into-ssa.c (struct check_debug_predicate): Add stmt. (check_and_update_debug_stmt_1): Don't discard uses of default defs. Discard uses of no-longer-dominating defs. (check_and_update_debug_stmt): Set stmt. (maybe_replace_use_in_debug_insn): Don't fail rewriting a debug stmt because of references to default def. 2008-02-27 Alexandre Oliva * sched-vis.c (print_insn): Handle debug insns. * tree-pretty-print.c (dump_generic_node): Use '=>' rather than '=' for DEBUG stmts. 2008-02-27 Alexandre Oliva * haifa-sched.c (move_insn): Don't mark block as DF-dirty when moving insns in it. 2008-02-19 Alexandre Oliva * fwprop.c (try_fwprop_subst): Deal with NULL set. 2008-02-19 Alexandre Oliva Merge from trunk right before the 4.3 branch. * doc/invoke.texi: Re-add -ftree-coalesce-inlined-vars and -ftree-coalesce-vars. * gcse.c (alloc_gcse_mem): Remove reverse mapping CUID_INSNs. * tree-ssa-live.c (remove_unused_locals): Add argument to mark_all_vars_used. * sched-deps.c (sched_analyze_insn): Move code that sets up deps of debug insns along with move of unconditional case. * tree-ssa-operands.c (get_addr_dereference_operands): Adjust for renamed variable. * var-tracking.c (use_type): Add modep argument. Use track_loc_p. (add_uses): Adjust. Use var_lowpart. (add_stores): Adjust. 2008-02-19 Alexandre Oliva * df-scan.c (df_insn_rescan_1): Rename back to... (df_insn_rescan): This. Remove wrapper. (df_insn_rescan_debug_internal): New implementation. 2008-02-19 Alexandre Oliva * cfgexpand.c (expand_debug_expr): Avoid VIEW_CONVERT_EXPR infinite recursion more trivially. Suggested by Eric Botcazou. 2008-01-09 Alexandre Oliva 2008-01-09 Alexandre Oliva * Makefile.in (dse.o): Remove duplicate $(RECOG_H) dependency. 2007-10-30 Richard Guenther * Makefile.in (dse.o): Add $(OPTABS_H) and $(RECOG_H) dependencies. 2008-01-09 Alexandre Oliva * regclass.c (scan_one_insn): Skip debug insns. (reg_scan, init_subregs_of_mode): Likewise. 2008-01-09 Alexandre Oliva * cfgexpand.c (expand_debug_expr): Handle conversion from/to/between float modes. 2008-01-09 Alexandre Oliva * tree-flow-inline.h (next_readonly_imm_use): Return NULL_USE_OPERAND_P after the end. 2008-01-09 Alexandre Oliva * df-scan.c (struct df_collection_ref): Add alloc_ members. (vec_SIZE_def, vec_SIZE_use, vec_SIZE_eq_use, vec_SIZE_mw): New. (safe_alloca_vec, safe_grow_vec, safe_free_vec): New. (df_insn_rescan_1): Move allocation down. Use new macros. (df_bb_refs_record): Likewise. (df_notes_rescan): Use new macros. (df_ref_create_structure, df_ref_record): Likewise. (df_record_entry_block_defs): Likewise. (df_record_exit_blocks_uses): Likewise. (df_bb_verify): Likewise. 2008-01-09 Alexandre Oliva * tree-into-ssa.c (adjust_debug_stmts_for_var_def_move): Propagate value from SSA defs. (prepare_block_for_update): Do not skip debug insns. * tree-ssa-operands.c (add_vop): Reject debug insns. (get_indirect_ref_operands): Do no more than recursing for debug insns. (get_expr_operands): Don't add vops to debug insns. (parse_ssa_operands): Likewise. * tree-ssa-propagate.c (set_rhs): Handle debug insns. * tree-flow-inline.h (get_subvars_for_var): Don't require annotated vars. * dwarf2out.c (mem_loc_descriptor): Handle MINUS. * cfgexpand.c (expand_debug_expr): Avoid infinite recursion in unsimplifyable conversions. 2008-01-03 Alexandre Oliva * combine.c (cleanup_auto_inc_dec): Fix pasto, compare with PRE_MODIFY. Reported by Paolo Bonzini. 2008-01-03 Alexandre Oliva * config/ia64/ia64.c (ia64_safe_itanium_class): Ignore debug insns. (group_barrier_needed): Not for debug insns. (ia64_variable_issue): Always accept debug insns. (ia64_dfa_new_cycle): Not because of debug insns. (final_emit_insn_group_barriers): Don't emit a barrier after a call just because of debug insns. 2008-01-03 Alexandre Oliva * config/rs6000/rs6000.c (is_microcoded_insn): Exclude debug insns. (is_cracked_insn, is_branch_slot_insn): Likewise. (is_nonpipeline_insn, insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Let debug insns through. 2008-01-03 Alexandre Oliva * haifa-sched.c (rank_for_schedule): Don't search back past the block head for the last non-debug scheduled insn. 2008-01-03 Alexandre Oliva * sched-deps.c (sd_add_dep): Make sure no non-debug insns ever depend on debug insns. (sched_analyze_reg): Don't add debug insns to sched_before_next_call list. (sched_analyze_insn): Simplify deps of debug insns. (init_deps): Initialize... * sched-int.h (struct deps): ... new field last_debug_insn. * sched-rgn.c (add_branch_dependences): Simplify. 2008-01-03 Alexandre Oliva * haifa-sched.c (struct ready_list): Add n_debug. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Maintain n_debug. (queue_to_ready): Skip debug insns when looking for next insn. Otherwise discount debug insns. (choose_ready): Pick a debug insn if it's first. (SCHED_DEBUG_INSNS_BEFORE_REORDER): New, enabled by default. (schedule_block): Don't count debug insns against MAX_SCHED_READY_INSNS. Schedule debug insns before running machine-specific reorder or reorder2 by default. Always accept more debug insns in a cycle. (schedule_block): Check that n_debug was maintained properly. 2008-01-03 Alexandre Oliva * tree-nested.c (finalize_nesting_tree_1): Declare the frame_decl in the binding tree. 2008-01-03 Alexandre Oliva * cfgexpand.c (adjust_debug_string_constant): New. (debug_string_constants_p): New. (adjust_debug_string_constants): New. (expand_debug_expr): Don't expand STRING_CSTs unless we know we're actually going to need them. (tree_expand_cfg): Replace placeholders with a final decision. * print-rtl.c (print_rtx): Recognize debug string placeholders. 2008-01-03 Alexandre Oliva * df-scan.c (df_uses_record): Reject auto-inc-dec in debug insns. 2008-01-03 Alexandre Oliva * combine.c (cleanup_auto_inc_dec): New. (struct rtx_subst_pair): Add new fields to track changes and auto-inc-dec. (propagate_for_debug_subst): Handle auto-inc-dec. (propagate_for_debug): Initialize new fields. Only move or mark for rescan debug insns that have actually changed. 2008-01-03 Alexandre Oliva * sched-rgn.c (bb_insn_count): New. (too_large, find_rgns): Use it. 2008-01-03 Alexandre Oliva * dce.c (mark_reg_dependencies): Skip debug insns. 2008-01-03 Alexandre Oliva * reload1.c (reload): Simplify addresses of pseudos allocated to stack slots or found equivalent to constants in debug insns. 2008-01-03 Alexandre Oliva * rtlanal.c (reg_used_between_p): Skip debug insns. 2008-01-03 Alexandre Oliva * fwprop.c (forward_propagate_and_simplify): Handle modeless CONST_DOUBLEs. 2008-01-03 Alexandre Oliva * sched-deps.c (fixup_sched_groups): Skip debug insns while searching back for the sched group leader. (sched_analyze_insn): Don't mark debug insns as members of sched groups, even if in a call group. 2008-01-03 Alexandre Oliva * auto-inc-dec.c (merge_in_block): Skip debug insns. Fix whitespace. 2008-01-03 Alexandre Oliva * cfgexpand.c (expand_debug_expr): Use just EXPAND_INITIALIZERf for constants. Get inner_mode for conversions from the operand. 2008-01-03 Alexandre Oliva * caller-save.c (replace_reg_with_saved_mem): Don't validate addresses. 2008-01-03 Alexandre Oliva * reload.c (find_equiv_reg): Don't count debug insns against max-reload-search-insns when searching back for inheritance opportunities. 2008-01-03 Alexandre Oliva * lower-subreg.c (adjust_decomposed_uses): Unshare concatn that couldn't be simplified. 2008-01-03 Alexandre Oliva * common.opt (fdump-unnumbered-links): New. * doc/invoke.texi (-fdump-unnumbered-links): Document it. * print-rtl.c (flag_dump_unnumbered_links): New. (print_rtx): Test it. 2008-01-03 Alexandre Oliva * common.opt (fmin-insn-uid=): New. * emit-rtl (cur_debug_insn_uid): New macro. (set_new_first_and_last_insn): Set it. (make_debug_insn_raw): Use it. (init_emit): Initialize it. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * doc/invoke.texi (-fmin-insn-uid=): Document it. 2007-11-12 Alexandre Oliva * tree.c (type_hash_add): Don't violate strict aliasing rules. 2007-11-12 Alexandre Oliva * ifcvt.c (noce_process_if_block): Skip notes in between debug insns when scanning back for insn_b. Check for mods starting after insn_b. 2007-11-12 Alexandre Oliva * caller-save.c (refmarker_fn): New type. (save_call_clobbered_regs): Don't restore saved regs for debug insns. (mark_referenced_regs): Add mark and arg parameters. Make first argument indirect. Adjust callers. (mark_reg_as_referenced): New function. (replace_reg_with_saved_mem): New function. 2007-11-12 Alexandre Oliva * tree-ssa-loop-ivopts.c (find_interesting_uses): Skip debug stmts. (find_interesting_uses_stmt): No longer test for debug stmts. 2007-11-12 Alexandre Oliva * dwarf2asm.c (splay_tree_compare_strings): New function. (dw2_force_const_mem): Use it. 2007-11-12 Alexandre Oliva * rtlanal.c (loc_mentioned_in_p): Test XVECEXPs correctly. 2007-11-08 Alexandre Oliva * cse.c (count_reg_usage): Not in debug insns. (is_dead_reg): New. (set_live_p): Use it. (insn_live_p): Delete references to trivially dead registers in debug insns. 2007-11-08 Alexandre Oliva * tree-vectorizer.c (vect_is_simple_reduction): Disregard uses in debug insns. 2007-11-08 Alexandre Oliva * regrename.c (build_def_use): Don't mark uses in debug insns as chain terminators. 2007-11-08 Alexandre Oliva * cfgloopanal.c (num_loop_insns): Don't count debug insn. (average_num_loop_insns): Likewise. 2007-11-08 Alexandre Oliva * tree-into-ssa.c (maybe_replace_use_in_debug_insn): New. (rewrite_update_stmt): Never introduce uses of a default definition in a debug stmt. 2007-11-08 Alexandre Oliva * fwprop.c (forward_propagate_and_simplify): Update the debug insn ref only, not the entire location expression. 2007-11-08 Alexandre Oliva * haifa-sched.c (schedule_block): Don't clear first-insn-in-cycle status after scheduling debug insn. 2007-11-08 Alexandre Oliva * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Revert. (convert_regs_1): Replace regs in debug insns. Deal with debug insns before first active insn. 2007-11-05 Alexandre Oliva * combine.c (propagate_for_debug): Add move argument. (try_combine): Tolerate debug insns between i2 and reg-copy i3. Move and adjust debug insns between them past i3-that-was-i2. 2007-10-15 Alexandre Oliva * tree-inline.c (processing_debug_stmt_p): Renamed to... (processing_debug_stmt): ... this. Change type to int. (remap_decl): Don't remap new decls in debug stmts. Mark error condition. (copy_debug_stmt): Check error conditions. 2007-10-15 Alexandre Oliva , Jan Hubicka * tree-ssa-live.c (remove_unused_scope_block_p): Drop declarations and blocks only after inlining. Check that non-empty blocks are not dropped. * tree-inline.c (expand_call_inline): Check that functions are not inlined too late. 2007-10-15 Alexandre Oliva * local-alloc.c: Include target.h. (adjust_debug_insns_equivs): New. (update_equiv_regs): Use it. Keep DF info up-to-date. * emit-rtl.c (next_nondebug_insn): New fn. (prev_nondebug_insn): New fn. * rtl.h: Declare them. * Makefile.in (local-alloc.o): Adjust deps. 2007-10-15 Alexandre Oliva * var-tracking.c (dump_variable): Don't crash while dumping anonymous temporary variables. 2007-10-15 Alexandre Oliva * fwprop.c (forward_propagate_and_simplify): ...into debug insns. 2007-10-15 Alexandre Oliva * common.opt (ftree-coalesce-inlined-vars): Change default. * doc/invoke.texi: Document default change. Mention var-tracking-assignments. 2007-10-15 Alexandre Oliva * common.opt (ftree-coalesce-inlined-vars): New. (ftree-coalesce-vars): New. * doc/invoke.texi: Document them. * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Implement them. 2007-10-09 Alexandre Oliva * ra-conflict.c (global_conflicts): Skip debug insns. 2007-10-01 Alexandre Oliva * expr.c (expand_expr_real_1): Reject debug exprs. * cfgexpand.c (floor_sdiv_adjust): New fn. (ceil_sdiv_adjust): New fn. (ceil_udiv_adjust): New fn. (round_sdiv_adjust): New fn. (round_udiv_adjust): New fn. (expand_debug_expr): New fn. (expand_gimple_basic_block): Handle debug stmts. * cfgrtl.c (rtl_block_ends_with_call_p): Ignore debug insns. * rtl.h (DEBUG_INSN_P): New macro. (MAY_HAVE_DEBUG_INSNS): New macro. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise. (PAT_VAR_LOCATION_DECL): New macro. (PAT_VAR_LOCATION_LOC): New macro. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New macro. (INSN_VAR_LOCATION_DECL): Likewise. (INSN_VAR_LOCATION_LOC): Likewise. (INSN_VAR_LOCATION_STATUS): Likewise. (gen_rtx_UNKNOWN_VAR_LOC): New macro. (VAR_LOC_UNKNOWN_P): New macro. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Likewise. (emit_debug_insn_before_setloc): Likewise. (emit_debug_insn_after): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_debug_insn_after_setloc): Likewise. (emit_debug_insn): Likewise. (make_debug_insn_raw): Likewise. * recog.c (verify_changes): Accept debug insns. (extract_insn): Handle them. (peephole2_optimize): Skip them. * dce.c (deletable_insn_p): Handle debug insns. * reload1.c (reload): Don't scan subregs in debug insns. (eliminate_regs_in_insn): Handle debug insns. * cse.c (cse_insn): Handle debug insns. (cse_extended_basic_block): Likewise. (insn_live_p): Likewise. * emit-rtl.c (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): Likewise. (active_insn_p): Exclude debug insns. (make_debug_insn_raw): New fn. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New fn. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): New fn. (emit_debug_insn_after_setloc): New fn. (emit_debug_insn_after): New fn. (emit_debug_insn_before_setloc): New fn. (emit_debug_insn_before): New fn. (emit_insn): Handle debug insn. (emit_debug_insn): New fn. (emit_jump_insn): Handle debug insn. (emit_call_insn): Likewise. (emit): Likewise. (emit_copy_of_insn_after): Likewise. * reg-stack.c (subst_stack_regs_pat): Handle var location rtx. * var-tracking.c (MO_LOC_MAIN, MO_LOC_USE): New micro ops. (var_reg_decl_set): New fn. (var_reg_set): Adjust. (var_mem_decl_set): New fn. (var_mem_set): Adjust. (use_type): New fn. (count_uses, add_uses, add_stores): Adjust. (compute_bb_dataflow): Handle new micro ops. (emit_notes_in_bb): Likewise. (vt_initialize): Likewise. (delete_debug_insns): New fn. (vt_debug_insns_local): New fn. (variable_tracking_main): Call it. * final.c (get_attr_length_1): Handle debug insns. * lower-subreg.c (adjust_decomposed_uses): New fn. (resolve_debug): New fn. (decompose_multiword_subregs): Handle debug insns. * print-rtl.c (print_rtx): Likewise. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insn): Likewise. (cond_exec_process_insns): Handle debug insns. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (rtx_subst_pair): New struct. (propagate_for_debug_subst): New fn. (propagate_for_debug): New fn. (try_combine): Call it. (distribute_links): Handle debug insns. * df-problems.c (df_lr_bb_local_compute): Likewise. (df_set_note): Reject debug insns. (df_set_dead_notes_for_mw): Add added_notes_p argument. (df_note_bb_compute): Handle debug insns. (df_simulate_uses): Likewise. (df_simulate_one_insn_forwards): Likewise. (df_simulate_one_insn_backwards): Likewise. * df-scan.c (df_insn_rescan_1): Renamed with new argument, from... (df_insn_rescan): ... this. Implement in terms of new name. (df_insn_rescan_debug_internal): New fn. (df_uses_record): Handle debug insns. * haifa-sched.c (contributes_to_priority_p): Likewise. (nondebug_dep_list_size): New fn. (priority, add_jump_dependencies): Use it. (rank_for_schedule): Handle debug insns. (schedule_block): Always accept more debug insns. * local-alloc.c (block_alloc): Handle debug insns. * regrename.c (replace_oldest_value_reg): ??? Test without this (replace_oldest_value_addr): Handle debug insns. (replace_oldest_value_mem): Likewise. (copyprop_hardreg_forward_1): Likewise. * regstat.c (regstat_init_n_sets_and_refs): Skip debug uses. (regstat_bb_compute_ri): Skip debug insns. * sched-rgn.c (add_branch_dependences): Likewise. * sched-vis.c (print_pattern): Handle debug insns. * regmove.c (optimize_reg_copy_1): Don't count debug insns. (fixup_match_2): Likewise. (regmove_optimize): Handle debug insns. (fixup_match_1): Don't count debug insns. Adjust them. * gcse.c (alloc_gcse_mem): Don't allocate uid for debug isnsn. (bypass_conditional_jumps): Skip debug insns. (compute_ld_motion_mems): Likewise. * sched-deps.c (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Likewise. (sched_analyze): Likewise. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * dse.c (scan_insn): Keep debug insns. * resource.c (mark_target_live_regs): Skip debug insns. * rtlanal.c (canonicalize_condition): Likewise. * df.h (df_insn_rescan_debug_internal): Declare. * dwarf2out.c (mem_loc_descriptor): Ignore sign and zero extend. (loc_descriptor): Likewise. * function.c (instantiate_virtual_regs): Handle debug insns. * rtl.def (DEBUG_INSN): New rtl code. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * cfglayout.c (duplicate_insn_chain): Likewise. 2007-10-01 Alexandre Oliva * tree-inline.c (processing_debug_stmt_p): New variable. (remap_decl): Register variables only while not processing debug statements. (copy_body_r): Enqueue debug statements for later processing. (copy_bb): Skip debug statements. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New fn. (copy_debug_stmts): New fn. (copy_generic_body, copy_body): Call it. (setup_one_parameter): Insert debug notes for inlined parms. (estimated_num_insns_1): Handle debug stmts. (optimize_inline_calls): Initialize debug stmt queue. (tree_function_versioning): Likewise. * tree-into-ssa.c (mark_def_sites): Handle debug stmts. (var_debug_value_for_decl): New fn. (adjust_debug_stmts_for_var_def_move): New fn. (adjust_debug_stmts_for_move): New fn. (check_debug_predicate): New struct. (check_and_update_debug_stmt_1): New fn. (check_and_update_debug_stmt): New fn. (insert_phi_nodes_for): Introduce debug stmts for phi nodes. (rewrite_stmt): Likewise, for SSA defs. (mark_use_interesting): Handle debug stmts. (prepare_block_for_update): Likewise. * tree.c (build_var_debug_value_stat): New fn. (empty_body_p): Handle debug stmts. * tree.def (VAR_DEBUG_VALUE): New tree code. * tree.h (VAR_DEBUG_VALUE_SET_VAR): New macro. (VAR_DEBUG_VALUE_VAR): Likewise. (VAR_DEBUG_VALUE_VALUE): Likewise. (IS_DEBUG_STMT): Likewise. (MAY_HAVE_DEBUG_STMTS): Likewise. (VAR_DEBUG_VALUE_NOVALUE): Likewise. (build_var_debug_value_stat): Declare. (build_var_debug_value): New macro. (var_debug_value_for_decl): Declare. * tree-gimple.c (is_gimple_stmt): Handle debug stmts. * tree-ssa-operands.c (opf_debug_use): New flag. (get_expr_operands): Handle debug stmts. Don't mark objects addressed in debug stmts as addressable. (parse_ssa_operands): Handle debug stmts. * tree-dump.c (dequeue_and_dump): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-dce (mark_stmt_if_obviously_necessary): Likewise. (necessary_p): New function. (eliminate_unnecessary_stmts): Handle debug stmts. * tree-ssa-propagate.c (get_rhs): Likewise. * tree-ssa.c (verify_ssa): Likewise. (execute_early_warn_uninitialized): Likewise. * tree-ssa-live.c (remove_unused_locals): Likewise. (set_var_live_on_entry): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-flow-inline.h (has_zero_uses): Ignore uses in debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. (bsi_next_nondebug): New fn. (bsi_prev_nondebug): Likewise. (bsi_start_nondebug): Likewise. (bsi_last_nondebug): Likewise. * tree-ssa-phiopt.c (empty_block_p): Ignore debug stmts. * tree-ssa-sink.c (all_immediate_uses_same_place): Likewise. (nearest_common_dominator_of_uses): Check for debug stmts. (statement_sink_location): Handle debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * tree-ssa-threadupdate.c (redirection_block_p): Ignore them. * tree-cfgcleanup.c (tree_forwarder_block_p): Likewise. * tree-outof-ssa.c (replace_use_variable): Don't clear. (analyze_edges_for_bb): Handle debug stmts. * tree-cfg.c (first_stmt): Skip debug stmts. (last_stmt): Likewise. (last_and_only_stmt): Likewise. (verify_expr): Verify debug value. (tree_block_ends_with_call_p): Skip debug stmts. * tree-flow.h (bsi_next_nondebug): Declare. (bsi_prev_nondebug): Likewise. (bsi_start_nondebug): Likewise. (bsi_last_nondebug): Likewise. (adjust_debug_stmts_for_move): Likewise. (adjust_debug_stmts_for_var_def_move): Likewise. (check_and_update_debug_stmt): Likewise. * tree-ssa-reassoc.c (linearize_expr): Adjust debug stmts. (linearize_expr_tree): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Skip debug stmts. * tree-ssa-ter.c (find_replaceable_in_bb): Likewise. * tree-ssa-loop-ivopts.c (find_interesting_uses_stmt): Likewise. (remove_unused_ivs): Adjust debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Likewise. (move_computations_stmt): Likewise. * tree-ssanames.c (release_ssa_name): Likewise. * tree-ssa-alias.c (find_used_portions): Handle debug exprs. * tree-ssa-structalias.c (compute_points_to_sets): Ignore debug stmts. * tree-tailcall.c (find_tail_calls): Handle debug stmts. * tree-vrp.c (find_assert_locations): Likewise. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Likewise. (create_outofssa_var_map): Likewise. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Handle debug stmts. * tree-ssa-pre.c (compute_avail): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Likewise. (check_loop_closed_ssa_stmt): Likewise. * tree-inline.h (copy_body_data): Add debug_stmts queue. * ipa-pure-const.c (scan_function): Skip debug stmts. * ipa-reference.c (scan_for_static_refs): Likewise. * ipa-type-escape.c (scan_for_refs): Likewise. * tree-stdarg.c (execute_optimize_stdarg): Likewise. 2007-10-01 Alexandre Oliva * common.opt (fvar-tracking-assignments): New. * doc/invoke.texi: Document it. * toplev.c (flag_var_tracking_assignments): New. (process_options): Choose its default. 2007-10-01 Alexandre Oliva * tree-inline.c (self_inlining_addr_expr): Delete. (setup_one_parameter): Drop fn argument. Adjust callers. Don't short-circuit optimization of declarations. 2007-10-01 Alexandre Oliva * ifcvt.c (noce_process_if_block): Try to handle only the then block if the else block exists but isn't suitable. Local Variables: mode: change-log change-log-default-name: "ChangeLog.vta" End: