aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
AgeCommit message (Collapse)AuthorFilesLines
2006-12-23dwarf2out.c (dbx_reg_number): Do leaf register remapping only if the ↵Eric Botcazou1-14/+12
function is leaf. * dwarf2out.c (dbx_reg_number): Do leaf register remapping only if the function is leaf. (multiple_reg_loc_descriptor): Likewise. From-SVN: r120170
2006-12-11Move all varpool routines out of cgraph/cgraphunit to varpool.cJan Hubicka1-1/+1
Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-05Merge gimple-tuples-branch into mainline.Aldy Hernandez1-3/+4
From-SVN: r119546
2006-12-01re PR c++/29433 (using boost::MPL requires lots of memory)Richard Guenther1-5/+3
2006-12-01 Richard Guenther <rguenther@suse.de> PR c++/29433 * dwarf2out.c (struct pubname_struct): Make name const. (add_pubtype): Do not xstrdup identifiers. From-SVN: r119404
2006-11-14Add ability to generate DWARF pubtypes section if DEBUG_PUBTYPES_SECTION is ↵Caroline Tice1-50/+119
defined. Add ability to generate DWARF pubtypes section if DEBUG_PUBTYPES_SECTION is defined. Also add dejagnu testcases for pubtypes. From-SVN: r118826
2006-11-11tree.def (FIX_CEIL_EXPR, [...]): Remove unused tree codes.Richard Guenther1-3/+0
2006-11-11 Richard Guenther <rguenther@suse.de> * tree.def (FIX_CEIL_EXPR, FIX_FLOOR_EXPR, FIX_ROUND_EXPR): Remove unused tree codes. * tree-vrp.c (extract_range_from_unary_expr): Remove handling of FIX_CEIL_EXPR, FIX_FLOOR_EXPR and FIX_ROUND_EXPR. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * tree.c (stabilize_reference): Likewise. * fold-const.c (fold_convert_const_int_from_real, operand_equal_p, fold_unary): Likewise. * tree-gimple.c (is_gimple_cast): Likewise. * dwarf2out.c (loc_descriptor_from_tree_1): Likewise. * expr.c (expand_expr_real_1): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * gimplify.c (gimplify_expr): Likewise. * tree-inline.c (estimate_num_insns_1): Likewise. * tree-cfg.c (verify_expr): Likewise. cp/ * typeck.c (build_unary_op): Likewise. java/ * check-init.c (check_init): Likewise. ada/ * trans.c (maybe_stabilize_reference): Likewise. fortran/ * trans-intrinsic.c (enum rounding_mode): New enum. (build_fix_expr, gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod, gfc_conv_intrinsic_function): Use it instead of FIX_CEIL_EXPR, FIX_FLOOR_EXPR, FIX_ROUND_EXPR and FIX_TRUNC_EXPR. From-SVN: r118692
2006-11-01In gcc/:Geoffrey Keating1-1/+1
* coverage.c (coverage_checksum_string): Update comment. * dwarf2out.c (switch_to_eh_frame_section): Update for removal of get_file_function_name. * cgraphunit.c (cgraph_build_static_cdtor): Update for rename of get_file_function_name_long. * tree.c (get_file_function_name): Rename from get_file_function_name_long; improve comment; handle 'I' and 'D' specially when the target has ctor/dtor support; remove special handling for 'F'. (get_file_function_name): Remove. * tree.h (get_file_function_name): Rename from get_file_function_name_long. (get_file_function_name): Remove prototype. In gcc/cp/: * name-lookup.c (get_anonymous_namespace_name): New. (push_namespace_with_attribs): Use get_anonymous_namespace_name. * decl2.c (start_objects): Update for rename of get_file_function_name_long. In gcc/fortran/: * trans-decl.c (gfc_generate_constructors): Update for removal of get_file_function_name. From-SVN: r118360
2006-10-30builtins.c (expand_builtin_mathfn_3): Correct coding style.Roger Sayle1-27/+28
* builtins.c (expand_builtin_mathfn_3): Correct coding style. * ddg.c (print_ddg_edge): Likewise. * dwarf2out.c (prune_unused_types_walk): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * langhooks.c (add_builtin_function): Likewise. * reg-stack.c (subst_stack_regs_pat): Likewise. * tree.c (expanded_location): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. From-SVN: r118187
2006-10-30dwarf2out.c (file_name_acquire): Correct typo.Danny Smith1-1/+1
* dwarf2out.c (file_name_acquire): Correct typo. Formatting tweak to earlier ChangeLog entry. From-SVN: r118171
2006-10-28Fixup whitespacingMike Stump1-1/+0
From-SVN: r118104
2006-10-25dwarf2out.c (gen_compile_unit_die): Use IS_ABSOLUTE_PATH.Nathan Froyd1-5/+17
* dwarf2out.c (gen_compile_unit_die): Use IS_ABSOLUTE_PATH. (file_table_relative_p): Likewise. (dwarf2out_finish): Likewise. (file_name_acquire): Use DIR_SEPARATOR and DIR_SEPARATOR_2. From-SVN: r118033
2006-10-09Revert emutls patch.Richard Henderson1-1/+1
From-SVN: r117578
2006-10-04Makefile.in (libgcc.mk, [...]): Add emutls.c.Richard Henderson1-1/+1
gcc/ * Makefile.in (libgcc.mk, LIBGCC_DEPS): Add emutls.c. * builtin-types.def (BT_WORD): Make unsigned. (BT_FN_VOID_PTR_WORD_WORD_PTR): New. * builtins.def (BUILT_IN_EMUTLS_GET_ADDRESS): New. (BUILT_IN_EMUTLS_REGISTER_COMMON): New. * c-decl.c (grokdeclarator): Don't error if !have_tls. * c-parser.c (c_parser_omp_threadprivate): Likewise. * cgraph.c (decide_is_variable_needed): Look at force_output. Recurse for emulated tls. * cgraphunit.c (cgraph_varpool_remove_unreferenced_decls): Remove checks redundant with decide_is_variable_needed. (cgraph_build_static_cdtor): Do cgraph_varpool_assemble_pending_decls. * dwarf2out.c (loc_descriptor_from_tree_1): Don't do anything for emulated tls. * expr.c (emutls_var_address): New. (expand_expr_real_1): Expand emulated tls. (expand_expr_addr_expr_1): Likewise. * libgcc-std.ver: Add __emutls_get_address, __emutls_register_common. * output.h (emutls_finish): Declare. * toplev.c (compile_file): Call it. * tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the address before wrapping in CONST. * varasm.c (emutls_htab, emutls_object_type): New. (EMUTLS_VAR_PREFIX, EMUTLS_TMPL_PREFIX): New. (get_emutls_object_name, get_emutls_object_type): New. (get_emutls_init_templ_addr, emutls_decl): New. (emutls_common_1, emutls_finish): New. (assemble_variable): When emulating tls, swap decls; generate constructor for the emutls objects. (do_assemble_alias): When emulating tls, swap decl and target name. (default_encode_section_info): Don't add SYMBOL_FLAG_TLS_SHIFT for emulated tls. * emutls.c: New file. * config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Only emit tls_object for real tls. gcc/cp/ * decl.c (grokvardecl): Don't error if !have_tls. (grokdeclarator): Likewise. * parser.c (cp_parser_omp_threadprivate): Likewise. gcc/fortran/ * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address and __emutls_register_common. * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls. * trans-common.c (build_common_decl): Don't check have_tls. * trans-decl.c (gfc_finish_var_decl): Likewise. * types.def (BT_WORD, BT_FN_PTR_PTR): New. (BT_FN_VOID_PTR_WORD_WORD_PTR): New. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_tls): Redefine to mean non-emulated tls. * gcc.dg/tls/alias-1.c: Remove tls requirement. * gcc.dg/tls/asm-1.c, gcc.dg/tls/debug-1.c, gcc.dg/tls/diag-1.c, gcc.dg/tls/diag-2.c, gcc.dg/tls/diag-3.c, gcc.dg/tls/diag-4.c, gcc.dg/tls/diag-5.c, gcc.dg/tls/init-1.c, gcc.dg/tls/nonpic-1.c, gcc.dg/tls/opt-10.c, gcc.dg/tls/opt-5.c, gcc.dg/tls/opt-6.c, gcc.dg/tls/opt-8.c, gcc.dg/tls/opt-9.c, gcc.dg/tls/pic-1.c, gcc.dg/tls/struct-1.c, gcc.dg/tls/trivial.c: Likewise. From-SVN: r117440
2006-09-21re PR debug/29132 (Mips exception handling broken.)Roger Sayle1-1/+1
2006-09-21 Roger Sayle <roger@eyesopen.com> PR debug/29132 * dwarf2out.c (dwarf2out_begin_prologue): Initialise the current label, dw_fde_current_label, to be the start of the function, i.e. the same value as dw_fde_begin. From-SVN: r117114
2006-09-13re PR debug/28980 (ICE in loc_descriptor_from_tree_1 with -g)Andrew Pinski1-0/+1
2006-09-13 Andrew Pinski <pinskia@physics.uc.edu> PR debug/28980 * dwarf2out.c (loc_descriptor_from_tree_1): Handle FUNCTION_DECL. 2006-09-13 Andrew Pinski <pinskia@physics.uc.edu> PR debug/28980 * gcc.c-torture/compile/debugvlafunction-1.c: New test. From-SVN: r116939
2006-09-12dwarf2out.c (file_table_last_lookup): Move this GC'd declaration outside of ↵Andrew Pinski1-2/+3
#ifdef DWARF2_DEBUGGING_INFO to fix... * dwarf2out.c (file_table_last_lookup): Move this GC'd declaration outside of #ifdef DWARF2_DEBUGGING_INFO to fix bootstrap failure on platforms that don't use dwarf for debug info. Co-Authored-By: Roger Sayle <roger@eyesopen.com> From-SVN: r116903
2006-09-12dwarf2out.c (dwarf_file_data): New.Geoffrey Keating1-218/+279
* dwarf2out.c (dwarf_file_data): New. (enum dw_val_class): Add dw_val_class_file. (struct dw_val_struct): Add val_file. (file_table): Change to a hash table. (file_table_emitted): Delete. (file_table_last_lookup_index): Delete. (emitcount): Delete. (last_emitted_file): New. (lookup_filename): Change prototype to return a struct dwarf_file_data. (init_file_table): Delete. (maybe_emit_file): Change prototype to take a struct dwarf_file_data. (AT_addr): Add comment. (add_AT_file): New. (AT_file): New. (get_AT_file): New. (print_die): Handle dw_val_class_file. (print_dwarf_line_table): Update for new file table structure. (attr_checksum): Do checksum a filename. (same_dw_val_p, same_attr_p): Do compare a filename. (size_of_die): Handle dw_val_class_file. (value_format): Likewise. (output_die): Likewise. Also, call maybe_emit_file here. (struct file_info): Constify filenames. Make file_idx a pointer to a struct dwarf_file_data. (struct dir_info): Constify directory names. Remove 'used' field. (struct file_name_acquire_data): New. (file_name_acquire): New. (output_file_names): Modify to handle new file data structures. (add_src_coords_attributes): Use add_AT_file. (add_call_src_coords_attributes): Likewise. (dwarf2out_imported_module_or_decl): Likewise. (gen_subprogram_die): Modify for new file data structures. (gen_variable_die): Likewise. (file_table_eq): New. (file_table_hash): New. (file_table_last_lookup): New. (lookup_filename): Rewrite to handle new file data structures. (maybe_emit_file): Rewrite to handle new file data structures. (dwarf2out_source_line): Always call lookup_filename and maybe_emit_file. (dwarf2out_init): Create file_table here. (prune_unused_types_walk_attribs): Don't call maybe_emit_file here. (file_table_relative_p): New. (dwarf2out_finish): Change detection of relative filenames to work with new file data structures. Move output_line_info call after debug_info output. From-SVN: r116873
2006-09-10dwarf2out.c (convert_cfa_to_fb_loc_list): Handle DW_CFA_set_loc.Roger Sayle1-0/+1
* dwarf2out.c (convert_cfa_to_fb_loc_list): Handle DW_CFA_set_loc. Co-Authored-By: Nicolas Setton <setton@adacore.com> From-SVN: r116807
2006-09-07dwarf2out.c: Remove strange characters from comment above ↵Geoffrey Keating1-3/+3
dwarf2out_frame_debug_expr. * dwarf2out.c: Remove strange characters from comment above dwarf2out_frame_debug_expr. From-SVN: r116767
2006-09-02Revert this change:Geoffrey Keating1-23/+26
2006-03-17 Alexandre Oliva <aoliva@redhat.com> * dwarf2out.c (dwarf2out_stack_adjust): Always track the stack pointer, instead of assuming it is possible to derive the correct args size from a call insn. From-SVN: r116659
2006-08-31re PR other/22313 (profiledbootstrap is broken on the mainline)Roger Sayle1-2/+13
PR other/22313 * dwarf2out.c (add_fde_cfi): Use a set_loc if the current label is NULL, otherwise use an advance_loc4 to adjust relative to the current label. (output_cfi) <DW_CFA_set_loc>: Update the current label. (dwarf2out_switch_text_section): Reset the current label to avoid using advance_loc4 over section boundaries. From-SVN: r116604
2006-08-22Index: gcc/ChangeLogGeoffrey Keating1-4/+7
2006-08-21 Geoffrey Keating <geoffk@apple.com> PR debug/28692 * dwarf2out.c (rtl_for_decl_init): Don't try to create RTL for complex values, nor for generic vector values. Index: gcc/testsuite/ChangeLog 2006-08-21 Geoffrey Keating <geoffk@apple.com> PR debug/28692 * gcc.dg/debug/const-1.c: New. * gcc.dg/debug/const-2.c: New. * gcc.dg/debug/dwarf2/const-1.c: New. * gcc.dg/debug/dwarf2/const-2.c: New. * gcc.dg/debug/dwarf2/const-2b.c: New. From-SVN: r116331
2006-08-09var-tracking.c (enum micro_operation_type): Add MO_COPY.Alexandre Oliva1-3/+0
* var-tracking.c (enum micro_operation_type): Add MO_COPY. (var_debug_decl): New function. (var_reg_set): Follow debug decl link. Add location even if reg is already known to hold some other variable. (var_mem_set): Follow debug decl link. (var_reg_delete_and_set, var_mem_delete_and_set): Follow debug decl link. Delete other known locations of the variable part if requested. (var_reg_delete, var_mem_delete): Delete other known locations of the variable part if requested. (same_variable_part_p): New function. (add_stores): Select MO_COPY when appropriate. (vt_initialize): Handle it. (compute_bb_dataflow, emit_notes_in_bb): Likewise. Delete known locations for MO_SET and MO_CLOBBER. (find_variable_location_part): New function. (set_variable_part, delete_variable_part): Use it. (clobber_variable_part): New function. * dwarf2out.c (dwarf2out_var_location): Do not follow debug decl link. From-SVN: r116031
2006-08-02re PR debug/28063 (Dwarf no longer uses merged strings for DW_AT_comp_dir)Daniel Jacobowitz1-1/+1
gcc/ PR debug/28063 * dwarf2out.c (prune_unused_types_prune): Move call to prune_unused_types_update_strings to cover the parent DIE also. gcc/testuite/ PR debug/28063 * gcc.dg/debug/dwarf2/dwarf-merge.c: New test. * lib/target-supports.exp (get_compiler_messages): Add WANT_OUTPUT. Optionally return assembly text. Update callers. (check_no_compiler_messages): Update verbose messages. (check_no_messages_and_pattern): New. (check_effective_target_string_merging): New. From-SVN: r115874
2006-08-01re PR debug/23336 (enum constants not visible to gdb because of ↵Daniel Jacobowitz1-1/+5
-feliminate-unused-debug-types) gcc/ PR debug/23336 * c-typeck.c (build_external_type): Mark used enum types. * dwarf2out.c (dwarf2out_abstract_function): Save and restore cfun also. (gen_subprogram_die): Whitespace fix. gcc/cp/ PR debug/23336 * pt.c (tsubst_copy_and_build): Mark used enum types. * semantics.c (finish_id_expression): Likewise. gcc/testsuite/ PR debug/23336 * lib/gcc-dg.exp (gcc-dg-debug-runtest): Suppress new tests at -g1. * gcc.dg/debug/enum-1.c, g++.dg/debug/enum-1.C, g++.dg/debug/enum-2.C: New. From-SVN: r115853
2006-05-19langhooks.h (struct lang_hooks): Add dwarf_name language hook.Nicolas Setton1-4/+2
* langhooks.h (struct lang_hooks): Add dwarf_name language hook. * langhooks.c (lhd_dwarf_name): New function. * langhooks-def.h (lhd_dwarf_name): Declare. (LANG_HOOKS_DWARF_NAME): New macro, defaults to lhd_dwarf_name. * dwarf2out.c (dwarf2_name): Use the dwarf_name language hook. * ada/misc.c (gnat_dwarf_name): New function. (LANG_HOOKS_DWARF_NAME): Define to gnat_dwarf_name. From-SVN: r113905
2006-05-14dwarf2out.c (dbx_reg_number): Check return value from LEAF_REG_REMAP and ↵Nick Clifton1-2/+14
only use it if it is valid. * dwarf2out.c (dbx_reg_number): Check return value from LEAF_REG_REMAP and only use it if it is valid. (multiple_reg_loc_descriptor): Likewise. From-SVN: r113756
2006-04-26dwarf2out.c (size_of_locs): Don't fill dw_loc_addr if there are no branches.Geoffrey Keating1-3/+15
* dwarf2out.c (size_of_locs): Don't fill dw_loc_addr if there are no branches. From-SVN: r113267
2006-04-25dwarf2out.c (verify_marks_clear): New.Geoffrey Keating1-4/+16
* dwarf2out.c (verify_marks_clear): New. (prune_unused_types): Call verify_marks_clear initially, not prune_unmark_dies. From-SVN: r113241
2006-04-22dwarf2out.c (struct die_struct): Document that die_sib makes a circular ↵Geoffrey Keating1-175/+167
linked list. * dwarf2out.c (struct die_struct): Document that die_sib makes a circular linked list. (FOR_EACH_CHILD): New. (reverse_die_lists): Delete. (reverse_all_dies): Delete. (add_dwarf_attr): Correct documentation. (remove_child_with_prev): New. (remove_child_TAG): Update for change to die_struct, use remove_child_with_prev. (add_child_die): Update for change to die_struct. (splice_child_die): Use remove_child_with_prev and add_child_die. (print_die): Use FOR_EACH_CHILD. (die_checksum): Likewise. (assign_symbol_names): Likewise. (output_location_lists): Likewise. (build_abbrev_table): Likewise. (calc_die_sizes): Likewise. (mark_dies): Likewise. (unmark_dies): Likewise. (unmark_all_dies): Likewise. (output_die): Likewise. (prune_unused_types_mark): Likewise. (prune_unused_types_walk): Likewise. (same_die_p): Update for change to die_struct. (break_out_includes): Likewise. (prune_unused_types_prune): Likewise. (add_sibling_attributes): Use FOR_EACH_CHILD, simplify logic. (prune_unmark_dies): Use FOR_EACH_CHILD, don't clear die_mark if it's already clear. (dwarf2out_finish): Don't call reverse_all_dies. From-SVN: r113171
2006-04-18dwarf2out.c (prune_unused_types_update_strings): Don't add strings to hash ↵Geoffrey Keating1-3/+2
table twice when the debug_str section has SECTION_MERGE. * dwarf2out.c (prune_unused_types_update_strings): Don't add strings to hash table twice when the debug_str section has SECTION_MERGE. From-SVN: r113057
2006-04-17dwarf2out.c (free_AT): Delete.Geoffrey Keating1-63/+56
* dwarf2out.c (free_AT): Delete. (remove_AT): Update string ref counts. (remove_child_TAG): Don't call free_die. (free_die): Delete. (break_out_includes): Don't call free_die on DW_TAG_GNU_BINCL or DW_TAG_GNU_EINCL. (prune_unused_types_walk_attribs): Reset string refcounts. (prune_unused_types_update_strings): New. (prune_unused_types_prune): Don't make unnecessary stores. Don't call free_die. Do call prune_unused_types_update_strings. (prune_unused_types): Empty debug_str_hash. From-SVN: r113012
2006-04-11dwarf2out.c (output_call_frame_info): Create debug_frame_section if it ↵Roger Sayle1-1/+6
hasn't been initialized by dwarf2out_init. * dwarf2out.c (output_call_frame_info): Create debug_frame_section if it hasn't been initialized by dwarf2out_init. From-SVN: r112871
2006-04-11dwarf2out.c (premark_used_types): Remove problematic prototype.Roger Sayle1-1/+0
* dwarf2out.c (premark_used_types): Remove problematic prototype. From-SVN: r112857
2006-04-1120060410.c: New.Aldy Hernandez1-0/+34
PR/21391 * testsuite/gcc.dg/20060410.c: New. * dwarf2out.c (struct die_struct): Add die_perennial_p field. (premark_used_types_helper): New. (premark_used_types): New. (gen_subprogram_die): Call premark_used_types. (prune_unused_types_walk): Do not prune perennial dies. * function.c (used_types_insert): New. * function.h (struct function): Add used_types_hash field. (used_types_insert): Add prototype. * Makefile.in (FUNCTION_H): Depend on HASHTAB_H. * c-parser.c (c_parser_cast_expression): Save casted types in used types hash table. From-SVN: r112845
2006-04-10dwarf2out.c (struct dw_attr_struct): Remove dw_attr_next.Geoffrey Keating1-205/+185
* dwarf2out.c (struct dw_attr_struct): Remove dw_attr_next. Declare VECs of this type. (struct die_struct): Make field die_attr a VEC of dw_attr_struct. (remove_children): Delete. (add_dwarf_attr): Use VEC routines. (add_AT_flag): Update for changes to add_dwarf_attr. (add_AT_int): Likewise. (add_AT_unsigned): Likewise. (add_AT_long_long): Likewise. (add_AT_vec): Likewise. (add_AT_string): Likewise. (add_AT_die_ref): Likewise. (add_AT_fde_ref): Likewise. (add_AT_loc): Likewise. (add_AT_loc_list): Likewise. (add_AT_addr): Likewise. (add_AT_lbl_id): Likewise. (add_AT_lineptr): Likewise. (add_AT_macptr): Likewise. (add_AT_offset): Likewise. (add_AT_range_list): Likewise. (get_AT): Use VEC_iterate. (remove_AT): Use VEC_ordered_remove. (free_die): Fold remove_children into here; have it use VEC_iterate. (print_die): Use VEC_iterate on attrs. (reverse_die_lists): Don't reverse attr lists. (die_checksum): Use VEC_iterate on attrs. (same_die_p): Likewise. (output_location_lists): Likewise. (build_abbrev_table): Likewise. (size_of_die): Likewise. (unmark_all_dies): Likewise. (output_abbrev_section): Likewise. (output_die): Likewise. (prune_unused_types_walk_attribs): Likewise. From-SVN: r112829
2006-04-10re PR debug/27057 (ICE with -feliminate-dwarf2-dups and using namespace)Jakub Jelinek1-1/+2
PR debug/27057 * dwarf2out.c (is_symbol_die): Return true also for namespaces. * g++.dg/debug/dwarf2-2.C: New test. From-SVN: r112820
2006-04-01dwarf2.h (DW64_CIE_ID): Define.Joseph Myers1-5/+16
* dwarf2.h (DW64_CIE_ID): Define. * dwarf2out.c (DWARF_CIE_ID): Define. (output_call_frame_info): Output 0xffffffff before standard 8-byte length header. Use DWARF_CIE_ID. (value_format): Use DW_FORM_data4 or DW_FORM_data8 for dw_val_class_loc_list depending on DWARF_OFFSET_SIZE. From-SVN: r112601
2006-03-27dwarf2out.c (add_location_or_const_value_attribute): Call ↵Geoffrey Keating1-8/+29
tree_add_const_value_attribute if nothing else works. * dwarf2out.c (add_location_or_const_value_attribute): Call tree_add_const_value_attribute if nothing else works. (reference_to_unused): New. (rtl_for_decl_init): Use reference_to_unused to decide whether to output an initializer. From-SVN: r112408
2006-03-25dwarf2out.c (is_c_family): Understand new DWARF3 language types.Geoffrey Keating1-6/+11
2006-03-24 Geoffrey Keating <geoffk@apple.com> * dwarf2out.c (is_c_family): Understand new DWARF3 language types. (is_cxx): Likewise. (gen_compile_unit_die): Use new language types for Objective-C and Objective-C++. (dwarf2out_decl): Use is_cxx rather than testing explicitly against DW_LANG_C_plus_plus. Index: testsuite/ChangeLog 2006-03-24 Geoffrey Keating <geoffk@apple.com> * objc.dg/dwarf-2.m: New. * obj-c++.dg/dwarf-2.mm: New. From-SVN: r112372
2006-03-24Back out previous accidental change.Geoffrey Keating1-40/+14
From-SVN: r112362
2006-03-24[multiple changes]Geoffrey Keating1-14/+40
2006-03-23 Geoffrey Keating <geoffk@apple.com> PR 26793 * config/t-darwin (crt3.o): Work around bug 26840. * config/darwin-crt3.c: Rewrite. * config/darwin.h (STARTFILE_SPEC): Don't use -l for crt3.o. Index: gcc/testsuite/ChangeLog 2006-03-24 Geoffrey Keating <geoffk@apple.com> * g++.old-deja/g++.other/init19.C: New. From-SVN: r112361
2006-03-17dwarf2out.c (dwarf2out_stack_adjust): Always track the stack pointer...Alexandre Oliva1-26/+23
* dwarf2out.c (dwarf2out_stack_adjust): Always track the stack pointer, instead of assuming it is possible to derive the correct args size from a call insn. From-SVN: r112170
2006-03-17tm.texi (SDB and DWARF): Add extra parameter to ASM_OUTPUT_DWARF_OFFSET.Geoffrey Keating1-23/+65
* doc/tm.texi (SDB and DWARF): Add extra parameter to ASM_OUTPUT_DWARF_OFFSET. Use @var to indicate metavariables. * dwarf2asm.h (dw2_asm_output_offset): Add section parameter. * dwarf2asm.c (dw2_asm_output_offset): Add base section parameter. Pass to ASM_OUTPUT_DWARF_OFFSET. * dwarf2out.c (debug_frame_section): New. (output_call_frame_info): Use debug_frame_section. Pass it to dw2_asm_output_offset. (output_die): Pass appropriate section to dw2_asm_output_offset. (output_compilation_unit_header): Likewise. (output_pubnames): Likewise. (output_aranges): Likewise. (enum dw_val_class): Break dw_val_class_lbl_offset into dw_val_class_lineptr and dw_val_class_macptr. (add_AT_lbl_offset): Delete. (add_AT_lineptr): New. (add_AT_macptr): New. (AT_lbl): Expect a lineptr or macptr. (print_die): Handle dw_val_class_lineptr and dw_val_class_macptr. (attr_checksum): Likewise. (same_dw_val_p): Likewise. (size_of_die): Likewise. (value_format): Likewise. (output_die): Likewise. (dwarf2out_finish): Call add_AT_lineptr and add_AT_macptr instead of add_AT_lbl_offset. * config/i386/cygming.h (ASM_OUTPUT_DWARF_OFFSET): Add extra parameter. * config/i386/i386.c (x86_file_start): Call darwin_file_start. * config/darwin-protos.h (darwin_file_start): New. (darwin_asm_output_dwarf_offset): New. * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Add extra parameter. * config/rs6000/rs6000.c (rs6000_darwin_file_start): Call darwin_file_start. * config/darwin.c (darwin_emit_unwind_label): Don't output label if not EH section; simplify. (darwin_file_start): New. (darwin_asm_output_dwarf_offset): New. * config/darwin.h (DEBUG_FRAME_SECTION): In __DWARF segment, mark as 'debug'. (DEBUG_INFO_SECTION): Likewise. (DEBUG_ABBREV_SECTION): Likewise. (DEBUG_ARANGES_SECTION): Likewise. (DEBUG_MACINFO_SECTION): Likewise. (DEBUG_LINE_SECTION): Likewise. (DEBUG_LOC_SECTION): Likewise. (DEBUG_PUBNAMES_SECTION): Likewise. (DEBUG_STR_SECTION): Likewise. (DEBUG_RANGES_SECTION): Likewise. (FRAME_BEGIN_LABEL): Must start with 'L' in debug section. (ASM_OUTPUT_DWARF_OFFSET): New. From-SVN: r112168
2006-03-09dwarf2out.c (expand_builtin_dwarf_sp_column): Make dwarf_regnum unsigned to ↵Andreas Tobler1-2/+2
fix signed/unsigned comparison issue in... 2006-03-08 Andreas Tobler <a.tobler@schweiz.ch> * dwarf2out.c (expand_builtin_dwarf_sp_column): Make dwarf_regnum unsigned to fix signed/unsigned comparison issue in DWARF2_FRAME_REG_OUT. (expand_builtin_init_dwarf_reg_sizes): Make i unsigned to fix signed/ unsigned comparison issue in DWARF2_FRAME_REG_OUT. From-SVN: r111850
2006-03-08dwarf2out.c (DWARF2_FRAME_REG_OUT): Move up in file.Geoffrey Keating1-29/+34
* dwarf2out.c (DWARF2_FRAME_REG_OUT): Move up in file. (expand_builtin_dwarf_sp_column): Call DWARF2_FRAME_REG_OUT. (expand_builtin_init_dwarf_reg_sizes): Likewise. From-SVN: r111825
2006-03-04dwarf2out.c (dwarf2out_add_library_unit_info): Remove.Kazu Hirata1-22/+0
* dwarf2out.c (dwarf2out_add_library_unit_info): Remove. * dwarf2out.h: Remove the prototype for dwarf2out_add_library_unit_info. From-SVN: r111716
2006-02-21defaults.h (CFA_FRAME_BASE_OFFSET): Define.Alexandre Oliva1-32/+45
* defaults.h (CFA_FRAME_BASE_OFFSET): Define. * config/ia64/ia64.h (CFA_FRAME_BASE_OFFSET): Override. * doc/tm.texi (CFA_FRAME_BASE_OFFSET): Document. * dwarf2out.c (build_cfa_loc): New offset parameter. Add it to the result of the expression. (def_cfa_1): Adjust. (frame_pointer_cfa_offset): Rename to... (frame_pointer_fb_offset): ... this. Adjust all uses. (convert_cfa_to_loc_list): Rename to... (convert_cfa_to_fb_loc_list): ... this. New offset parameter. Pass it on to build_cfa_loc. (compute_frame_pointer_to_cfa_displacement): Rename to... (compute_frame_pointer_to_fb_displacement): ... this. New offset parameter. Use it in computation. (gen_subprogram_die): Compute cfa_fb_offset with the new macro, and use it to compute the fb loc list and the displacement. From-SVN: r111341
2006-02-18re PR target/9703 ([arm] Accessing data through constant pool more times ↵Richard Sandiford1-3/+0
could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-13Index: gcc/ChangeLogGeoffrey Keating1-137/+112
2006-02-13 Geoffrey Keating <geoffk@apple.com> * dwarf2out.c (base_type_die): Don't add AT_name here. (subrange_type_die): Don't add AT_name here. (modified_type_die): Rearrange code flow. Do add AT_name here. Index: gcc/testsuite/ChangeLog 2006-02-13 Geoffrey Keating <geoffk@apple.com> * objc.dg/dwarf-1.m: New. From-SVN: r110925