summaryrefslogtreecommitdiff
path: root/gcc/final.c
Commit message (Collapse)AuthorAgeFilesLines
* 2011-12-13 Tristan Gingold <gingold@adacore.com>gingold2011-12-131-1/+2
| | | | | | | | | * final.c (final_scan_insn): Guard the call to begin_epilogue debug hook. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182282 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-11-17 Steve Ellcey <sje@cup.hp.com>sje2011-11-171-28/+1
| | | | | | | | | | PR middle-end/51144 * output.h (fprint_w): Remove. * final.c (fprint_w): Remove. (output_addr_const): Change fprint_w back to fprintf. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181457 138bc75d-0d04-0410-961f-82ee72b054a4
* * final.c, output.h (fprint_whex, fprint_w, fprint_ul, sprint_ul):jason2011-11-111-1/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New functions serving as fast replacements for fprintf() integer to string conversions. They were used in the following changes. * final.c (sprint_ul_rev): Internal helper for the above. (output_addr_const): case CONST_INT: don't use fprintf(). * elfos.h (ASM_GENERATE_INTERNAL_LABEL): Don't use sprintf("%u"), use sprint_ul() and stpcpy() which are much faster. (TARGET_ASM_INTERNAL_LABEL): Define as default_elf_internal_label. (ELF_ASCII_ESCAPES, ELF_STRING_LIMIT): Are the old ESCAPES and STRING_LIMIT macros. (ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII): Macros now just call respective functions that provide the same functionality. Those are default_elf_asm_output_limited_string() and default_elf_asm_output_ascii() in varasm.c. * varasm.c: Fixed some whitespace inconsistencies. (default_elf_asm_output_limited_string) (default_elf_asm_output_ascii): The above macros from elfos.h are implemented here as these functions, avoiding superfluous calls to fprintf(). (default_elf_internal_label): Hook for targetm.asm_out.internal_label and ASM_OUTPUT_DEBUG_LABEL. * i386.c: Don't call fprintf("%u") but fprint_ul() instead. * defaults.h (ASM_OUTPUT_LABEL, ASM_OUTPUT_INTERNAL_LABEL): Expanded the macros on multiple lines for readability. (ASM_OUTPUT_LABELREF): Have two calls to fputs() instead of one to asm_fprintf(). * dwarf2asm.c (dw2_assemble_integer, dw2_asm_output_data) (dw2_asm_data_uleb128, dw2_asm_delta_uleb128) (dw2_asm_delta_sleb128): Convert fprintf() calls to the new faster functions. * dwarf2out.c (dwarf2out_source_line): Convert fprintf() calls to the new faster functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181279 138bc75d-0d04-0410-961f-82ee72b054a4
* PR tree-optimization/50693jakub2011-11-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | * tree-cfg.c (gimple_can_merge_blocks_p): Allow merging with non-forced user labels. (gimple_merge_blocks): Turn non-forced user labels into debug bind stmt with the label as first operand and reset value. (gimple_duplicate_bb): Don't duplicate label debug stmts. * dwarf2out.c (gen_label_die): Handle NOTE_INSN_DELETED_DEBUG_LABEL. * final.c (final_scan_insn): Likewise. (rest_of_clean_state): Don't dump NOTE_INSN_DELETED_DEBUG_LABEL. * var-tracking.c (debug_label_num): New variable. (delete_debug_insns): Don't delete DEBUG_INSNs for LABEL_DECLs, instead turn them into NOTE_INSN_DELETED_DEBUG_LABEL notes. * cfglayout.c (skip_insns_after_block, duplicate_insn_chain): Handle NOTE_INSN_DELETED_DEBUG_LABEL. (duplicate_insn_chain): Don't duplicate LABEL_DECL DEBUG_INSNs. * insn-notes.def (DELETED_DEBUG_LABEL): New note kind. * print-rtl.c (print_rtx): Handle NOTE_INSN_DELETED_DEBUG_LABEL. * gengtype.c (adjust_field_rtx_def): Likewise. * config/i386/i386.c (ix86_output_function_epilogue): For MachO clear CODE_LABEL_NUMBER of NOTE_INSN_DELETED_DEBUG_LABEL if their are at the end of function and nop hasn't been emitted. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181014 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-09-21 Tom de Vries <tom@codesourcery.com>vries2011-09-211-1/+1
| | | | | | | * final.c (final): Handle if JUMP_LABEL is not LABEL_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179034 138bc75d-0d04-0410-961f-82ee72b054a4
* * doc/rtl.texi (simple_return): Document.bernds2011-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (parallel, PATTERN): Here too. * doc/md.texi (return): Mention it's allowed to expand to simple_return in some cases. (simple_return): Document standard pattern. * gengenrtl.c (special_rtx): SIMPLE_RETURN is special. * final.c (final_scan_insn): Use ANY_RETURN_P on body. * reorg.c (function_return_label, function_simple_return_label): New static variables, replacing... (end_of_function_label): ... this. (simplejump_or_return_p): New static function. (optimize_skip, steal_delay_list_from_fallthrough, fill_slots_from_thread): Use it. (relax_delay_slots): Likewise. Use ANY_RETURN_P on body. (rare_destination, follow_jumps): Use ANY_RETURN_P on body. (find_end_label): Take a new arg which is one of the two return rtxs. Depending on which, set either function_return_label or function_simple_return_label. All callers changed. (make_return_insns): Make both kinds. (dbr_schedule): Adjust for two kinds of end labels. * function.c (emit_return_into_block): Set JUMP_LABEL properly. * genemit.c (gen_exp): Handle SIMPLE_RETURN. (gen_expand, gen_split): Use ANY_RETURN_P. * df-scan.c (df_uses_record): Handle SIMPLE_RETURN. * rtl.def (SIMPLE_RETURN): New code. * ifcvt.c (find_if_case_1): Be more careful about redirecting jumps to the EXIT_BLOCK. * jump.c (condjump_p, condjump_in_parallel_p, any_condjump_p, returnjump_p_1): Handle SIMPLE_RETURNs. * print-rtl.c (print_rtx): Likewise. * rtl.c (copy_rtx): Likewise. * bt-load.c (compute_defs_uses_and_gen): Use ANY_RETURN_P. * combine.c (simplify_set): Likewise. * resource.c (find_dead_or_set_registers, mark_set_resources): Likewise. * emit-rtl.c (verify_rtx_sharing, classify_insn, copy_insn_1, copy_rtx_if_shared_1, mark_used_flags): Handle SIMPLE_RETURNs. (init_emit_regs): Initialize simple_return_rtx. * cfglayout.c (fixup_reorder_chain): Pass a JUMP_LABEL to force_nonfallthru_and_redirect. * rtl.h (ANY_RETURN_P): Allow SIMPLE_RETURN. (GR_SIMPLE_RETURN): New enum value. (simple_return_rtx): New macro. * basic-block.h (force_nonfallthru_and_redirect): Adjust declaration. * cfgrtl.c (force_nonfallthru_and_redirect): Take a new jump_label argument. All callers changed. Be careful about what kinds of returnjumps to generate. * config/i386/3i86.c (ix86_pad_returns, ix86_count_insn_bb, ix86_pad_short_function): Likewise. * config/arm/arm.c (arm_final_prescan_insn): Handle both kinds of return. * config/mips/mips.md (any_return): New code_iterator. (optab): Add cases for return and simple_return. (return): Expand to a simple_return. (simple_return): New pattern. (*<optab>, *<optab>_internal for any_return): New patterns. (return_internal): Remove. * config/mips/mips.c (mips_expand_epilogue): Make the last insn a simple_return_internal. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178135 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/jules2011-08-011-2/+1
| | | | | | | | | * final.c (output_addr_const): Print fixed-point constants as decimal not hex. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177017 138bc75d-0d04-0410-961f-82ee72b054a4
* * insn-notes.def (NOTE_INSN_CFA_RESTORE_STATE): Remove.rth2011-07-261-5/+1
| | | | | | | * final.c (final_scan_insn): Don't test for it. (rest_of_clean_state): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176779 138bc75d-0d04-0410-961f-82ee72b054a4
* Move ASM_COMMENT_START to defaults.h.rth2011-07-091-5/+0
| | | | | | | | | | | | Note the extreme silliness in dwarf2out.c with 3 (three) copies. * defaults.h (ASM_COMMENT_START): Move here... * dwarf2asm.c: ... from here. * dwarf2out.c, final.c, vmsdbgout.c: Remove duplicates. * toplev.c: Remove ifndef tests of ASM_COMMENT_START. * varasm.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176093 138bc75d-0d04-0410-961f-82ee72b054a4
* dwarf2: Extract cfi creation to a new pass.rth2011-07-081-10/+0
| | | | | | | | | | | | | | | | | | | | | | | * tree-pass.h (pass_dwarf2_frame): Declare. * passes.c (init_optimization_passes): Add it. * dwarf2cfi.c (dwarf2out_frame_debug): Make static. (create_cfi_notes): Rename from dwarf2out_frame_debug_after_prologue; make static, do not call add_cfis_to_fde. (dwarf2out_frame_debug_init, dwarf2cfi_function_init, dwarf2out_frame_init): Merge into... (execute_dwarf2_frame): ... here. New function. (dwarf2out_do_frame, dwarf2out_do_cfi_asm): Make boolean. Change saved_do_cfi_asm to a tri-state variable. (gate_dwarf2_frame, pass_dwarf2_frame): New. * dwarf2out.c (dwarf2out_begin_prologue): Only allocate the fde if it has yet to be done. Don't call dwarf2cfi_function_init. * dwarf2out.h, debug.h: Update decls. * final.c (final_start_function): Don't call dwarf2out_frame_debug_init or dwarf2out_frame_debug_after_prologue. * lto-streamer-in.c (lto_init_eh): Don't call dwarf2out_frame_init. * toplev.c (lang_dependent_init): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176019 138bc75d-0d04-0410-961f-82ee72b054a4
* dwarf2out: Emit NOTE_INSN_CFI_* both with and without cfi-asm.rth2011-07-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is essentially Bernd's 006-cfilabel patch, updated for all the other changes to dwarf2out. The patch reduces the difference between the cfi-asm and non-cfi-asm code paths. We now emit the CFI notes in all cases. Later, after we're done producing the CFI insns we need, another pass over the rtl adds the necessary labels and set_loc/advance_loc CFIs. One consequence of this is that def_cfa_1 can no longer use lookup_cfa, so it just compares to an old_cfa variable instead. The major change since Bernd's patch is that all the target-specific changes are no longer necessary. * dwarf2cfi.c (add_cfi): Remove. (dwarf2out_cfi_label): Remove force argument. Only generate the label name. (add_fde_cfi): Simplify the different code paths. (add_cie_cfi): New. (old_cfa, old_cfa_remember): New. (def_cfa_1, reg_save): Remove label, add for_cie parameter. (last_reg_save_label): Remove. (dwarf2out_args_size, dwarf2out_stack_adjust, queue_reg_save, dwarf2out_frame_debug_def_cfa, dwarf2out_frame_debug_adjust_cfa, dwarf2out_frame_debug_cfa_offset, dwarf2out_frame_debug_cfa_register, dwarf2out_frame_debug_cfa_expression, dwarf2out_frame_debug_cfa_restore, dwarf2out_frame_debug_cfa_window_save, dwarf2out_frame_debug_expr): Remove label parameter. (cfi_label_required_p, add_cfis_to_fde): New. (dwarf2out_frame_debug_after_prologue): New. (dwarf2cfi_frame_init): Initialize old_cfa. (dwarf2out_frame_debug_restore_state): Likewise. * dwarf2out.c (dwarf2out_emit_cfi): Only do output for cfi_asm. (dwarf2out_switch_text_section): Don't clear dw_fde_current_label here. * final.c (final_start_function): Call dwarf2out_frame_debug_after_prologue. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176017 138bc75d-0d04-0410-961f-82ee72b054a4
* dwarf2out: Move insn scanning out of final.c.rth2011-07-071-34/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is essentially Bernd's 005-scanfirst patch, updated for the introduction of the dwarf2cfi.c file. We introduce NOTE_INSN_CFI and NOTE_INSN_CFI_LABEL to hold the dwarf2 info during the bulk of final. The actual construction of these notes still happens during final, right at the very beginning of the pass, via the dwarf2out_frame_debug_init hook. * dwarf2cfi.c (cfi_insn): New. (dwarf2out_cfi_label): Don't emit cfi label here. (add_fde_cfi): Create a NOTE_INSN_CFI. (dwarf2out_frame_debug): Setup cfi_insn. (dwarf2out_frame_debug_init): Loop over insns creating CFI notes. (dwarf2out_cfi_begin_epilogue): Make static. (dwarf2out_frame_debug_restore_state): Make static. * dwarf2out.c (output_cfi_directive): Make static. (dwarf2out_emit_cfi): New. * dwarf2out.h: Update. * final.c (final): Remove CFI notes. (final_scan_insn): Don't call dwarf2out_cfi_begin_epilogue, dwarf2out_frame_debug_restore_state, dwarf2out_frame_debug. Handle NOTE_INSN_CFI and NOTE_INSN_CFI_LABEL. * insn-notes.def (NOTE_INSN_CFI): New. (NOTE_INSN_CFI_LABEL): New. * rtl.h (union rtunion_def): Add rt_cfi member. (XCFI, XCCFI, NOTE_CFI, NOTE_LABEL_NUMBER): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176016 138bc75d-0d04-0410-961f-82ee72b054a4
* dwarf2out: Add REG_CFA_FLUSH_QUEUE.rth2011-06-301-1/+3
| | | | | | | | | * reg-notes.def (REG_CFA_FLUSH_QUEUE): New. * dwarf2out.c (dwarf2out_frame_debug): Handle it. * final.c (final_scan_insn): Look for it, and invoke dwarf2out_frame_debug before the insn if found. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175729 138bc75d-0d04-0410-961f-82ee72b054a4
* dumping cleanup phase 1 -- Removing TODO_dump_funcdavidxl2011-06-141-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175051 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-pretty-print.c (dump_function_header): Add flags.aoliva2011-06-061-1/+2
| | | | | | | | | | Don't dump decl_uid with nouid. * tree-pretty-print.h (dump_function_header): Adjust. * final.c (rest_of_clean_state): Pass dump_flags on, with nouid. * passes.c (pass_init_dump_file): Pass dump_flags on. * tree-cfg.c (gimple_dump_cfg): Pass flags on. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174698 138bc75d-0d04-0410-961f-82ee72b054a4
* Better function header dumpdavidxl2011-06-011-14/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174536 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/48597jakub2011-04-281-0/+5
| | | | | | | | * final.c (final_scan_insn): Call dwarf2out_frame_debug even for inline asm. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173120 138bc75d-0d04-0410-961f-82ee72b054a4
* use ASM_COMMENT_START instead of #davidxl2011-04-181-3/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172682 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-11 Martin Jambor <mjambor@suse.cz>jamborm2011-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * except.c (set_nothrow_function_flags): Call cgraph_get_node instead of cgraph_node. * final.c (rest_of_clean_state): Likewise. * gimple-iterator.c (update_call_edge_frequencies): Likewise. * passes.c (pass_init_dump_file): Likewise. (execute_all_ipa_transforms): Likewise. (function_called_by_processed_nodes_p): Likewise. * predict.c (maybe_hot_frequency_p): Likewise. (probably_never_executed_bb_p): Likewise. (compute_function_frequency): Likewise. * tree-nested.c (check_for_nested_with_variably_modified): Likewise. (unnest_nesting_tree_1): Likewise. (lower_nested_functions): Likewise. * tree-optimize.c (execute_fixup_cfg): Likewise. (tree_rest_of_compilation): Likewise. * tree-profile.c (gimple_gen_ic_func_profiler): Likewise. * tree-sra.c (ipa_early_sra): Likewise. * tree-ssa-loop-ivopts.c (computation_cost): Likewise. * config/i386/i386.c (ix86_compute_frame_layout): Likewise. * ipa.c (record_cdtor_fn): Likewise. * ipa-inline.c (cgraph_early_inlining): Likewise. (compute_inline_parameters_for_current): Likewise. * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise. * ipa-pure-const.c (local_pure_const): Likewise. * ipa-split.c (split_function): Likewise. (execute_split_functions): Likewise. * cgraphbuild.c (build_cgraph_edges): Likewise. (rebuild_cgraph_edges): Likewise. (cgraph_rebuild_references): Likewise. (remove_cgraph_callee_edges): Likewise. * cgraphunit.c (cgraph_mark_if_needed): Likewise. (verify_cgraph_node): Likewise. (cgraph_analyze_functions): Likewise. (cgraph_preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (save_inline_function_body): Likewise. * tree-inline.c (copy_bb): Likewise. (optimize_inline_calls): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172257 138bc75d-0d04-0410-961f-82ee72b054a4
* -dA enhancementdavidxl2011-04-081-4/+77
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172212 138bc75d-0d04-0410-961f-82ee72b054a4
* * debug.h (debug_flush_symbol_queue, debug_queue_symbol): Delete.froydnj2011-04-051-81/+0
| | | | | | | | | | | | (debug_free_queue, debug_nesting, symbol_queue_index): Delete. * final.c (debug_flush_symbol_queue, debug_queue_symbol): Move these... (debug_free_queue, debug_nesting, symbol_queue_index): ...and these... * dbxout.c: ...to here. Make static. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171981 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.h (dwarf2out_frame_debug_init): Declare.bernds2011-04-011-1/+1
| | | | | | | | | | | | * dwarf2out.c (dwarf2out_frame_debug_init): New function, broken out of ... (dwarf2out_frame_debug): ... here. Don't handle a NULL argument. * final.c (final_start_function): Call the new function rather than using a NULL argument for dwarf2out_frame_debug. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171839 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (try_split): Don't call copy_call_info debug hook.jakub2011-03-161-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * calls.c: Remove debug.h include. (emit_call_1): Don't call virtual_call_token debug hook. * dwarf2out.c (debug_dcall_section, debug_vcall_section, dcall_entry, vcall_entry, dcall_table, vcall_table, vcall_insn, vcall_insn_table, DEBUG_DCALL_SECTION, DEBUG_VCALL_SECTION, size_of_dcall_table, output_dcall_table, size_of_vcall_table, output_vcall_table, dwarf2out_direct_call, vcall_insn_table_hash, vcall_insn_table_eq, store_vcall_insn, lookup_vcall_insn, dwarf2out_virtual_call_token, dwarf2out_copy_call_info, dwarf2out_virtual_call): Remove. (dwarf2_debug_hooks): Remove direct_call, virtual_call_token, copy_call_info and virtual_call hooks. (dwarf2out_init): Don't initialize vcall_insn_table, debug_dcall_section and debug_vcall_section. (prune_unused_types): Don't mark nodes from dcall_table. (dwarf2out_finish): Don't output dcall or vcall tables. * final.c (final_scan_insn): Don't call direct_call or virtual_call debug hooks. * debug.h (struct gcc_debug_hooks): Remove direct_call, virtual_call_token, copy_call_info and virtual_call hooks. (debug_nothing_uid): Remove prototype. * sdbout.c (sdb_debug_hooks): Remove direct_call, virtual_call_token, copy_call_info and virtual_call hooks. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise. * debug.c (do_nothing_debug_hooks): Likewise. (debug_nothing_uid): Remove. * doc/invoke.texi (-fenable-icf-debug): Remove. * common.opt (-fenable-icf-debug): Likewise. * g++.dg/debug/dwarf2/icf.C: Adjust for -fenable-icf-debug removal. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171037 138bc75d-0d04-0410-961f-82ee72b054a4
* * final.c (final_scan_insn): Handle NOTE_INSN_CALL_ARG_LOCATION.jakub2011-03-161-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call var_location debug hook even on CALL_INSNs. (rest_of_clean_state): Don't print NOTE_INSN_CALL_ARG_LOCATION. * rtl.def (ENTRY_VALUE): New. * dwarf2out.c: Include cfglayout.h. (dwarf_stack_op_name, size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_GNU_entry_value. (struct call_arg_loc_node): New type. (call_arg_locations, call_arg_loc_last, block_map, call_site_count, tail_call_site_count): New variables. (dwarf_tag_name): Handle DW_TAG_GNU_call_site and DW_TAG_GNU_call_site_parameter. (dwarf_attr_name): Handle DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered, DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites, DW_AT_GNU_all_call_sites and DW_AT_GNU_all_source_call_sites. (mem_loc_descriptor): Handle ENTRY_VALUE. (add_src_coords_attributes): Don't add enything if DECL_SOURCE_LOCATION is UNKNOWN_LOCATION. (dwarf2out_abstract_function): Save and clear call_arg_location, call_site_count and tail_call_site_count around dwarf2out_decl call. (gen_call_site_die): New function. (gen_subprogram_die): Emit DW_TAG_GNU_call_site DIEs for call sites. (gen_lexical_block_die, gen_inlined_subroutine_die): Update block_map. (dwarf2out_function_decl): Clear call_arg_locations, call_arg_loc_last, set call_site_count and tail_call_site_count to -1 and free block_map. (dwarf2out_var_location): Handle NOTE_INSN_CALL_ARG_LOCATION and CALL_INSNs. Add NOTE_DURING_CALL_P var location notes even when not followed by any real instructions. (dwarf2out_begin_function): Set call_site_count and tail_call_site_count to 0. (resolve_addr): If DW_AT_abstract_origin of DW_TAG_GNU_call_site is dw_val_class_addr, attempt to look it up again, for DECL_EXTERNAL attempt to force a DIE for it and worst case remove the attribute. (resolve_one_addr): For TREE_CONSTANT_POOL_ADDRESS_P SYMBOL_REFs check TREE_ASM_WRITTEN of DECL_INITIAL of the decl instead of the decl itself. * var-tracking.c: Include tm_p.h. (vt_stack_adjustments): For calls call note_register_arguments. (argument_reg_set): New variable. (add_stores): For MO_VAL_SET of non-tracked regs from argument_reg_set ensure the VALUE is resolved. (call_arguments): New variable. (prepare_call_arguments): New function. (add_with_sets): For MO_CALL set u.loc from call_arguments and clear it. (struct expand_loc_callback_data): Add ignore_cur_loc field. (vt_expand_loc_callback): If ignore_cur_loc, don't look at cur_loc and always use the best expression. (vt_expand_loc): Add ignore_cur_loc argument. (vt_expand_loc_dummy): Clear ignore_cur_loc field. (emit_note_insn_var_location): Adjust vt_expand_loc callers. (emit_notes_in_bb) <case MO_CALL>: Add NOTE_INSN_CALL_ARG_LOCATION note for all calls. (vt_add_function_parameter): Use cselib_lookup_from_insn. If dv is a VALUE, enter into hash table also ENTRY_VALUE for the argument. Don't call cselib_preserve_only_values and cselib_reset_table. (note_register_arguments): New function. (vt_initialize): Compute argument_reg_set. Call vt_add_function_parameters before processing basic blocks instead of afterwards. For calls call prepare_call_arguments before calling cselib_process_insn. * print-rtl.c (print_rtx): Handle NOTE_INSN_CALL_ARG_LOCATION. * Makefile.in (dwarf2out.o): Depend on $(CFGLAYOUT_H). (var-tracking.o): Depend on $(TM_P_H). * cfglayout.h (insn_scope): New prototype. * gengtype.c (adjust_field_rtx_def): Handle NOTE_INSN_CALL_ARG_LOCATION. * cfglayout.c (insn_scope): No longer static. * insn-notes.def (CALL_ARG_LOCATION): New. * calls.c (expand_call, emit_library_call_value_1): Put USEs for MEM arguments into CALL_INSN_FUNCTION_USAGE unconditionally. * integrate.c (set_block_origin_self, set_block_abstract_flags): Do nothing for DECL_EXTERNAL BLOCK_VARS. cp/ * cp-objcp-common.c (cp_function_decl_explicit_p): Don't crash if DECL_LANG_SPECIFIC is NULL. include/ * dwarf2.h (DW_TAG_GNU_call_site, DW_TAG_GNU_call_site_parameter, DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered, DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites, DW_AT_GNU_all_call_sites,, DW_AT_GNU_all_source_call_sites, DW_OP_GNU_entry_value): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171033 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-02-28 Kai Tietz <kai.tietz@onevision.com>ktietz2011-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | PR debug/28047 * dwarf2out.c (file_table_eq): Use filename_cmp instead of strcmp. (lookup_filename): Likewise. * final.c (remap_debug_filename): Use filename_ncmp instead of strncmp. 2011-02-28 Kai Tietz <kai.tietz@onevision.com> * filename_cmp.c (filename_ncmp): New function. * functions.texi: Regenerated. 2011-02-28 Kai Tietz <kai.tietz@onevision.com> * filenames.h (filename_ncmp): New prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170570 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/ChangeLog:aoliva2011-02-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR debug/47498 PR debug/47501 PR debug/45136 PR debug/45130 * haifa-sched.c (get_ebb_head_tail): Move notes across boundary debug insns. (no_real_insns_p, schedule_block, set_priorities): Drop special treatment of boundary debug insns. * sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug insns. * sched-ebb.c (schedule_ebbs): Adjust skipping of debug insns. * sched-int.h (DEBUG_INSN_SCHED_P): Remove. (BOUNDARY_DEBUG_INSN_P): Likewise. (SCHEDULE_DEBUG_INSN_P): Likewise. * sched-rgn.c (init_ready_list): Drop special treatment of boundary debug insns. * final.c (rest_of_clean_state): Clear notes' BB. gcc/testsuite/ChangeLog: PR debug/47498 PR debug/47501 PR debug/45136 PR debug/45130 * debug/pr47498.c: New. * debug/pr47501.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169513 138bc75d-0d04-0410-961f-82ee72b054a4
* Reverted:aoliva2011-01-311-5/+2
| | | | | | | | | | | | | | | | | | | | | 2011-01-25 Alexandre Oliva <aoliva@redhat.com> PR debug/45136 PR debug/45130 * haifa-sched.c (get_ebb_head_tail): Move notes across boundary debug insns. (no_real_insns_p, schedule_block, set_priorities): Drop special treatment of boundary debug insns. * sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug insns. * sched-ebb.c (schedule_ebbs): Don't skip debug insns. * sched-int.h (DEBUG_INSN_SCHED_P): Remove. (BOUNDARY_DEBUG_INSN_P): Likewise. (SCHEDULE_DEBUG_INSN_P): Likewise. * sched-rgn.c (init_ready_list): Drop special treatment of boundary debug insns. * final.c (rest_of_clean-state): Clear notes' BB. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169429 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/45136aoliva2011-01-251-2/+5
| | | | | | | | | | | | | | | | | | | PR debug/45130 * haifa-sched.c (get_ebb_head_tail): Move notes across boundary debug insns. (no_real_insns_p, schedule_block, set_priorities): Drop special treatment of boundary debug insns. * sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug insns. * sched-ebb.c (schedule_ebbs): Don't skip debug insns. * sched-int.h (DEBUG_INSN_SCHED_P): Remove. (BOUNDARY_DEBUG_INSN_P): Likewise. (SCHEDULE_DEBUG_INSN_P): Likewise. * sched-rgn.c (init_ready_list): Drop special treatment of boundary debug insns. * final.c (rest_of_clean-state): Clear notes' BB. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169260 138bc75d-0d04-0410-961f-82ee72b054a4
* allow the target to label code fragments generated by partitioning.iains2011-01-071-0/+10
| | | | | | | | | | | | | | | | | | | * target.def (function_switched_text_sections): New Hook. * doc/tm.texi Regenerated. * doc/tm.texi.in (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS) New. * final.c (default_function_switched_text_sections): New. (final_scan_insn): Call function_switched_text_sections when a mid-function section change occurs. * output.h (default_function_switched_text_sections): Declare. * config/darwin-protos.h (darwin_function_switched_text_sections) : Likewise. * config/darwin.c (darwin_function_switched_text_sections): New. * config/darwin.h (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS) New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168571 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (main_input_filename, main_input_basename,jsm282010-12-011-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | main_input_baselength): New Variable entries. From toplev.c. * final.c (output_quoted_string): Move from toplev.c. * output.h (output_quoted_string): Move from toplev.h. * opts-global.c (read_cmdline_options): Use gcc_options pointer to access main_input_filename, main_input_baselength and main_input_basename. * targhooks.c: Include intl.h and opts.h. (option_affects_pch_p, default_get_pch_validity): Move from toplev.c. * targhooks.h (option_affects_pch_p, default_get_pch_validity): Move from toplev.h. * toplev.c (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (output_quoted_string): Move to final.c. (warn_deprecated_use): Move to tree.c. (option_affects_pch_p, default_get_pch_validity, pch_option_mismatch, default_pch_valid_p): Move to targhooks.c. * toplev.h (skip_leading_substring): Move to tree-dump.c. (warn_deprecated_use): Move to tree.h. (output_quoted_string): Move to output.h. (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (default_get_pch_validity, default_pch_valid_p): Move to targhooks.c. * tree-dump.c (skip_leading_substring): Move from toplev.h. * tree.c (warn_deprecated_use): Move from toplev.c. * tree.h (warn_deprecated_use): Move from toplev.h. * c-typeck.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/cris/cris.c, config/crx/crx.c, config/fr30/fr30.c, config/frv/frv.c, config/h8300/h8300.c, config/ia64/ia64.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mep/mep.c, config/microblaze/microblaze.c, config/mips/mips.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/pa/pa.c, config/pdp11/pdp11.c, config/picochip/picochip.c, config/s390/s390.c, config/score/score.c, config/sh/sh.c, config/sparc/sparc.c, config/spu/spu.c, config/stormy16/stormy16.c, config/v850/v850.c, config/vax/vax.c, config/xtensa/xtensa.c, gimple-low.c, graphite-sese-to-poly.c, plugin.c, tree-cfg.c, tree-inline.c, varasm.c, xcoffout.c: Don't include toplev.h. * Makefile.in (c-typeck.o, tree-inline.o, tree-cfg.o, gimple-low.o, graphite-sese-to-poly.o, targhooks.o, plugin.o, varasm.o, xcoffout.o): Update dependencies. * config/arm/t-arm (arm.o): Update dependencies. * config/spu/t-spu-elf (spu.o): Update dependencies. cp: * cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h. * Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o): Update dependencies. java: * jcf-parse.c: Don't include toplev.h. * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167329 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/44769amylaar2010-11-121-2/+3
| | | | | | | | * final.c (split_double): Don't use BITS_PER_WORD directly in shift count. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166662 138bc75d-0d04-0410-961f-82ee72b054a4
* * final.c (compute_alignments): Compute/free loop info all the time.pthaugen2010-11-041-6/+3
| | | | | | | | | | | | | | | | | | * config/rs6000/rs6000.h (LOOP_ALIGN): Define. * config/rs6000/rs6000-protos.h (rs6000_loop_align): Declare. * config/rs6000/t-rs6000 (rs6000.o): Add cfgloop.h. * config/rs6000/rs6000.c (cfgloop.h): Include. (can_override_loop_align): New. (rs6000_option_override_internal): Set it. (TARGET_ASM_LOOP_ALIGN_MAX_SKIP): Define target hook. (rs6000_loop_align): New function. (rs6000_loop_align_max_skip): Likewise. * gcc.target/powerpc/loop_align.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166329 138bc75d-0d04-0410-961f-82ee72b054a4
* * doc/tm.texi.in (TARGET_ASM_JUMP_ALIGN_MAX_SKIP): New.dj2010-10-191-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Change to hook. (TARGET_ASM_LOOP_ALIGN_MAX_SKIP): Likewise. (TARGET_ASM_LABEL_ALIGN_MAX_SKIP): Likewise. * doc/tm.texi: Regenerate. * targhooks.h (default_label_align_after_barrier_max_skip, default_loop_align_max_skip, default_label_align_max_skip, default_jump_align_max_skip): Declare. * target.def (label_align_after_barrier_max_skip): New. (loop_align_max_skip): New. (label_align_max_skip): New. (jump_align_max_skip): New. * system.h (poison): Add those macros to the list. * final.c (LABEL_ALIGN_MAX_SKIP): Remove. (LOOP_ALIGN_MAX_SKIP): Remove. (LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Remove. (JUMP_ALIGN_MAX_SKIP): Remove. (default_label_align_after_barrier_max_skip): New. (default_loop_align_max_skip): New. (default_label_align_max_skip): New. (default_jump_align_max_skip): New. (compute_alignments): Use the new hooks. (shorten_branches): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165707 138bc75d-0d04-0410-961f-82ee72b054a4
* * opt-functions.awk (static_var): Update comment.jsm282010-09-301-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (var_ref): Return offsetof expression or -1, not variable address. * optc-gen.awk: Generate structure field initializers instead of static variables. Expect -1 for missing variables instead of null pointer. Add gcc_options parameters to generated functions. * opth-gen.awk: Generate structure fields for static variables. Add gcc_options parameters to generated functions. * common.opt (optimize, optimize_size): Add variables. * config/i386/i386-c.c (ix86_pragma_target_parse): Pass &global_options to cl_target_option_restore. * config/i386/i386.c (ix86_valid_target_attribute_p): Pass &global_options to cl_optimization_restore, cl_target_option_save and cl_target_option_restore. (ix86_set_current_function): Pass &global_options to cl_target_option_restore. * config/pdp11/pdp11.h (optimize): Remove. * config/rs6000/rs6000.h (optimize): Remove. * config/sh/sh.h (optimize): Remove. * config/xtensa/xtensa.h (optimize): Remove. * coretypes.h (struct gcc_options): Declare. * diagnostic.c (diagnostic_initialize): Initialize context->option_state. (diagnostic_report_diagnostic): Pass option_state to option_enabled hook. * diagnostic.h (diagnostic_context.option_enabled): Add void * parameter. (diagnostic_context.option_state): New field. * final.c (final_start_function, final, final_scan_insn): Rename optimize parameter to optimize_p. * flags.h (optimize, optimize_size): Remove. * function.c (invoke_set_current_function_hook): Pass &global_options to cl_optimization_restore. * gcc.c (driver_handle_option): Take gcc_options parameter. Assert that it is &global_options. (process_command): Pass &global_options to read_cmdline_option. * ipa-pure-const.c (suggest_attribute): Pass &global_options to option_enabled. * lto-opts.c (lto_reissue_options): Use option_flag_var. Pass &global_options to set_option. * opts-common.c (handle_option, handle_generated_option, read_cmdline_option, set_option): Take explicit gcc_options parameters. Use option_flag_var. (option_flag_var): New. * opts.c (common_handle_option, lang_handle_option, target_handle_option): Take gcc_options parameter. Assert that it is &global_options. (read_cmdline_options): Pass &global_options to read_cmdline_option. (print_filtered_help): Use option_flag_var. Pass &global_options to option_enabled. (common_handle_option): Use option_flag_var. (option_enabled): Take opts parameter. Use option_flag_var. (get_option_state): Take gcc_options parameter. Use option_flag_var. Pass gcc_options parameter to option_enabled. (enable_warning_as_error): Pass &global_options to handle_generated_option. * opts.h (struct cl_option): Change flag_var to flag_var_offset. (cl_option_handler_func.handler): Take gcc_options parameter. (option_enabled, get_option_state, set_option, handle_option, handle_generated_option, read_cmdline_option): Take gcc_options parameters. * toplev.c (optimize, optimize_size): Remove. (print_switch_values): Pass &global_options to option_enabled. (option_affects_pch_p): Use option_flag_var. Pass &global_options to get_option_state. (general_init): Initialize global_dc->option_state. * tree.c (build_optimization_node): Pass &global_options to cl_optimization_save. (build_target_option_node): Pass &global_options to cl_target_option_save. c-family: * c-common.c (handle_optimize_attribute): Pass &global_options to cl_optimization_save and cl_optimization_restore. * c-opts.c (c_common_handle_option): Pass &global_options to handle_generated_option. * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var. (handle_pragma_pop_options, handle_pragma_reset_options): Pass &global_options to cl_optimization_restore. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164751 138bc75d-0d04-0410-961f-82ee72b054a4
* Hookize TARGET_UNWIND_INFO et al.rth2010-09-281-22/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164701 138bc75d-0d04-0410-961f-82ee72b054a4
* * lto-symtab.c (lto_symtab_entry_def): Add guessed field.hubicka2010-09-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (lto_symtab_resolve_symbols): Set it. (lto_symtab_merge_decls_1): Do not compute used_from_object_file; store resolution field in cgraph/varpool. * cgraph.c (cgraph_same_body_alias, cgraph_add_thunk): Return node. (cgraph_get_node_or_alias, cgraph_get_node_or_alias): Constify. (cgraph_dump_node): Drop used_from_object_file. (cgraph_clone_node, cgraph_create_virtual_clone): Likewise. (cgraph_function_body_availability): Use decl_replaceable_p. (cgraph_make_node_local): Set resolution to LDPR_PREVAILING_DEF_IRONLY. (cgraph_can_remove_if_no_direct_calls_and_refs): Use cgraph_used_from_object_file_p. (cgraph_will_be_removed_from_program_if_no_direct_calls): Use cgraph_used_from_object_file_p. (resolution_used_from_other_file_p): New functoin. (cgraph_used_from_object_file_p): New predicate. * cgraph.h: Include plugin-api.h (struct cgraph_local_info): Remove used_from_object_file. (struct cgraph_node): Add resolution field. (struct varpool_node): Likewise; remove used_from_object_file; reove const_value_known. (cgraph_get_node, cgraph_get_node_or_alias, cgraph_node, cgraph_same_body_alias, cgraph_add_thunk): Update prototypes. (resolution_used_from_other_file_p, cgraph_used_from_object_file_p, varpool_used_from_object_file_p): Declare. (varpool_get_node, varpool_extra_name_alias): Update prototype. * tree.h (DECL_REPLACEABLE_P): Remove. (decl_replaceable_p, decl_binds_to_current_def_p): Declare. * final.c (rest_of_clean_state): Use decl_binds_to_current_def_p. * lto-cgraph.c (lto_output_node, lto_output_varpool_node, input_overwrite_node, input_node, input_varpool_node): Stream resolution. * expr.c (expand_expr_real_1): Use const_value_known_p * ipa.c (ipa_discover_readonly_nonaddressable_var): Do not set const_value_known. (cgraph_externally_visible_p): Use cgraph_used_from_object_file_p. (function_and_variable_visibility): Set resolution for local vars and functions. use varpool_used_from_object_file_p. * varasm.c (resolution_to_local_definition_p, resolution_local_p): New static functions. (default_binds_local_p_1): Use resolutoin info. (decl_binds_to_current_def_p, decl_replaceable_p): New functions. * varpool.c (varpool_get_node): Constify. (const_value_known_p): Do not use vnode->const_value_known; use decl_replaceable_p. (varpool_finalize_decl): Do not set const_value_known. (cgraph_variable_initializer_availability): Use decl_replaceable_p (varpool_extra_name_alias): Return new node. (varpool_used_from_object_file_p): New function. * decl.c (finish_function): Use decl_replaceable_p * method.c (make_alias_for_thunk): Update call of cgraph_same_body_alias. * lto.c (lto_promote_cross_file_statics): Use const_value_known_p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164610 138bc75d-0d04-0410-961f-82ee72b054a4
* Always do output_function_exception_table before assemble_end_function.rth2010-09-071-9/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163974 138bc75d-0d04-0410-961f-82ee72b054a4
* Define target hook TARGET_UNWIND_EMIT_BEFORE_INSN.rth2010-09-071-1/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163961 138bc75d-0d04-0410-961f-82ee72b054a4
* * target.def (output_addr_const_extra): New hook.aesok2010-08-111-5/+2
| | | | | | | | | | | | | | | | | | * doc/tm.texi.in (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Document. * doc/tm.texi: Regenerate. * targhooks.c (default_asm_output_addr_const_extra): New function. * targhooks.h (default_asm_output_addr_const_extra): Declare. * final.c: (output_addr_const): Use TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA target hook. * config/i386/i386.h (OUTPUT_ADDR_CONST_EXTRA): Remove. * config/i386/i386-protos.h (output_addr_const_extra): Remove. * config/i386/i386.h (output_addr_const_extra): Rename to... (i386_asm_output_addr_const_extra): ...this. Make static. (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163104 138bc75d-0d04-0410-961f-82ee72b054a4
* * final.c (final_scan_insn): Call CC_STATUS_INIT unconditionally.bernds2010-08-021-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * config/arm/arm.c (thumb1_code): New variable. (arm_override_options): Set it. (thumb1_final_prescan_insn): Keep track of condition code status. (arm_adjust_cost): For Thumb, try to keep cc-setting insns next to jumps that depend on them. * config/arm/arm.h (thumb1_code): Declare variable. (struct machine_function): Guard with #ifndef GENERATOR_FILE. Add members thumb1_cc_insn, thumb1_cc_op0, thumb1_cc_op1 and thumb1_cc_mode. (CC_STATUS_INIT): New macro. * config/arm/constraints.md (Pd): New constraint. * config/arm/predicates.md (noov_comparison_operator): New predicate. * config/arm/arm.md (is_thumb1): New define_attr. (conds): Set default to "clob" when generating Thumb1 code. (thumb1_bicsi3): Renamed from bicsi3. All uses changed. Condition code are set. Use two-operand assembly syntax. (thumb1_subsi3_insn): Condition codes are set. Now a properly named pattern. (thumb1_andsi3_insn, thumb1_iorsi3_insn, thumb1_xorsi3_insn): Condition codes are set. Use two-operand assembly syntax. (zero_extendhisi splitter): Remove constraints. (thumb1_movsi_insn, thumb1_movhi_insn, thumb1_movqi_insn, thumb1_movhf, thumb1_movsf_insn): Set conds attribute as appropriate. (cbranchsi4_insn): Use condition code status from struct machine_function to determine whether the comparison can be eliminated. Discourage the alternative using high registers. (movsi_cbranchsi4, andsi3_cbranch, orrsi3_cbranch_scratch, orrsi3_cbranch, xorsi3_cbranch_scratch, xorsi3_cbranch, bicsi3_cbranch_scratch, bicsi3_cbranch, subsi3_cbranch_scratch, subsi3_cbranch): Delete. (movsi_cbranchsi4 peepholes): Rewrite to generate a sequence of one subtract and one cbranch insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162813 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-07-28 Kai Tietz <kai.tietz@onevision.com>ktietz2010-07-281-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * config/i386/i386.h (MCOUNT_NAME_BEFORE_PROLOGUE): New. * config/i386/i386.c (ix86_profile_before_prologue): New. (override_options): Add special handling for -mfentry. (ix86_function_regparm): Likewise. (ix86_function_sseregparm): Likewise. (ix86_frame_pointer_required): Likewise. (ix86_expand_prologue): Check for ms_hook_prologue. (x86_function_profiler): Adjust mcount output. (TARGET_PROFILE_BEFORE_PROLOGUE): Define hook. * config/i386/i386.opt (mfentry): New. * doc/invoke.texi (mfentry): Add documentation. * doc/tm.texi: Regenerated.. * doc/tm.texi.in (TARGET_PROFILE_BEFORE_PROLOGUE): New. * final.c (final_start_function): Replace macro PROFILE_BEFORE_PROLOGUE by target hook. * function.c (thread_prologue_and_epilogue_insns): Likewise. * target.def (profile_before_prologue): New hook. * targhooks.c (default_profile_before_prologue): New. * targhooks.h (default_profile_before_prologue): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162651 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-07-08 Kai Tietz <kai.tietz@onevision.com>ktietz2010-07-081-6/+4
| | | | | | | | | | | | | * final.c (final_scan_insn): Replace TARGET_UNWIND_INFO macro check by unwind_emit hook NULL check. * targhooks.c (default_unwind_emit): Removed. * targhooks.h (default_unwind_emit): Likewise. * target.def (unwind_emit): Set default value to NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161972 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>manu2010-06-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | * toplev.h (_fatal_insn_not_found, _fatal_insn): Move declarations to rtl.h. (error_for_asm, warning_for_asm): Move declarations to rtl-error.h. * rtl.h (_fatal_insn_not_found, _fatal_insn): Move declarations here. * rtl-error.h: New. * regrename.c: Do not include toplev.h. Include rtl-error.h. * rtl-error.c: Likewise. * reload.c: Likewise. * recog.c: Likewise. * sel-sched.c: Likewise. * function.c: Likewise. * reg-stack.c: Likewise. * cfgrtl.c: Likewise. * reload1.c: Likewise. * final.c: Include rtl-error. * Makefile.in: Adjust dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161617 138bc75d-0d04-0410-961f-82ee72b054a4
* This patch adds the end prologue and begin epilogue markers in Dwarf2 rupp2010-06-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that are needed by the VMS debugger on I64. * config/ia64/vms.h (ASM_OUTPUT_DWARF_DELTA_UNITS): Remove. (ASM_OUTPUT_DWARF_VMS_DELTA: Define new macro. * dbxout.c (gcc_debug_hooks): New entry begin_epilogue. * debug.c: Likewise. * sdbout.c: Likewise. * vmsdbgout.c: Likewise. * debug.h: Likewise. (dwarf2out_vms_{begin,end}_prologue): Declare. * doc/tm.texi (ASM_OUTPUT_DWARF_VMS_DELTA): Document. * dwarf2asm.c (dw2_asm_output_vms_delta): New function. (ASM_OUTPUT_DWARF_VMS_DELTA): Call it. * dwarf2asm.h (dw2_asm_output_vms_delta): Declare. * dwarf2out.c (dw_fde_struct): New fields dw_fde_vms_{end,begin}_prologue. (PROLOGUE_END_LABEL, EPILOGUE_BEGIN_LABEL): New macros. (dwarf2out_begin_prologue): Set dw_fde_struct defaults for above. (dwarf2out_vms_end_prologue): New function. (dwarf2out_vms_begin_epilogue): New function. (dw_val_struct): New value dw_val_class_vms_delta. (gcc_debug_hooks): New entry begin_epilogue. Set end_prologue, begin_epilogue for VMS. (AT_vms_delta1, AT_vms_delta2, add_AT_vms_delta): Declare new static functions. (dwarf_attr_name): New cases DW_AT_HP_{prologue,epilogue}. (AT_vms_delta1, AT_vms_delta2, add_AT_vms_delta): New static functions. (print_die): New case dw_val_class_vms_delta. (attr_checksum): Likewise. (same_dw_val_p: Likewise. (size_of_die): Likewise. (value_format): Likewise. (output_die): Likewise. (gen_subprogram_die): Call add_AT_vms_delta on VMS. (dwarf2out_begin_epilogue): Rename to dwarf2out_cfi_begin_epilogue * dwarf2out.h (dwarf2out_begin_epilogue): Rename to dwarf2out_cfi_begin_epilogue * final.c (final_scan_insn): Likewise. Call begin_epilogue. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160858 138bc75d-0d04-0410-961f-82ee72b054a4
* * config/i386/i386-protos.h (ix86_print_operand): Declare.froydnj2010-06-041-2/+1
| | | | | | | | | | * config/i386/i386.c (ix86_print_operand): Make non-static. * config/i386/sol2.h (ASM_OUTPUT_CALL): Call ix86_print_operand. * output.h (output_operand): Declare. * final.c (output_operand): Make non-static. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160286 138bc75d-0d04-0410-961f-82ee72b054a4
* * final.c (output_asm_insn): Callfroydnj2010-06-041-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | targetm.asm_out.print_operand_punct_valid_p. Update comments. (output_operand): Call targetm.asm_out.print_operand. Update comments. (output_address): Call targetm.asm_out.print_operand_address. Update comments. * target.h (struct gcc_target): Add print_operand, print_operand_address, and print_operand_punct_valid_p fields. * targhooks.h (default_print_operand): Declare. (default_print_operand_address): Declare. (default_print_operand_punct_valid_p): Declare. * targhooks.c (default_print_operand): Define. (default_print_operand_address): Define. (default_print_operand_punct_valid_p): Define. * target-def.h (TARGET_PRINT_OPERAND): Define if not defined. (TARGET_PRINT_OPERAND_ADDRESS): Likewise. (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Likewise. (TARGET_ASM_OUT): Add TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS, and TARGET_PRINT_OPERAND_PUNCT_VALID_P. * vmsdbgout.c (addr_const_to_string): Update comment. * config/i386/i386.c (print_operand): Rename to... (ix86_print_operand): ...this. Make static. (print_operand_address): Rename to... (ix86_print_operand_address): ...this. Make static. Call ix86_print_operand instead of PRINT_OPERAND. (ix86_print_operand_punct_valid_p): New function. (TARGET_PRINT_OPERAND): Define. (TARGET_PRINT_OPERAND_ADDRESS): Define. (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define. * config/i386/i386.h (HI_REGISTER_NAMES): Update comment. (PRINT_OPERAND_PUNCT_VALID_P): Delete. (PRINT_OPERAND): Delete. (PRINT_OPERAND_ADDRESS): Delete. * config/i386/i386-protos.h (print_operand): Delete prototype. (print_operand_address): Delete prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160245 138bc75d-0d04-0410-961f-82ee72b054a4
* * final.c (rest_of_clean_state): Use %m in errors instead ofjsm282010-05-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | strerror (errno). * gengtype.c (read_input_list, close_output_files): Use xstrerror instead of strerror. * toplev.c (process_options): Use %m in errors instead of strerror (errno). * tree-dump.c (dump_begin): Use %m in errors instead of strerror (errno). fortran: * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror. * module.c (write_char, gfc_dump_module, gfc_use_module): Use xstrerror instead of strerror. lto: * lto-coff.c (coff_errmsg): Remove. (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in errors instead of coff_errmsg (-1). * lto-macho.c (mach_o_errmsg): Remove. (lto_obj_begin_section, lto_obj_append_data): Use %m in errors instead of mach_o_errmsg (-1). * lto.c (read_cgraph_and_symbols): Use %m in errors instead of xstrerror (errno). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159969 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/ChangeLog:steven2010-05-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree.h: Include real.h and fixed-value.h as basic datatypes. * dfp.c, convert.c, reload1.c, reginfo.c, tree-flow.h, tree-ssa-threadedge.c, tree-ssanames.c, tree-loop-linear.c, tree-into-ssa.c, tree-vect-generic.c, tree-ssa-structalias.c, tree-ssa-loop-im.c, tree-dump.c, tree-complex.c, tree-ssa-uninit.c, genrecog.c, tree-ssa-threadupdate.c, tree-ssa-loop-niter.c, tree-pretty-print.c, tree-loop-distribution.c, tree-ssa-loop-unswitch.c, c-lex.c, optabs.c, postreload-gcse.c, tree-ssa-loop-manip.c, postreload.c, tree-ssa-loop-ch.c, tree-tailcall.c, tree.c, reload.c, tree-scalar-evolution.c, rtlanal.c, tree-phinodes.c, builtins.c, final.c, genoutput.c, fold-const.c, tree-ssa-dse.c, genautomata.c, tree-ssa-uncprop.c, toplev.c, tree-chrec.c, genemit.c, c-cppbuiltin.c, tree-ssa-sccvn.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, mode-switching.c, tree-call-cdce.c, cse.c, genpeep.c, tree-ssa-math-opts.c, tree-ssa-dom.c, tree-nrv.c, tree-ssa-propagate.c, tree-ssa-alias.c, tree-ssa-sink.c, jump.c, ifcvt.c, dwarf2out.c, expr.c, genattrtab.c, genconditions.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop.c, tree-parloops.c, recog.c, tree-ssa-address.c, lcm.c, tree-eh.c, gimple-pretty-print.c, c-pretty-print.c, print-rtl.c, gcse.c, tree-if-conv.c, tree-data-ref.c, tree-affine.c, gimplify.c, tree-ssa-phiopt.c, implicit-zee.c, expmed.c, tree-dfa.c, emit-rtl.c, store-motion.c, cselib.c, tree-cfgcleanup.c, simplify-rtx.c, tree-ssa-pre.c, genpreds.c, tree-mudflap.c, print-tree.c, tree-ssa-copy.c, tree-ssa-forwprop.c, tree-ssa-dce.c, varasm.c, tree-nested.c, tree-ssa.c, tree-ssa-loop-prefetch.c, rtl.c, tree-inline.c, integrate.c, tree-optimize.c, tree-ssa-phiprop.c, fixed-value.c, combine.c, tree-profile.c, c-common.c, sched-vis.c, tree-cfg.c, passes.c, tree-ssa-reassoc.c, config/alpha/alpha.c, config/frv/frv.c, config/s390/s390.c, config/m32c/m32c.c, config/spu/spu.c, config/sparc/sparc.c, config/mep/mep.c, config/m32r/m32r.c, config/rx/rx.c, config/i386/i386.c, config/sh/sh.c, config/pdp11/pdp11.c, config/avr/avr.c, config/crx/crx.c, config/xtensa/xtensa.c, config/stormy16/stormy16.c, config/fr30/fr30.c, config/lm32/lm32.c, config/moxie/moxie.c, config/m68hc11/m68hc11.c, config/cris/cris.c, config/iq2000/iq2000.c, config/mn10300/mn10300.c, config/ia64/ia64.c, config/m68k/m68k.c, config/rs6000/rs6000.c, config/picochip/picochip.c, config/darwin.c, config/arc/arc.c, config/mcore/mcore.c, config/score/score3.c, config/score/score7.c, config/score/score.c, config/arm/arm.c, config/pa/pa.c, config/mips/mips.c, config/vax/vax.c, config/h8300/h8300.c, config/v850/v850.c, config/mmix/mmix.c, config/bfin/bfin.c: Clean up redundant includes. * Makefile.in: Update accordingly. java/ChangeLog: * typeck.c, decl.c, jcf-parse.c, except.c, expr.c: cp/Changelog: * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c: Clean up redundant includes. fortran/ChangeLog: * trans-const.c, trans-types.c, trans-intrinsic.c: Clean up redundant includes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159663 138bc75d-0d04-0410-961f-82ee72b054a4
* * final.c (output_addr_const): Do not call mark_decl_referenced.hubicka2010-05-131-4/+1
| | | | | | | | | * cgraphunit.c (process_function_and_variable_attributes): Use mark_needed_node dirrectly. (assemble_thunk): Do not call mark_decl_referenced. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159370 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (cgraph_create_node): Set node frequency to normal.hubicka2010-04-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cgraph_clone_node): Copy function frequency. * cgraph.h (node_frequency): New enum (struct cgraph_node): Add. * final.c (rest_of_clean_state): Update. * lto-cgraph.c (lto_output_node): Output node frequency. (input_overwrite_node): Input node frequency. * tre-ssa-loop-ivopts (computation_cost): Update. * lto-streamer-out.c (output_function): Do not output function frequency. * predict.c (maybe_hot_frequency_p): Update and handle functions executed once. (cgraph_maybe_hot_edge_p): Likewise; use cgraph frequency instead of attribute lookup. (probably_never_executed_bb_p, optimize_function_for_size_p): Update. (compute_function_frequency): Set noreturn functions to be executed once. (choose_function_section): Update. * lto-streamer-in.c (input_function): Do not input function frequency. * function.c (allocate_struct_function): Do not initialize function frequency. * function.h (function_frequency): Remove. (struct function): Remove function frequency. * ipa-profile.c (CGRAPH_NODE_FREQUENCY): Remove. (try_update): Update. * tree-inline.c (initialize_cfun): Do not update function frequency. * passes.c (pass_init_dump_file): Update. * i386.c (ix86_compute_frame_layout): Update. (ix86_pad_returns): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158732 138bc75d-0d04-0410-961f-82ee72b054a4