summaryrefslogtreecommitdiff
path: root/gcc/tree-pass.h
Commit message (Collapse)AuthorAgeFilesLines
* 2008-05-16 Kenneth Zadeck <zadeck@naturalbridge.com>dnovillo2008-05-161-0/+2
| | | | | | | | | | | | | | | | | * doc/invoke.text (-fdump-tree-*-verbose): New option. * tree-dump.c (dump_options): New verbose option. * tree-pretty-print.c (dump_phi_nodes, dump_generic_bb_buff): Add verbose dump. * tree-pass.h (TDF_VERBOSE): New dump flag. * print-tree.c (print_node): Added code to be able to print PHI_NODES. (tree-flow.h): Added include. Makefile.in (print-tree.o): Added TREE_FLOW_H. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135417 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-05-15 Kenneth Zadeck <zadeck@naturalbridge.com>zadeck2008-05-151-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | * cgraph.h (compute_inline_parameters): Made public. * tree-pass.h (ipa_opt_pass): Removed function_generate_summary, variable_generate_summary, function_write_summary, variable_write_summary, variable_read_summary. Added generate_summary, write_summary, read_summary. * cgraphunit.c (cgraph_process_new_functions): Changed call from pass_ipa_inline.function_generate_summary, to compute_inline_parameters. * ipa-inline.c (compute_inline_parameters): Made public and added node parameter. (compute_inline_parameters_for_current): New function. (pass_inline_param): Now calls compute_inline_parameters_for_current. (inline_generate_summary): Removed parameter and made to loop over all cgraph nodes. (pass_ipa_inline): Updated for new IPA_PASS structure. * passes.c (execute_ipa_summary_passes): Now is called once per pass rather than once per node*pass. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135401 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-05-15 Richard Guenther <rguenther@suse.de>rguenth2008-05-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree-pass.h (current_pass): Declare. (get_pass_for_id): Likewise. * passes.c (passes_by_id, passes_by_id_size): New globals. (set_pass_for_id): New function. (get_pass_for_id): Likewise. (register_one_dump_file): Use set_pass_for_id to populate passes_by_id. (execute_function_todo): Flush per function statistics. * toplev.c (compile_file): Init statistics. (general_init): Do early statistics initialization. (finalize): Finish statistics. * statistics.h (statistics_early_init): Declare. (statistics_init): Likewise. (statistics_fini): Likewise. (statistics_fini_pass): Likewise. (statistics_counter_event): Likewise. (statistics_histogram_event): Likewise. * statistics.c: New file. * Makefile.in (OBJS-common): Add statistics.o. (statistics.o): Add dependencies. * doc/invoke.texi (-fdump-statistics): Document. * tree-ssa-pre.c (compute_antic): Use statistics_histogram_event. (insert): Likewise. (execute_pre): Use statistics_counter_event. * tree-ssa-propagate.c (struct prop_stats_d): Add num_dce field. (substitute_and_fold): Increment it. Use statistics_counter_event. * gcc.dg/tree-ssa/loadpre7.c: Adjust scan for not performed transformation. * gcc.dg/tree-ssa/ssa-fre-10.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135358 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-05-08 Richard Guenther <rguenther@suse.de>rguenth2008-05-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/invoke.texi (-fdump-tree-salias): Remove documentation. (-ftree-salias): Likewise. (salias-max-implicit-fields): Remove param documentation. (salias-max-array-elements): Likewise. * tree-pass.h (pass_create_structure_vars): Remove. * params.h (SALIAS_MAX_IMPLICIT_FIELDS): Remove. (SALIAS_MAX_ARRAY_ELEMENTS): Likewise. * tree-ssa-alias.c (create_structure_vars): Remove. (gate_structure_vars): Likewise. (pass_create_structure_vars): Likewise. (gate_build_alias): Likewise. (pass_build_alias): Adjust to run always and dump the function. * common.opt (ftree-salias): Hide. * passes.c (init_optimization_passes): Remove pass_create_structure_vars, adjust comment. * params.def (PARAM_SALIAS_MAX_IMPLICIT_FIELDS): Remove. (PARAM_SALIAS_MAX_ARRAY_ELEMENTS): Likewise. * opts.c (decode_options): Do not set flag_tree_salias. (common_handle_option): Add OPT_ftree_salias to the backward compatibility section. * gcc.dg/tree-ssa/20040911-1.c: Adjust. * gcc.dg/tree-ssa/20040517-1.c: Likewise. * gcc.dg/tree-ssa/pr26421.c: Likewise. * gcc.dg/tree-ssa/pr23382.c: Likewise. * gcc.dg/tree-ssa/alias-15.c: Likewise. * gcc.dg/tree-ssa/inline_asm-1.c: Likewise. * gcc.dg/tree-ssa/inline_asm-2.c: Likewise. * gcc.dg/tree-ssa/pta-fp.c: Likewise. * gcc.dg/tree-ssa/20031015-1.c: Likewise. * gcc.dg/tree-ssa/alias-12.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135111 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (dump_cgraph_node): Update.hubicka2008-05-071-1/+1
| | | | | | | | | | | | | * cgraph.h (cgraph_local_info): Break out inline summary. * cgraphunit.c (cgraph_process_new_functions): Use inliner analysis hook. * ipa-inline (inline_summary): New accestor function. (cgraph_clone_inlined_nodes, cgraph_check_inline_limits, cgraph_decide_inlining, compute_inline_parameters): Update. * ipa.c (cgraph_remove_unreachable_nodes): Remove statistics. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135037 138bc75d-0d04-0410-961f-82ee72b054a4
* tree-optimization/36100hubicka2008-05-051-0/+1
| | | | | | | | | | | * tree-pass.h (pass_O0_always_inline): Declare. * ipa-inline.c (inline_transform): Remove dead code. (cgraph_gate_O0_always_inline, cgraph_O0_always_inline, pass_O0_always_inline): New. * passes.c (init_optimization_passes): Add pass_O0_always_inline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134942 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-pass.h (opt_pass): Add IPA_PASS.hubicka2008-05-011-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | (varpool_node, cgraph_node): Forward declare. (ipa_opt_pass): Define. (pass_ipa_inline): Turn into ipa_opt_pass. (pass_apply_inline): Remove. * ipa-inline.c (pass_ipa_inline): Turn into ipa_opt_pass. (apply_inline): Turn into .... (inline_transform): ... this one. (inline_generate_summary): New function. (pass_apply_inline): Remove. * function.h (ipa_opt_pass): Forward declare structure; typedef; vector. (struct function): Add ipa_transforms_to_apply. * passes.c (register_one_dump_file): Work on IPA_PASS. (init_optimization_passes): Remove pass_inline_parameters and pass_apply_inline. (pass_init_dump_file, pass_fini_dump_file): Break out from .... (execute_one_pass) ... here; apply transforms when possible. (add_ipa_transform_pass, execute_ipa_summary_asses, execute_one_ipa_transform_pass): New. (execute_ipa_pass_list): Update for IPA_PASS type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134859 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-04-27 Richard Guenther <rguenther@suse.de>rguenth2008-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR tree-optimization/18754 PR tree-optimization/34223 * tree-pass.h (pass_complete_unrolli): Declare. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Print loop size before and after unconditionally of UL_NO_GROWTH in effect. Rewrite loop into loop closed SSA form if it is not already. (tree_unroll_loops_completely): Re-structure to iterate over innermost loops with intermediate CFG cleanups. Unroll outermost loops only if requested or the code does not grow doing so. * tree-ssa-loop.c (gate_tree_vectorize): Don't shortcut if no loops are available. (tree_vectorize): Instead do so here. (tree_complete_unroll): Also unroll outermost loops. (tree_complete_unroll_inner): New function. (gate_tree_complete_unroll_inner): Likewise. (pass_complete_unrolli): New pass. * tree-ssa-loop-manip.c (find_uses_to_rename_use): Only record uses outside of the loop. (tree_duplicate_loop_to_header_edge): Only verify loop-closed SSA form if it is available. * tree-flow.h (tree_unroll_loops_completely): Add extra parameter. * passes.c (init_optimization_passes): Schedule complete inner loop unrolling pass before the first CCP pass after final inlining. * gcc.dg/tree-ssa/loop-36.c: New testcase. * gcc.dg/tree-ssa/loop-37.c: Likewise. * gcc.dg/vect/vect-118.c: Likewise. * gcc.dg/Wunreachable-8.c: XFAIL bogus warning. * gcc.dg/vect/vect-66.c: Increase loop trip count. * gcc.dg/vect/no-section-anchors-vect-66.c: Likewise. * gcc.dg/vect/no-section-anchors-vect-69.c: Likewise. * gcc.dg/vect/vect-76.c: Likewise. * gcc.dg/vect/vect-outer-6.c: Likewise. * gcc.dg/vect/vect-outer-1.c: Likewise. * gcc.dg/vect/vect-outer-1a.c: Likewise. * gcc.dg/vect/vect-11a.c: Likewise. * gcc.dg/vect/vect-shift-1.c: Likewise. * gcc.target/i386/vectorize1.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134730 138bc75d-0d04-0410-961f-82ee72b054a4
* PR testsuite/35843hubicka2008-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cfgexpand.c (pass_expand): Turn into RTL pass. * passes.c (execute_one_pass): Do pass typechecking after execution. * tree-pass.h (pass_expand): Turn into RTL pass. * function.h (struct rtl_data): Move here fields accesses_prior_frames, calls_eh_return, saves_all_registers, has_nonlocal_goto, has_asm_statement, is_thunk, all_throwers_are_sibcalls, limit_stack, profile, uses_const_pool, uses_pic_offset_table, uses_eh_lsda, tail_call_emit, arg_pointer_save_area_init from struct function; turn into bool. (struct function): Move calls_eh_return, saves_all_registers, has_nonlocal_goto, has_asm_statement, is_thunk, all_throwers_are_sibcalls, limit_stack, profile, uses_const_pool, uses_pic_offset_table, uses_eh_lsda, tail_call_emit, arg_pointer_save_area_init into struct rtl_data. Remove recursive_call_emit and gimplified flags. (current_function_returns_struct, current_function_returns_pcc_struct, current_function_calls_setjmp, current_function_calls_alloca, current_function_accesses_prior_frames, current_function_calls_eh_return, current_function_is_thunk, current_function_stdarg, current_function_profile, current_function_limit_stack, current_function_uses_pic_offset_table, current_function_uses_const_pool, current_function_has_nonlocal_label, current_function_saves_all_registers, current_function_has_nonlocal_goto, current_function_has_asm_statement): Remove accesor macros. * ra-conflict.c (global_conflicts): Update. * tree-tailcall.c (suitable_for_tail_opt_p): Update. (suitable_for_tail_call_opt_p): Update. * builtins.c (expand_builtin_return_addr): Update. (expand_builtin_setjmp_setup): Update. (expand_builtin_nonlocal_goto): Update. * final.c (final_start_function): Update. (profile_function): Update. (leaf_function_p): Update. (only_leaf_regs_used): Update. * df-scan.c (df_get_exit_block_use_set): Update. * dojump.c (clear_pending_stack_adjust): Update. * tree-stdarg.c (gate_optimize_stdarg): Update. * gimple-low.c (lower_function_body): Update. * global.c (compute_regsets): Update. (global_alloc): Update. * dwarf2out.c (dwarf2out_begin_prologue): Update. * expr.c (expand_assignment): Update. * dse.c (dse_step0): Update. (dse_step1): Update. * c-decl.c (store_parm_decls): Update. * local-alloc.c (combine_regs): Update. (find_free_reg): Update. * function.c (assign_parms_augmented_arg_list): Update. (assign_parm_find_data_types): Update. (assign_parms): Update. (allocate_struct_function): Update. (expand_function_start): Update. (expand_function_end): Update. (get_arg_pointer_save_area): Update. (thread_prologue_and_epilogue_insns): Update. (rest_of_match_asm_constraints): Update. * stor-layout.c (variable_size): Update. * gcse.c (gcse_main): Update. (bypass_jumps): Update. * gimplify.c (gimplify_function_tree): Update. * calls.c (emit_call_1): Update. (expand_call): Update. * bt-load.c (compute_defs_uses_and_gen): Update. * except.c (sjlj_assign_call_site_values): Update. (sjlj_emit_function_enter): Update. (can_throw_external): Update. (set_nothrow_function_flags): Update. (expand_builtin_unwind_init): Update. (expand_eh_return): Update. (convert_to_eh_region_ranges): Update. (output_function_exception_table): Update. * emit-rtl.c (gen_tmp_stack_mem): Update. * cfgexpand.c (expand_used_vars): Update. (tree_expand_cfg): Update. * cfgcleanup.c (rest_of_handle_jump): Update. * explow.c (allocate_dynamic_stack_space): Update. * varasm.c (assemble_start_function): Update. (force_const_mem): Update. (mark_constant_pool): Update. * tree-optimize.c (tree_rest_of_compilation): Update. * stack-ptr-mod.c (notice_stack_pointer_modification): Update. * tree-cfg.c (notice_special_calls): Update. (is_ctrl_altering_stmt): Update. (tree_can_make_abnormal_goto): Update. (tree_purge_dead_abnormal_call_edges): Update. * config/alpha/predicates.md: Update. * config/alpha/alpha.c (alpha_sa_mask): Update. (alpha_sa_size): Update. (alpha_does_function_need_gp): Update. (alpha_expand_prologue): Update. (alpha_start_function): Update. (alpha_output_function_end_prologue): Update. (alpha_expand_epilogue): Update. * config/frv/frv.c (frv_stack_info): Update. (frv_expand_epilogue): Update. * config/s390/s390.c (s390_regs_ever_clobbered): Update. (s390_register_info): Update. (s390_frame_info): Update. (s390_init_frame_layout): Update. (s390_can_eliminate): Update. (save_gprs): Update. * config/spu/spu.c (spu_split_immediate): Update. (need_to_save_reg): Update. (spu_expand_prologue): Update. (spu_expand_epilogue): Update. * config/sparc/sparc.md: Update. * config/sparc/sparc.c (eligible_for_return_delay): Update. (sparc_tls_got): Update. (legitimize_pic_address): Update. (sparc_emit_call_insn): Update. (sparc_expand_prologue): Update. (output_return): Update. (print_operand): Update. (sparc_function_ok_for_sibcall): Update. * config/sparc/sparc.h (EXIT_IGNORE_STACK): Update. * config/m32r/m32r.md: Update. * config/m32r/m32r.c (MUST_SAVE_RETURN_ADDR): Update. (m32r_compute_frame_size): Update. (m32r_expand_prologue): Update. (m32r_expand_epilogue): Update. (m32r_legitimize_pic_address): Update. * config/m32r/m32r.h (FRAME_POINTER_REQUIRED): Update. * config/i386/linux.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update. * config/i386/i386.c (ix86_frame_pointer_required): Update. (gen_push): Update. (ix86_save_reg): Update. (ix86_compute_frame_layout): Update. (ix86_expand_prologue): Update. (ix86_expand_epilogue): Update. * config/sh/sh.c (output_stack_adjust): Update. (calc_live_regs): Update. (sh5_schedule_saves): Update. (sh_expand_prologue): Update. (sh_expand_epilogue): Update. (sh_setup_incoming_varargs): Update. (sh_allocate_initial_value): Update. (sh_get_pr_initial_val): Update. * config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): Update. * config/sh/sh.md (label:): Update. * config/avr/avr.c (out_movhi_mr_r): Update. * config/crx/crx.h (enum): Update. * config/xtensa/xtensa.h (along): Update. * config/stormy16/stormy16.c Update. (xstormy16_compute_stack_layout): Update. * config/fr30/fr30.c (MUST_SAVE_RETURN_POINTER): Update. (fr30_expand_prologue): Update. * config/cris/cris.c (cris_conditional_register_usage): Update. (cris_reg_saved_in_regsave_area): Update. (cris_initial_frame_pointer_offset): Update. (cris_simple_epilogue): Update. (cris_expand_prologue): Update. (cris_expand_epilogue): Update. (cris_expand_pic_call_address): Update. (cris_asm_output_symbol_ref): Update. (cris_asm_output_label_ref): Update. * config/cris/cris.md Update. * config/iq2000/iq2000.c (compute_frame_size): Update. (iq2000_expand_epilogue): Update. * config/mt/mt.h (save_direction): Update. * config/mn10300/mn10300.c (mn10300_function_value): Update. * config/ia64/ia64.c (ia64_compute_frame_size): Update. (ia64_secondary_reload_class): Update. * config/m68k/m68k.c (m68k_save_reg): Update. (m68k_expand_prologue): Update. (m68k_expand_epilogue): Update. (legitimize_pic_address): Update. * config/rs6000/rs6000.c (rs6000_got_register): Update. (first_reg_to_save): Update. (first_altivec_reg_to_save): Update. (compute_vrsave_mask): Update. (compute_save_world_info): Update. (rs6000_stack_info): Update. (spe_func_has_64bit_regs_p): Update. (rs6000_ra_ever_killed): Update. (rs6000_emit_eh_reg_restore): Update. (rs6000_emit_allocate_stack): Update. (rs6000_emit_prologue): Update. (rs6000_emit_epilogue): Update. (rs6000_output_function_epilogue): Update. (output_profile_hook): Update. (rs6000_elf_declare_function_name): Update. * config/rs6000/rs6000.h (rs6000_args): Update. * config/rs6000/rs6000.md: Update. * config/mcore/mcore.c (mcore_expand_prolog): Update. * config/arc/arc.c (arc_output_function_epilogue): Update. * config/arc/arc.h (FRAME_POINTER_REQUIRED): Update. * config/darwin.c (machopic_function_base_name): Update. * config/score/score3.c (score3_compute_frame_size): Update. (rpush): Update. (rpop): Update. (score3_epilogue): Update. * config/score/score7.c (score7_compute_frame_size): Update. (score7_prologue): Update. (score7_epilogue): Update. * config/score/score.h (FRAME_POINTER_REQUIRED): Update. * config/arm/linux-elf.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update. * config/arm/arm.c (use_return_insn): Update. (require_pic_register): Update. (arm_load_pic_register): Update. (arm_compute_save_reg0_reg12_mask): Update. (arm_compute_save_reg_mask): Update. (thumb1_compute_save_reg_mask): Update. (output_return_instruction): Update. (arm_output_function_prologue): Update. (arm_output_epilogue): Update. (arm_get_frame_offsets): Update. (arm_expand_prologue): Update. (thumb_pushpop): Update. (thumb_exit): Update. (thumb1_expand_prologue): Update. (thumb1_expand_epilogue): Update. (arm_unwind_emit): Update. (arm_output_fn_unwind): Update. * config/arm/arm.h (FRAME_POINTER_REQUIRED): Update. * config/arm/arm.md: Update. * config/pa/pa.md: Update. * config/pa/pa.c (legitimize_pic_address): Update. (compute_frame_size): Update. (hppa_expand_prologue): Update. (hppa_expand_epilogue): Update. (borx_reg_operand): Update. * config/pa/pa.h (FRAME_POINTER_REQUIRED): Update. (HARD_REGNO_RENAME_OK): Update. * config/mips/mips.c (mips_global_pointer): Update. (mips_save_reg_p): Update. (mips_compute_frame_info): Update. (mips_frame_pointer_required): Update. (mips_expand_prologue): Update. (mips_expand_epilogue): Update. (mips_can_use_return_insn): Update. (mips_reorg_process_insns): Update. * config/v850/v850.c (compute_register_save_size): Update. * config/mmix/mmix.h (FRAME_POINTER_REQUIRED): Update. * config/mmix/mmix.c (along): Update. (mmix_expand_epilogue): Update. * config/bfin/bfin.c (legitimize_pic_address): Update. (must_save_p): Update. (stack_frame_needed_p): Update. (add_to_reg): Update. (bfin_expand_prologue): Update. * stmt.c (expand_asm_operands): Update. * reload1.c (reload): Update. (init_elim_table): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134682 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-04-24 Richard Sandiford <rsandifo@nildram.co.uk>zadeck2008-04-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kenneth Zadeck <zadeck@naturalbridge.com> * dbgcnt.def (ra_byte_scan): Added. * dbgcnt.c (dbg_cnt): Added code to print message to dump_file when the last hit happens for a counter. * timevar.def (TV_DF_BYTE_LR): New variable. * tree-pass.h (pass_fast_rtl_byte_dce): New pass. * passes.c (pass_fast_rtl_byte_dce): New pass. * fwprop.c (update_df): Added mode to call df_ref_create. Renamed DF_REF_WIDTH and DF_REF_OFFSET to DF_REF_EXTRACT_WIDTH and DF_REF_EXTRACT_OFFSET. * df.h (DF_BYTE_LR, DF_BYTE_LR_BB_INFO, DF_BYTE_LR_IN, DF_BYTE_LR_OUT, df_byte_lr): New macro. (df_mm): New enum. (df_ref_extract): Added mode field. (DF_REF_WIDTH, DF_REF_OFFSET) Renamed to DF_REF_EXTRACT_WIDTH and DF_REF_EXTRACT_OFFSET. (DF_REF_EXTRACT_MODE): New macro. (df_byte_lr_bb_info): New structure. (df_print_byte_regset, df_compute_accessed_bytes, df_byte_lr_add_problem, df_byte_lr_get_regno_start, df_byte_lr_get_regno_len, df_byte_lr_simulate_defs, df_byte_lr_simulate_uses, df_byte_lr_simulate_artificial_refs_at_top, df_byte_lr_simulate_artificial_refs_at_end, df_compute_accessed_bytes): New function. (df_ref_create): Add parameter. (df_byte_lr_get_bb_info): New inline function. * df-scan.c (df_ref_record, df_uses_record, df_ref_create_structure): Added mode parameter. (df_ref_create, df_notes_rescan, df_ref_record, df_def_record_1, df_defs_record, df_uses_record, df_get_conditional_uses, df_get_call_refs, df_insn_refs_collect, df_bb_refs_collect, df_entry_block_defs_collect, df_exit_block_uses_collect): Added mode parameter to calls to df_ref_record, df_uses_record, df_ref_create_structure. (df_ref_equal_p, df_ref_compare): Added test for modes. (df_ref_create_structure): Added code to set mode. Renamed DF_REF_WIDTH and DF_REF_OFFSET to DF_REF_EXTRACT_WIDTH and DF_REF_EXTRACT_OFFSET. * df-core.c (df_print_byte_regset): New function. * df-byte-scan.c: New file. * df-problems.c (df_rd_transfer_function): Removed unnecessary calls to BITMAP_FREE. (df_byte_lr_problem_data, df_problem problem_BYTE_LR): New structure. (df_byte_lr_get_regno_start, df_byte_lr_get_regno_len, df_byte_lr_set_bb_info, df_byte_lr_free_bb_info, df_byte_lr_check_regs, df_byte_lr_expand_bitmap, df_byte_lr_alloc, df_byte_lr_reset, df_byte_lr_bb_local_compute, df_byte_lr_local_compute, df_byte_lr_init, df_byte_lr_confluence_0, df_byte_lr_confluence_n, df_byte_lr_transfer_function, df_byte_lr_free, df_byte_lr_top_dump, df_byte_lr_bottom_dump, df_byte_lr_add_problem, df_byte_lr_simulate_defs, df_byte_lr_simulate_uses, df_byte_lr_simulate_artificial_refs_at_top, df_byte_lr_simulate_artificial_refs_at_end): New function. * dce.c (byte_dce_process_block): New function. (dce_process_block): au is now passed in rather than computed locally. Changed loops that look at artificial defs to not look for conditional or partial ones, because there never are any. (fast_dce): Now is able to drive byte_dce_process_block or dce_process_block depending on the kind of dce being done. (rest_of_handle_fast_dce): Add parameter to fast_dce. (rest_of_handle_fast_byte_dce): New function. (rtl_opt_pass pass_fast_rtl_byte_dce): New pass. * Makefile.in (df-byte-scan.o, debugcnt.o): Added dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134523 138bc75d-0d04-0410-961f-82ee72b054a4
* * except.c (dw2_size_of_call_site_table,hubicka2008-04-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sjlj_size_of_call_site_table): Use vector API for call_site_record. * cgraphbuild.c (build_cgraph_edges): Update. * tree-pass.h: Update comment. * final.c (leaf_function_p): Update. (leaf_renumber_regs): Update. (rest_of_clean_state): Update. * omp-low.c (expand_omp_parallel): Update. * ipa-reference.c (analyze_function): Update. * reorg.c (find_end_label): Update. (optimize_skip): Update. (fill_simple_delay_slots): Update. (fill_simple_delay_slots): Update. (make_return_insns): Update. (dbr_schedule): Update. * gimple-low.c (record_vars_into): Update. * cfgbuild.c (make_edges): Update. * function.c (assign_stack_local): Update. (assign_parm_adjust_stack_rtl): Update. (locate_and_pad_parm): Update. (allocate_struct_function): Do not initialize stack_alignment_needed and preferred_stack_boundary here. (stack_protect_prologue): Update. (stack_protect_epilogue): Update. (expand_function_start): Initialize stack_alignment_needed, preferred_stack_boundary and max_jumptable_ents. (expand_function_end): Update. (free_after_compilation): Do not NULLify epilogue_delay_list. * function.h (struct rtl_data): Add stack_protect_guard, stack_alignment_needed, preferred_stack_boundary, epilogue_delay_list. (struct function): Remove value_histograms, stack_alignment_needed, preferred_stack_boundary, epilogue_delay_list, max_jumptable_ents, last_label_uid, unexpanded_var_list, stack_protect_guard. (current_function_epilogue_delay_list): Remove. * ipa-type-escape.c (analyze_function): Update. * gimplify.c (pop_gimplify_context): Update comment. * calls.c (expand_call): Update. (emit_library_call_value_1): Update. * except.c (set_nothrow_function_flags): Update. * cfgexpand.c (get_decl_align_unit): Update. (create_stack_guard): Update. (estimated_stack_frame_size): Update. (expand_used_vars): Update. (tree_expand_cfg): Free histogram earliers, init expansion variables. * explow.c (allocate_dynamic_stack_space): Update. * tree-ssa-live.c (remove_unused_locals): Update. * varasm.c (mark_constant_pool): Update. * tree-inline.c (remap_decls): Update. (initialize_cfun): Update. (declare_return_variable): Update. (inline_forbidden_p): Update. (expand_call_inline): Update. (declare_inline_vars): Update. (tree_function_versioning): Update. * tree-flow.h (value_histograms): New. (VALUE_HISTOGRAMS): New macro. * basic-block.h (control_flow_graph): Add max_jumptable_ents, last_label_uid. * tree-cfg.c (set_bb_for_stmt): Update. (replace_by_duplicate_decl): Update. (move_block_to_fn): Update. (new_label_mapper): Update. (dump_function_to_file): Update. * ipa-struct-reorg.c (build_data_structure): Update. * cfgrtl.c (print_rtl_with_bb): Update. * reload1.c (reload): Update. (reload): Update. * config/i386/i386.c (setup_incoming_varargs_64, ix86_compute_frame_layout): Update. * config/arc/arc.c (arc_output_function_epilogue): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134425 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-dump.c (dump_enable_all): Remove prototype; do not accepthubicka2008-04-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | letter argument. (dump_files): Update. (enable_rtl_dump_file): Do not accept letter argument. * tree-pass.h (dump_file_info): Remove letter argument. * toplev.c (decode_d_option): Update -da handling. * toplev.h (enable_rtl_dump_file): Update prototype. * passes.c (register_one_dump_file): Do not accept IPA argument; work it out based on pass type. (register_dump_files_1): Likewise. (init_optimization_passes): Update register_one_dump_file calls. (execute_one_pass): Sanity check that IPA passes are called at IPA level and RTL passes at RTL level. (execute_pass_list): IPA pass can not be after or subpass of GIMPLE/RTL pass. (execute_ipa_pass_list): Handle IPA subpasses of IPA subpasses and disallov RTL subpasses of IPA subpasses. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133930 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc.dg/20050811-2.c: Update dumping flags.hubicka2008-03-191-217/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gcc.dg/sms-2.c: Update dumping flags. * gcc.dg/var-expand1.c: Update dumping flags. * gcc.dg/var-expand3.c: Update dumping flags. * gcc.dg/pr30957-1.c: Update dumping flags. * gcc.dg/20050811-1.c: Update dumping flags. * gcc.dg/cpp/cmdlne-dI-M.C: Do not xfail. * gcc.dg/cpp/cmdlne-dM-M.C: Do not xfail. PR other/35094 * toplev.c (decode_d_option): Handle all CPP flags. * tree-vrp.c: Update tree_pass descriptors. * regrename.c: Update tree_pass descriptors. * fwprop.c: Update tree_pass descriptors. * doc/invoke.texi: Remove documentation of dropped -d? flags. * tree-into-ssa.c: Update tree_pass descriptors. * tree-dump.c: Update tree_pass descriptors. * tree-complex.c: Update tree_pass descriptors. * tree-dump.h: Update tree_pass descriptors. * see.c: Update tree_pass descriptors. * cgraphbuild.c: Update tree_pass descriptors. * tracer.c: Update tree_pass descriptors. * tree-loop-distribution.c: Update tree_pass descriptors. * cgraph.c: Update tree_pass descriptors. * postreload-gcse.c: Update tree_pass descriptors. * postreload.c: Update tree_pass descriptors. * tree-ssa-loop-ch.c: Update tree_pass descriptors. * tree-tailcall.c: Update tree_pass descriptors. * tree-pass.h (tree_opt_pass): Rename to ... (opt_pass) ... this one; add "type" field and remove letter field. (gimple_opt_pass, rtl_opt_pass, simple_ipa_opt_pass): New. (execute_pass_list, execute_ipa_pass_list, all_passes, all_ipa_passes, all_lowering_passes): Update declaration. * ipa-cp.c: Update tree_pass descriptors. * final.c: Update tree_pass descriptors. * omp-low.c: Update tree_pass descriptors. * tree-ssa-dse.c: Update tree_pass descriptors. * ipa-reference.c: Update tree_pass descriptors. * tree-ssa-uncprop.c: Update tree_pass descriptors. * auto-inc-dec.c: Update tree_pass descriptors. * reorg.c: Update tree_pass descriptors. * cgraphunit.c: Update tree_pass descriptors. * tree-ssa-copyrename.c: Update tree_pass descriptors. * tree-ssa-ccp.c: Update tree_pass descriptors. * df-core.c: Update tree_pass descriptors. * mode-switching.c: Update tree_pass descriptors. * tree-nomudflap.c: Update tree_pass descriptors. * modulo-sched.c: Update tree_pass descriptors. * ipa-pure-const.c: Update tree_pass descriptors. * cse.c: Update tree_pass descriptors. * web.c: Update tree_pass descriptors. * tree-stdarg.c: Update tree_pass descriptors. * tree-ssa-math-opts.c: Update tree_pass descriptors. * tree-ssa-dom.c: Update tree_pass descriptors. * tree-nrv.c: Update tree_pass descriptors. * tree-ssa-alias.c: Update tree_pass descriptors. * loop-init.c: Update tree_pass descriptors. * gimple-low.c: Update tree_pass descriptors. * ipa-inline.c: Update tree_pass descriptors. * tree-ssa-sink.c: Update tree_pass descriptors. * global.c: Update tree_pass descriptors. * ifcvt.c: Update tree_pass descriptors. * jump.c: Update tree_pass descriptors. * predict.c: Update tree_pass descriptors. * tree-ssa-loop.c: Update tree_pass descriptors. * recog.c: Update tree_pass descriptors. * dse.c: Update tree_pass descriptors. * tree-ssa-ifcombine.c: Update tree_pass descriptors. * tree-eh.c: Update tree_pass descriptors. * regmove.c: Update tree_pass descriptors. * local-alloc.c * function.c: Update tree_pass descriptors. * tree-vectorizer.c: Update tree_pass descriptors. * gcse.c: Update tree_pass descriptors. * ipa-type-escape.c: Update tree_pass descriptors. * tree-if-conv.c: Update tree_pass descriptors. * init-regs.c: Update tree_pass descriptors. * ipa.c: Update tree_pass descriptors. * tree-ssa-phiopt.c: Update tree_pass descriptors. * rtl-factoring.c: Update tree_pass descriptors. * lower-subreg.c: Update tree_pass descriptors. * bt-load.c: Update tree_pass descriptors. * tree-dfa.c: Update tree_pass descriptors. * except.c: Update tree_pass descriptors. * emit-rtl.c: Update tree_pass descriptors. * cfgexpand.c: Update tree_pass descriptors. * tree-cfgcleanup.c: Update tree_pass descriptors. * cfgcleanup.c: Update tree_pass descriptors. * tree-ssa-pre.c: Update tree_pass descriptors. * tree-sra.c: Update tree_pass descriptors. * tree-mudflap.c: Update tree_pass descriptors. * tree-ssa-copy.c: Update tree_pass descriptors. * cfglayout.c: Update tree_pass descriptors. * tree-ssa-forwprop.c: Update tree_pass descriptors. * tree-ssa-dce.c: Update tree_pass descriptors. * tree-ssa.c: Update tree_pass descriptors. * regclass.c: Update tree_pass descriptors. * integrate.c: Update tree_pass descriptors. * tree-optimize.c: Update tree_pass descriptors. * tree-ssa-phiprop.c: Update tree_pass descriptors. * tree-object-size.c: Update tree_pass descriptors. * combine.c: Update tree_pass descriptors. * tree-outof-ssa.c: Update tree_pass descriptors. * bb-reorder.c: Update tree_pass descriptors. * stack-ptr-mod.c: Update tree_pass descriptors. * var-tracking.c: Update tree_pass descriptors. * tree-profile.c: Update tree_pass descriptors. * tree-vect-generic.c: Update tree_pass descriptors. * reg-stack.c: Update tree_pass descriptors. * sched-rgn.c: Update tree_pass descriptors. * tree-ssa-structalias.c: Update tree_pass descriptors. * tree-cfg.c: Update tree_pass descriptors. * passes.c (current_pass): Update declaration. (finish_optimization_passes): Update. (all_passes, all_ipa_passes, all_lowering_passes): Update declaration. (register_one_dump_file, register_dump_files_1, next_pass_1): Update arguments. (init_optimization_passes): Update handling of new types. (execute_one_pass, execute_pass_list, execute_ipa_pass_list): Update. * ipa-struct-reorg.c: Update tree_pass descriptors. * tree-ssa-reassoc.c: Update tree_pass descriptors. * combine-stack-adj.c: Update tree_pass descriptors. * cfgrtl.c: Update tree_pass descriptors. * dce.c: Update tree_pass descriptors. * tree-ssanames.c: Update tree_pass descriptors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133342 138bc75d-0d04-0410-961f-82ee72b054a4
* * doc/invoke.texi: Document -ftree-loop-distribution.spop2008-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree-loop-distribution.c: New. * tree-pass.h (pass_loop_distribution): New. * graphds.h (struct graph): Add htab_t indices. * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New. * tree-vectorizer.c (rename_variables_in_loop): Extern. (slpeel_tree_duplicate_loop_to_edge_cfg): Init PENDING_STMT to NULL. * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared. * tree-data-ref.c (debug_data_dependence_relations): New. (dump_data_dependence_relation): Also print data references. (free_data_ref): Extern. (same_access_functions): Moved... (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt. (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component, debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg, struct rdg_vertex_info, rdg_vertex_for_stmt): New. (create_rdg_edge_for_ddr, create_rdg_vertices): Cleaned up. (stmts_from_loop): Skip LABEL_EXPR. (hash_stmt_vertex_info, eq_stmt_vertex_info, hash_stmt_vertex_del): New. (build_rdg): Initialize rdg->indices htab. (free_rdg, stores_from_loop, ref_base_address, rdg_defs_used_in_other_loops_p, have_similar_memory_accesses, have_similar_memory_accesses_1, ref_base_address_1, remove_similar_memory_refs): New. * tree-data-ref.h: Depend on tree-chrec.h. (debug_data_dependence_relations, free_data_ref): Declared. (same_access_functions): ... here. (ddr_is_anti_dependent, ddrs_have_anti_deps, ddr_dependence_level): New. (struct rdg_vertex): Add has_mem_write and has_mem_reads. (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT, RDG_MEM_READS_STMT): New. (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component, debug_rdg_component, dump_rdg, debug_rdg, dot_rdg, rdg_vertex_for_stmt): Declared. (struct rdg_edge): Add level. (RDGE_LEVEL): New. (free_rdg, stores_from_loop, remove_similar_memory_refs, rdg_defs_used_in_other_loops_p, have_similar_memory_accesses): Declared. (rdg_has_similar_memory_accesses): New. * tree-vect-analyze.c: Remove unused static decls. * lambda.h (dependence_level): New. * common.opt (ftree-loop-distribution): New. * tree-flow.h (mark_virtual_ops_in_bb, slpeel_tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared. * Makefile.in (TREE_DATA_REF_H): Depend on tree-chrec.h. (OBJS-common): Add tree-loop-distribution.o. (tree-loop-distribution.o): New rule. * tree-cfg.c (mark_virtual_ops_in_bb): New. (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb. * passes.c (init_optimization_passes): Schedule pass_loop_distribution. * testsuite/gcc.dg/tree-ssa/ldist-{1..12}.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132745 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-02-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>manu2008-02-131-2/+0
| | | | | | | | | | | PR 29673 * doc/invoke.texi (Debugging Options): Remove -fdump-tree-inlined. Add -fdump-ipa-inline. * tree-dump.c (dump_files): Remove tree-inlined dump. * tree-pass.h (tree_dump_index): Remove TDI_inlined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132284 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-01-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>manu2008-01-221-0/+1
| | | | | | | | | | | | | | | PR middle-end/33092 * tree-pass.h (pass_build_alias): New pass. * tree-ssa-alias.c (gate_build_alias): New. (pass_build_alias): New. * passes.c (init_optimization_passes): Add pass_build_alias after pass_create_structure_vars. testsuite/ * gcc.dg/pr33092.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131717 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-10-29 Richard Guenther <rguenther@suse.de>rguenth2007-10-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * passes.c (init_optimization_passes): Exchange store_copy_prop with copy_prop. * tree-pass.h (pass_store_copy_prop): Remove. * tree-ssa-copy.c (do_store_copy_prop): Remove. (stmt_may_generate-copy): Do not handle store_copy_prop. (get_copy_of_val): Likewise. (set_copy_of_val): Likewise. (copy_prop_visit_assignment): Likewise. (copy_prop_visit_stmt): Likewise. (copy_prop_visit_phi_node): Likewise. (init_copy_prop): Likewise. (execute_copy_prop): Likewise. (do_copy_prop): Remove. (gate_store_copy_prop): Likewise. (store_copy_prop): Likewise. (pass_store_copy_prop): Likewise. (pass_copy_prop): Call execute_copy_prop. * opts.c (decode_options): Do not set flag_tree_store_copy_prop. * common.opt (ftree-store-copy-prop): Mark obsolete. * doc/invoke.texi (ftree-store-copy-prop): Remove documentation. * gcc.dg/tree-ssa/ssa-copyprop-1.c: Scan optimized dump. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129734 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-10-24 Olga Golovanevsky <olga@il.ibm.com>olga2007-10-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | * ipa-type-escape.h: Expose function is_array_access_through_pointer_and_index. * ipa-type-escape.c (is_array_access_through_pointer_and_index): Add three new parameters. Add support of POINTER_PLUS_EXPR tree code. 2007-10-24 Olga Golovanevsky <olga@il.ibm.com> * ipa-struct-reorg.c, ipa-struct-reorg.h: New files. * tree-pass.h: Add pass_ipa_struct_reorg. * common.opt: Add ipa-struct-reorg flag. * Makefile.in: Add ipa-strcut-reorg.o compilation. * passes.c: Add pass pass_ipa_struct_reorg. * params.h: Add STRUCT_REORG_COLD_STRUCT_RATIO. * params.def: Add PARAM_STRUCT_REORG_COLD_STRUCT_RATIO. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129600 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/15764jason2007-10-031-0/+1
| | | | | | | | | | | | | | | | * cp/decl.c (wrap_cleanups_r): New fn. (wrap_temporary_cleanups): New fn. (initialize_local_var): Call it. * tree-eh.c (same_handler_p): New fn. (optimize_double_finally): New fn. (refactor_eh_r): New fn. (refactor_eh): New fn. (pass_refactor_eh): New pass. * tree-pass.h: Declare it. * passes.c (init_optimization_passes): Add it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128979 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-parloops.c: New file.rakdver2007-09-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree-ssa-operands.h (free_stmt_operands): Declare. * tree-ssa-loop-manip.c (split_loop_exit_edge): Return the new basic block. * tree-pass.h (pass_parallelize_loops): Declare. * omp-low.c (expand_omp_parallel, expand_omp_for): Update SSA form for virtual operands. (build_omp_regions_1): Allow analysing just a single OMP region and its subregions. ( build_omp_regions_root, omp_expand_local): New functions. (build_omp_regions): Add argument to build_omp_regions_1 call. * builtins.def (DEF_GOMP_BUILTIN): Initialize OMP builtins when autoparallelization is run. * timevar.def (TV_TREE_PARALLELIZE_LOOPS): New. * tree-ssa-loop.c (gate_tree_parallelize_loops, tree_parallelize_loops, pass_parallelize_loops): New. * common.opt (ftree-parallelize-loops): New. * tree-flow.h (omp_expand_local, tree_duplicate_sese_tail, parallelize_loops): Declare. (add_phi_args_after_copy, split_loop_exit_edge): Declaration changed. * Makefile.in (tree-parloops.o): Added. * tree-cfg.c (add_phi_args_after_copy_edge, tree_duplicate_sese_tail): New functions. (add_phi_args_after_copy_bb): Use add_phi_args_after_copy_edge. (add_phi_args_after_copy): Call add_phi_args_after_copy_edge for one extra edge as well. (tree_duplicate_sese_region): Add argument to add_phi_args_after_copy. Use VEC_free to free doms vector. (move_block_to_fn): Update loop info. Remove phi nodes for virtual operands. Recompute operand caches in the new function. (move_sese_region_to_fn): Update loop info. * passes.c (init_optimization_passes): Add pass_parallelize_loops. * tree-ssa-operands.c (free_stmt_operands): New function. * doc/passes.texi: Document autoparallelization. * doc/invoke.texi (-ftree-parallelize-loops): New option. * gcc.dg/tree-ssa/parallelization-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128517 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-pass.h (pass_cselim): Declare new pass.matz2007-09-101-0/+1
| | | | | | | | | | | | | | | | | | | | | * passes.c (init_optimization_passes): Link in pass_cselim. * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Renamed from tree_ssa_phiopt; add do_store_elim parameter, handle it by calling cond_store_replacement. (condstoretemp): New static variable. (cond_store_replacement): New function. (tree_ssa_phiopt, tree_ssa_cs_elim): New wrappers around tree_ssa_phiopt_worker. (struct name_to_bb): New. (get_non_trapping, name_to_bb_hash, name_to_bb_eq, add_or_mark_expr, nt_init_block, nt_fini_block): New static functions. (seen_ssa_names, nontrap_set): New static variables. (gate_cselim, pass_cselim): Define new pass. * common.opt (ftree-cselim): New flag. * toplev.c (process_options): Set flag_tree_cselim if required. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128324 138bc75d-0d04-0410-961f-82ee72b054a4
* * passes.c (init_optimization_passes): Add simple dce and addressablehubicka2007-09-071-0/+2
| | | | | | | | | | | | passes. * tree-ssa.c (execute_update_addresses_taken): New function. (pass_update_address_taken): New. * tree-ssa-dse.c (execute_simple_dse): New function. (pass_simple_dse): New. * tree-pass.h (pass_simple_dse, pass_update_address_taken): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128239 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraphbuild.c (rebuild_cgraph_edges): Export.rakdver2007-09-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cgraph.h (rebuild_cgraph_edges): Declare. * tree-pass.h (pass_expand_omp_ssa): New. * omp-low.c (find_omp_clause): Export. (copy_var_decl): Split from omp_copy_decl_2. (build_omp_barrier): Return the call to emit instead of emitting it directly. (lower_rec_input_clauses, expand_omp_single): Gimplify the result of build_omp_barrier. (extract_omp_for_data, expand_parallel_call, expand_omp_parallel, expand_omp_for_generic, expand_omp_for_static_nochunk, expand_omp_for_static_chunk, expand_omp_for, expand_omp_sections): Adapted to work on SSA form. (execute_expand_omp): Do not invalidate dominance information. (gate_expand_omp): Do not run with -fopenmp-ssa flag. (gate_expand_omp_ssa, pass_expand_omp_ssa): New. * gimplify.c (gimplify_omp_for): Ensure that the control variable is a gimple_reg. (force_gimple_operand): Allow gimplifying code expressions without value. * tree-predcom.c (mark_virtual_ops_for_renaming): Handle phi nodes. * common.opt (fopenmp-ssa): New. * tree-flow.h (find_omp_clause, copy_var_decl): Declare. * Makefile.in (tree-cfg.o): Add TREE_INLINE_H dependency. * tree-cfg.c: Include tree-inline.h. (struct move_stmt_d): Replace vars_to_remove by vars_map field. (replace_by_duplicate_decl, replace_ssa_name, mark_virtual_ops_in_region): New functions. (move_stmt_r, move_block_to_fn, move_sese_region_to_fn): Adapted to work on SSA form. * passes.c (init_optimization_passes): Add pass_expand_omp_ssa pass. * tree-ssa-operands.c (get_expr_operands): Handle operands of OMP constructs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128223 138bc75d-0d04-0410-961f-82ee72b054a4
* * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharinghubicka2007-09-051-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | verifier. * fwprop.c (pass_rtl_fwprop, pass_rtl_fwprop_add): Likewise. * see.c (pass_see): Likewise. * tracer.c (pass_tracer): Likewise. * postreload-gcse.c (pass_gcse2): Likewise. * postreload.c (pass_postreload_cse): Likewise. * mode-switching.c (pass_mode_switching): Likewise. * modulo-sched.c (pass_sms): Likewise. * cse.c (cse_insn): Likewise. * web.c (pass_web): Likweise. * combine-stack-adj.c (pass_stack_adjustments): Likewise. * dce.c (pass_ud_rtl_dce, pass_fast_rtl_dce): Likewise. * loop-init.c (pass_rtl_loop_init): Likewise. (pass_rtl_loop_done, pass_rtl_move_loop_, pass_rtl_unswitch, pass_rtl_unroll_and, pass_rtl_doloop): Likewise. * global.c (pass_global_alloc): Likewise. * ifcvt.c (pass_rtl_ifcvt, pass_if_after_combine, pass_if_after_reload): Likewise. * reload.c (pass_peephole2, pass_split_for_shoren_branches): Likewise. * dse.c (pass_rtl_dse1, pass_rtl_dse2): Likewise. * regmove.c (pass_regmove): Likewise. * function.c (pass_thread_prologugues_epilogues): Likewise. * gcse.c (pass_gcse): Likewise. * rtl-factoring.c (pass_rtl_seqabstr): Likewise. * lower-subreg.c (pass_lower_subreg2): Likewise. * bt-load.c (pass_branch_target_load): Likewise. * emit-rtl.c (pass_unshare_all_rtl): Likewise. * cfgcleanup.c (pass_jump, pass_jump2): Likewise. * combine.c (pass_combine): Likewise. * bb-reorder.c (pass_duplicate_comp, pass_reorder_blocks): Likewise. (pass_partition_blocks): Likewise. * var-tracking.c (pass_variable_track): Likewise. * reg-stack.c (pass_stack_regs_run): Likewise. * sched-rgn.c (pass_sched, pass_sched2): Likewise. * passes.c (pass_postreload): Likewise. (execute_function_todo): Add TODO_verify_rtl_sharing handling code. * tree-pass.h (TODO_verify_rtl_sharing): New. (TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals, TODO_remove_unused_locals, TODO_set_props, TODO_df_finish, TODO_df_verify, TODO_mark_first_instance, TODO_rebuild_alias): Renumber. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128126 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (vector_types_convertible_p,ghazi2007-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | decl_with_nonnull_addr_p, c_promoting_integer_type_p, self_promoting_args_p): Constify. * c-common.h (has_c_linkage, decl_with_nonnull_addr_p, c_promoting_integer_type_p, self_promoting_args_p, anon_aggr_type_p, vector_types_convertible_p): Likewise. * c-decl.c (anon_aggr_type_p): Likewise. * * c-dump.c (dump_stmt): Likewise. * c-objc-common.c (has_c_linkage): Likewise. * c-tree.h (same_translation_unit_p): Likewise. * c-typeck.c (null_pointer_constant_p, tagged_types_tu_compatible_p, function_types_compatible_p, type_lists_compatible_p, lvalue_or_else, lvalue_p, comptypes_internal, struct tagged_tu_seen_cache, same_translation_unit_p, alloc_tagged_tu_seen_cache, c_size_in_bytes): Likewise. * ggc-common.c (compare_ptr_data, hash_descriptor, eq_descriptor, hash_ptr, eq_ptr): Likewise. * langhooks-def.h (lhd_decl_ok_for_sibcall, LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Likewise. * langhooks.c (lhd_decl_ok_for_sibcall): Likewise. * langhooks.h (ok_for_sibcall, omp_privatize_by_reference): Likewise. * optabs.c (optab_for_tree_code): Likewise. * optabs.h (optab_for_tree_code): Likewise. * rtl.h (simplify_rtx): Likewise. * simplify-rtx.c (simplify_rtx): Likewise. * tree-dump.c (queue, queue_and_dump_index, queue_and_dump_type, dump_flag, dump_node): Likewise. * tree-dump.h (struct dump_info, dump_stmt, queue_and_dump_index, queue_and_dump_type, dump_flag): Likewise. * tree-flow.h (vect_can_force_dr_alignment_p): Likewise. * tree-pass.h (dump_node): Likewise. * tree-vectorizer.c (vect_can_force_dr_alignment_p, supportable_narrowing_operation): Likewise. * tree-vectorizer.h (vect_can_force_dr_alignment_p, supportable_narrowing_operation): Likewise. * tree-vrp.c (needs_overflow_infinity, supports_overflow_infinity, is_negative_overflow_infinity, is_positive_overflow_infinity, is_overflow_infinity, vrp_val_is_max, vrp_val_is_min, nonnull_arg_p, get_value_range, vrp_operand_equal_p, update_value_range, add_equivalence, ssa_name_nonnegative_p, ssa_name_nonzero_p, fp_predicate): Likewise. * tree.c (auto_var_in_fn_p, empty_body_p): Likewise. * tree.h (empty_body_p, auto_var_in_fn_p, ssa_name_nonzero_p, ssa_name_nonnegative_p): Likewise. cp: * call.c (sufficient_parms_p): Constify. * class.c (same_signature_p): Likewise. * cp-gimplify.c (is_invisiref_parm, cxx_omp_privatize_by_reference): Likewise. * cp-objcp-common.c (has_c_linkage): Likewise. * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK, sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p, grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for, num_artificial_parms_for, comp_template_parms, template_parameter_pack_p, any_dependent_template_arguments_p, any_type_dependent_arguments_p, any_value_dependent_elements_p, repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p, zero_init_p, member_p, cp_lvalue_kind, builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p, varargs_function_p, is_dummy_object, special_function_kind, string_conv_p, type_unknown_p, comp_except_specs, compparms, comp_cv_qualification, is_bitfield_expr_with_lowered_type, unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly, cp_has_mutable_p, at_least_as_qualified_p, invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise. * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise. * except.c (nothrow_libfn_p): Likewise. * method.c (skip_artificial_parms_for, num_artificial_parms_for): Likewise. * pt.c (comp_template_parms, template_parameter_pack_p, any_type_dependent_arguments_p, any_value_dependent_elements_p, any_dependent_template_arguments_p): Likewise. * repo.c (repo_export_class_p): Likewise. * semantics.c (anon_aggr_type_p): Likewise. * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p, builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p, varargs_function_p, member_p, is_dummy_object, pod_type_p, zero_init_p, special_function_p): Likewise. * typeck.c (comp_array_types, type_unknown_p, comp_except_specs, comp_array_types, at_least_as_qualified_p, comp_cv_qualification, compparms, invalid_nonstatic_memfn_p, is_bitfield_expr_with_lowered_type, unlowered_expr_type, string_conv_p, ptr_reasonably_similar, cp_type_readonly, cp_has_mutable_p, lvalue_or_else): Likewise. fortran: * trans-openmp.c (gfc_omp_privatize_by_reference): Constify. * trans.h (gfc_omp_privatize_by_reference): Likewise. java: * lang.c (java_decl_ok_for_sibcall): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127799 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-08-14 Daniel Berlin <dberlin@dberlin.org>dberlin2007-08-141-7/+8
| | | | | | | | | | | | | | | | | | | | | | | * tree-pass.h (PROP_pta): Removed. (TODO_rebuild_alias): New. (pass_may_alias): Removed. * tree-ssa-ccp.c (execute_fold_all_builtins): Only rebuild aliasing if we changed something. * tree-ssa-alias.c (compute_may_aliases): Make non-static. Update SSA internally. (pass_may_alias): Removed. (create_structure_vars): Return TODO_rebuild_alias. * tree-ssa-pre.c (do_pre): Return TODO_rebuild_alias. * tree-sra.c (tree_sra): Only rebuild aliasing if something changed. (tree_sra_early): We never affect aliasing right now. * tree-flow.h (compute_may_aliases): New prototype. * passes.c: Remove pass_may_alias from the passes. (execute_function_todo): Support TODO_rebuild_alias. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127491 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-08-05 Paolo Bonzini <bonzini@gnu.org>bonzini2007-08-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Remove --enable-checking=df from default settings. * tree-pass.h (TODO_df_verify): New. Shift TODO_mark_first_instance. * df-core.c (df_finish_pass) [ENABLE_CHECKING]: Schedule verification if the parameter is true. (df_analyze) [!ENABLE_DF_CHECKING]: Also do verification if the DF_VERIFY_SCHEDULED flag is true. * df.h (enum df_changeable_flags): Add DF_VERIFY_SCHEDULED. (df_finish_pass): Adjust prototype. * passes.c (execute_todo): Schedule verification if TODO_df_verify is true. * see.c (pass_see): Add TODO_df_verify. * loop-init.c (pass_rtl_move_loop_invariants): Add TODO_df_verify. * global.c (rest_of_handle_global_alloc): Schedule verification after the pass. * local-alloc.c (rest_of_handle_local_alloc): Schedule verification before the pass. * function.c (pass_thread_prologue_and_epilogue): Add TODO_df_verify. * gcse.c (rest_of_handle_gcse): Adjust call to df_finish_pass. * loop-iv.c (iv_analysis_done): Schedule verification after the pass. * config/sh/sh.c (sh_output_mi_thunk): Remove dead code. * config/ia64/ia64.c (ia64_reorg): Adjust call to df_finish_pass. * config/bfin/bfin.c (bfin_reorg): Adjust call to df_finish_pass. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127225 138bc75d-0d04-0410-961f-82ee72b054a4
* Change copyright header to refer to version 3 of the GNU General Public ↵nickc2007-07-261-4/+3
| | | | | | License and to point readers at the COPYING3 file and the FSF's license web page. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126948 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-11 Kenneth Zadeck <zadeck@naturalbridge.com>zadeck2007-07-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * toplev.c (no_new_pseudos): Deleted. * rtl.h (no_new_pseudos): Deleted. * tree-pass.h (pass_no_new_pseudos): Deleted. * passes.c (pass_no_new_pseudos): Deleted. * final.c (rest_of_clean_state): Removed no_new_pseudos. (rest_of_no_new_pseudos, pass_no_new_pseudos): Deleted. * struct-equiv.c (rtx_equiv_p): Replaced no_new_pseudos with reload_completed. * cfgcleanup.c (try_crossjump_to_edge): Ditto. * rtlhooks.c (gen_lowpart_general): Ditto. * optabs.c (prepare_operand): Ditto. * mode-switching.c (rest_of_handle_mode_switching): Deleted set of no_new_pseudos. * modulo-sched.c (rest_of_handle_sms): Ditto. * see.c (rest_of_handle_see): Ditto. * ifcvt.c (if_convert): Ditto. (gate_handle_if_after_combine): Replaced no_new_pseudos with reload_completed. * init-regs.c (gate_initialize_regs): Deleted set of no_new_pseudos. * lower-subreg.c (decompose_multiword_subregs): Ditto. * bb-reorder.c (rest_of_handle_partition_blocks): Ditto. * doc/md.texi: Changed no_new_pseudos to can_create_pseudo_p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126561 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-05 Paolo Bonzini <bonzini@gnu.org>bonzini2007-07-051-0/+1
| | | | | | | | | | | | | | * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, pass_match_asm_constraints): New. * passes.c (init_optimization_passes): Add new pass. * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. * function.h (struct function): Add has_asm_statement bit. (current_function_has_asm_statement): New. * tree-pass.h (pass_match_asm_constraints): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126385 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/31723uros2007-06-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hooks.c (hook_tree_tree_bool_null): New hook. * hooks.h (hook_tree_tree_bool_null): Add prototype. * tree-pass.h (pass_convert_to_rsqrt): Declare. * passes.c (init_optimization_passes): Add pass_convert_to_rsqrt. * tree-ssa-math-opts.c (execute_cse_reciprocals): Scan for a/func(b) and convert it to reciprocal a*rfunc(b). (execute_convert_to_rsqrt): New function. (gate_convert_to_rsqrt): New function. (pass_convert_to_rsqrt): New pass definition. * target.h (struct gcc_target): Add builtin_reciprocal. * target-def.h (TARGET_BUILTIN_RECIPROCAL): New define. (TARGET_INITIALIZER): Initialize builtin_reciprocal with TARGET_BUILTIN_RECIPROCAL. * doc/tm.texi (TARGET_BUILTIN_RECIPROCAL): Document. * config/i386/i386.h (TARGET_RECIP): New define. * config/i386/i386.md (divsf3): Expand by calling ix86_emit_swdivsf for TARGET_SSE_MATH and TARGET_RECIP when flag_unsafe_math_optimizations is set and not optimizing for size. (*rcpsf2_sse): New insn pattern. (*rsqrtsf2_sse): Ditto. (rsqrtsf2): New expander. Expand by calling ix86_emit_swsqrtsf for TARGET_SSE_MATH and TARGET_RECIP when flag_unsafe_math_optimizations is set and not optimizing for size. (sqrt<mode>2): Expand SFmode operands by calling ix86_emit_swsqrtsf for TARGET_SSE_MATH and TARGET_RECIP when flag_unsafe_math_optimizations is set and not optimizing for size. * config/i386/sse.md (divv4sf): Expand by calling ix86_emit_swdivsf for TARGET_SSE_MATH and TARGET_RECIP when flag_unsafe_math_optimizations is set and not optimizing for size. (*sse_rsqrtv4sf2): Do not export. (sqrtv4sf2): Ditto. (sse_rsqrtv4sf2): New expander. Expand by calling ix86_emit_swsqrtsf for TARGET_SSE_MATH and TARGET_RECIP when flag_unsafe_math_optimizations is set and not optimizing for size. (sqrtv4sf2): Ditto. * config/i386/i386.opt (mrecip): New option. * config/i386/i386-protos.h (ix86_emit_swdivsf): Declare. (ix86_emit_swsqrtsf): Ditto. * config/i386/i386.c (IX86_BUILTIN_RSQRTF): New constant. (ix86_init_mmx_sse_builtins): __builtin_ia32_rsqrtf: New builtin definition. (ix86_expand_builtin): Expand IX86_BUILTIN_RSQRTF using ix86_expand_unop1_builtin. (ix86_emit_swdivsf): New function. (ix86_emit_swsqrtsf): Ditto. (ix86_builtin_reciprocal): New function. (TARGET_BUILTIN_RECIPROCAL): Use it. (ix86_vectorize_builtin_conversion): Rename from ix86_builtin_conversion. (TARGET_VECTORIZE_BUILTIN_CONVERSION): Use renamed function. * doc/invoke.texi (Machine Dependent Options): Add -mrecip to "i386 and x86_64 Options" section. (Intel 386 and AMD x86_64 Options): Document -mrecip. testsuite/ChangeLog: PR middle-end/31723 * gcc.target/i386/recip-divf.c: New test. * gcc.target/i386/recip-sqrtf.c: Ditto. * gcc.target/i386/recip-vec-divf.c: Ditto. * gcc.target/i386/recip-vec-sqrtf.c: Ditto. * gcc.target/i386/sse-recip.c: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125756 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-06-12 Richard Guenther <rguenther@suse.de>rguenth2007-06-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | PR tree-optimization/15353 PR tree-optimization/31657 * passes.c (init_optimization_passes): Add pass_tree_ifcombine. * timevar.def: Add TV_TREE_IFCOMBINE. * tree-pass.h (pass_tree_ifcombine): Declare. * tree-ssa-ifcombine.c: New file. * tree-ssa-phiopt.c (blocks_in_phiopt_order): Export. * tree-flow.h (blocks_in_phiopt_order): Declare. * Makefile.in (OBJS-common): Add tree-ssa-ifcombine.o. (tree-ssa-ifcombine.o): New dependencies. * gcc.c-torture/execute/20070424-1.c: New testcase. * gcc.dg/tree-ssa/ssa-ifcombine-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ifcombine-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ifcombine-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ifcombine-4.c: Likewise. * gcc.dg/tree-ssa/ssa-ifcombine-5.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125644 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge dataflow branch into mainlinedberlin2007-06-111-6/+31
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125624 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-07 Razya Ladelsky <razya@il.ibm.com> razya2007-05-281-0/+1
| | | | | | | | | | | | | | | | | * matrix-reorg.c: New file. Implement matrix flattening and transposing optimization. * tree-pass.h: Add matrix reorg pass. * common.opt: Add fipa-mreorg flag. * Makefile.in: Add matrix-reorg.c. * passes.c: Add matrix reorg pass. * varpool.c (add_new_static_var): New function. * cgraph.h (add_new_static_var): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125126 138bc75d-0d04-0410-961f-82ee72b054a4
* * doc/passes.texi: Document predictive commoning.rakdver2007-05-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/invoke.texi (-fpredictive-commoning): Document. * opts.c (decode_options): Enable flag_predictive_commoning on -O3. * tree-ssa-loop-im.c (get_lsm_tmp_name): Export. Allow adding indices to the generated name. (schedule_sm): Pass 0 to get_lsm_tmp_name. * tree-ssa-loop-niter.c (stmt_dominates_stmt_p): Export. * tree-pretty-print.c (op_symbol_1): Renamed to ... (op_symbol_code): ... and exported. (dump_omp_clause, op_symbol): Use op_symbol_code instead of op_symbol_1. * tree-pass.h (pass_predcom): Declare. * timevar.def (TV_PREDCOM): New timevar. * tree-ssa-loop.c (run_tree_predictive_commoning, gate_tree_predictive_commoning, pass_predcom): New. * tree-data-ref.c (find_data_references_in_loop): Find the references in dominance order. (canonicalize_base_object_address): Ensure that the result has pointer type. (dr_analyze_innermost): Export. (create_data_ref): Code to fail for references with invariant address moved ... (find_data_references_in_stmt): ... here. * tree-data-ref.h (dr_analyze_innermost): Declare. * tree-affine.c: Include tree-gimple.h and hashtab.h. (aff_combination_find_elt, name_expansion_hash, name_expansion_eq, tree_to_aff_combination_expand, double_int_constant_multiple_p, aff_combination_constant_multiple_p): New functions. * tree-affine.h (aff_combination_constant_multiple_p, tree_to_aff_combination_expand): Declare. * tree-predcom.c: New file. * common.opt (fpredictive-commoning): New option. * tree-flow.h (op_symbol_code, tree_predictive_commoning, stmt_dominates_stmt_p, get_lsm_tmp_name): Declare. * Makefile.in (tree-predcom.o): Add. (tree-affine.o): Add TREE_GIMPLE_H dependency. * passes.c (init_optimization_passes): Add dceloop after copy propagation in loop optimizer. Add predictive commoning to loop optimizer passes. * gcc.dg/tree-ssa/predcom-1.c: New test. * gcc.dg/tree-ssa/predcom-2.c: New test. * gcc.dg/tree-ssa/predcom-3.c: New test. * gcc.dg/tree-ssa/predcom-4.c: New test. * gcc.dg/tree-ssa/predcom-5.c: New test. * gcc.dg/vect/dump-tree-dceloop-pr26359.c: Test dceloop2 dumps. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125030 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-vrp.c (finalize_jump_threads): Do not care about dominance info.rakdver2007-05-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (execute_vrp): Preserve loops through jump threading. * tree-ssa-threadupdate.c (thread_single_edge, dbds_continue_enumeration_p, determine_bb_domination_status, thread_through_loop_header): New functions. (create_edge_and_update_destination_phis, create_edge_and_update_destination_phis): Set loops for the new blocks. (prune_undesirable_thread_requests): Removed. (redirect_edges): Do not pretend that redirect_edge_and_branch can create new blocks. (thread_block): Do not call prune_undesirable_thread_requests. Update loops. (mark_threaded_blocks): Select edges to thread here. (thread_through_all_blocks): Take may_peel_loop_headers argument. Thread edges through loop headers independently. * cfgloopmanip.c (create_preheader, mfb_keep_just): Export. * tree-pass.h (TODO_mark_first_instance): New. (first_pass_instance): Declare. * cfghooks.c (duplicate_block): Put the block to the original loop if copy is not specified. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Preserve loops through jump threading. Pass may_peel_loop_headers to thread_through_all_blocks according to first_pass_instance. * cfgloop.h (create_preheader): Declare. * tree-flow.h (thread_through_all_blocks): Declaration changed. * basic-block.h (mfb_keep_just, mfb_kj_edge): Declare. * passes.c (first_pass_instance): New variable. (next_pass_1): Set TODO_mark_first_instance. (execute_todo): Set first_pass_instance. * gcc.dg/tree-ssa/ssa-dom-thread-2.c: New test. * gcc.dg/vect/vect-102.c, gcc.dg/vect/vect-103.c, gcc.dg/vect/vect-104.c: Use more complex construction to prevent vectorizing. * gcc.dg/tree-ssa/pr21559.c: Update outcome. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124786 138bc75d-0d04-0410-961f-82ee72b054a4
* * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Usehubicka2007-04-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | insn_locators_alloc instead of insn_locators_initialize; call reset_block_changes. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/sh/sh.c (sparc_output_mi_thunk): Likewise. * config/is64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * cfglyaout.c (set_curr_insn_source_location, set_curr_insn_block): tolerate uninitialized locator info. Re-apply: * function.c (init_function_start): Don't init line number info. (expand_function_end): Update. (reset_block_changes, record_block_change, finalize_block_changes, check_block_change, free_block_changes): Kill. * function.h (reset_block_changes, record_block_change, finalize_block_changes, check_block_change, free_block_changes): Remove prototypes. (struct function): Remove ib_boundaries_block. * emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw): Use curr_insn_locator to initialize locator. (emit_line_note): Remove. * cfgexpand.c (expand_gimple_cond_expr): Update. (construct_exit_block): Likewise. (tree_expand_cfg): Initialize/finalize locators. * expr.c (expand_expr_real): Update. * cfglayout.c (line_locators_locs, line_locators_lines, file_locators_locs, file_locators_files): Remove. (set_block_levels): Move to cfgexpand.c. (insn_locators_initialize): Remove. (pass_insn_locators_initialize): Remove. (locations_locators_locs, locations_locators_vals): New static vars. (curr_location, last_location, curr_block, last_block, curr_rtl_loc): Likewise. (insn_locators_alloc, insn_locators_finalize, set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator): New functions. (locator_location): New. (locator_line, locator_file): Rewrite. * rtl.h (emit_line_note): Kill. (insn_locators_alloc, insn_locators_finalize, set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator): Declare. * tree-inline.c (initialize_cfun): Do not initialize ib_boundaries_block. * passes.c (pass_insn_locators_initialize): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124258 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-04-24 Simon Martin <simartin@users.sourceforge.net>simartin2007-04-241-0/+3
| | | | | | | | | | | | | | PR diagnostic/25923 * tree-pass.h (TDF_DIAGNOSTIC): New dump control to specify that a diagnostic message is being built. * tree-pretty-print.c (dump_generic_node): Only write the formatted text into BUFFER's stream if we are not building a diagnostic message. * toplev.c (default_tree_printer): Pass TDF_DIAGNOSTIC to dump_generic_node. * Makefile.in (toplev.o): Depend on tree-pass.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124121 138bc75d-0d04-0410-961f-82ee72b054a4
* Revert:hubicka2007-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-04-23 Jan Hubicka <jh@suse.cz> * function.c (init_function_start): Don't init line number info. (expand_function_end): Update. (reset_block_changes, record_block_change, finalize_block_changes, check_block_change, free_block_changes): Kill. * function.h (reset_block_changes, record_block_change, finalize_block_changes, check_block_change, free_block_changes): Remove prototypes. (struct function): Remove ib_boundaries_block. * emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw): Use curr_insn_locator to initialize locator. (emit_line_note): Remove. * cfgexpand.c (expand_gimple_cond_expr): Update. (construct_exit_block): Likewise. (tree_expand_cfg): Initialize/finalize locators. * expr.c (expand_expr_real): Update. * cfglayout.c (line_locators_locs, line_locators_lines, file_locators_locs, file_locators_files): Remove. (set_block_levels): Move to cfgexpand.c. (insn_locators_initialize): Remove. (pass_insn_locators_initialize): Remove. (locations_locators_locs, locations_locators_vals): New static vars. (curr_location, last_location, curr_block, last_block, curr_rtl_loc): Likewise. (insn_locators_alloc, insn_locators_finalize, set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator): New functions. (locator_location): New. (locator_line, locator_file): Rewrite. * rtl.h (emit_line_note): Kill. (insn_locators_alloc, insn_locators_finalize, set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator): Declare. * tree-inline.c (initialize_cfun): Do not initialize ib_boundaries_block. * passes.c (pass_insn_locators_initialize): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124094 138bc75d-0d04-0410-961f-82ee72b054a4
* * function.c (init_function_start): Don't init line number info.hubicka2007-04-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (expand_function_end): Update. (reset_block_changes, record_block_change, finalize_block_changes, check_block_change, free_block_changes): Kill. * function.h (reset_block_changes, record_block_change, finalize_block_changes, check_block_change, free_block_changes): Remove prototypes. (struct function): Remove ib_boundaries_block. * emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw): Use curr_insn_locator to initialize locator. (emit_line_note): Remove. * cfgexpand.c (expand_gimple_cond_expr): Update. (construct_exit_block): Likewise. (tree_expand_cfg): Initialize/finalize locators. * expr.c (expand_expr_real): Update. * cfglayout.c (line_locators_locs, line_locators_lines, file_locators_locs, file_locators_files): Remove. (set_block_levels): Move to cfgexpand.c. (insn_locators_initialize): Remove. (pass_insn_locators_initialize): Remove. (locations_locators_locs, locations_locators_vals): New static vars. (curr_location, last_location, curr_block, last_block, curr_rtl_loc): Likewise. (insn_locators_alloc, insn_locators_finalize, set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator): New functions. (locator_location): New. (locator_line, locator_file): Rewrite. * rtl.h (emit_line_note): Kill. (insn_locators_alloc, insn_locators_finalize, set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator): Declare. * tree-inline.c (initialize_cfun): Do not initialize ib_boundaries_block. * passes.c (pass_insn_locators_initialize): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124061 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-04-18 Richard Guenther <rguenther@suse.de>rguenth2007-04-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | PR tree-optimization/19431 PR tree-optimization/21463 * tree-pass.h (pass_phiprop): Declare. * passes.c (init_optimization_passes): New phiprop pass. * tree-ssa-forwprop.c (struct phiprop_d): New structure. (phivn_valid_p): New helper function. (phiprop_insert_phi): Likewise. (propagate_with_phi): Likewise. (tree_ssa_phiprop): New propagator propagating loads through phi nodes if profitable. * gcc.c-torture/execute/20070212-1.c: New testcase. * gcc.c-torture/execute/20070212-2.c: Likewise. * gcc.c-torture/execute/20070212-3.c: Likewise. * gcc.dg/tree-ssa/pr19431.c: Likewise. * gcc.dg/tree-ssa/pr21463.c: Likewise. * g++.dg/tree-ssa/pr21463.C: Likewise. * g++.dg/tree-ssa/pr30738.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123946 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-pass.h (pass_into_cfg_layout_mode,steven2007-03-121-0/+3
| | | | | | | | | | | pass_outof_cfg_layout_mode): Declare. * cfglayout.c (into_cfg_layout_mode, outof_cfg_layout_mode, pass_into_cfg_layout_mode, pass_outof_cfg_layout_mode): New. * passes.c (pass_into_cfg_layout_mode): Schedule before jump2. (pass_outof_cfg_layout_mode): Schedule after pass_rtl_ifcvt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122858 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-pass.h (TODO_update_smt_usage): Remove.dnovillo2007-03-101-4/+0
| | | | | | | | | | | Update all users. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Remove argument SOME. Update all users. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122787 138bc75d-0d04-0410-961f-82ee72b054a4
* * doc/loop.texi: Document the Omega linear constraints solver.spop2007-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/invoke.texi: Document -fcheck-data-deps, omega-max-vars, omega-max-geqs, omega-max-eqs, omega-max-wild-cards, omega-hash-table-size, omega-max-keys, and omega-eliminate-redundant-constraints. * tree-pass.h (pass_check_data_deps): Declared. * omega.c: New. * omega.h: New. * timevar.def (TV_CHECK_DATA_DEPS): Declared. * tree-ssa-loop.c (check_data_deps, gate_check_data_deps, pass_check_data_deps): New. * tree-data-ref.c (init_data_ref): Remove declaration. (dump_data_dependence_relation): Dump DDR_INNER_LOOP. (analyze_array): Renamed init_array_ref, move up initializations. (init_data_ref): Renamed init_pointer_ref. Moved before its call. Removed arguments that are set to NULL. (analyze_indirect_ref): Correct indentation, correct call to init_pointer_ref. (object_analysis): Call init_array_ref instead of analyze_array. (initialize_data_dependence_relation): Initialize DDR_INNER_LOOP. (access_functions_are_affine_or_constant_p): Use DR_ACCESS_FNS instead of DR_ACCESS_FNS_ADDR. (init_omega_eq_with_af, omega_extract_distance_vectors, omega_setup_subscript, init_omega_for_ddr_1, init_omega_for_ddr, ddr_consistent_p): New. (compute_affine_dependence): Check consistency of ddrs when flag_check_data_deps is passed. (analyze_all_data_dependences): Uncomment. (tree_check_data_deps): New. * tree-data-ref.h: Include omega.h. (DR_ACCESS_FNS_ADDR): Removed. (data_dependence_relation): Add inner_loop. (DDR_INNER_LOOP): New. * common.opt (fcheck-data-deps): New. * tree-flow.h (tree_check_data_deps): Declare. * Makefile.in (TREE_DATA_REF_H): Depend on omega.h. (OBJS-common): Depend on omega.o. (omega.o): Define. * passes.c (pass_check_data_deps): Scheduled. * params.def (PARAM_OMEGA_MAX_VARS, PARAM_OMEGA_MAX_GEQS, PARAM_OMEGA_MAX_EQS, PARAM_OMEGA_MAX_WILD_CARDS, PARAM_OMEGA_HASH_TABLE_SIZE, PARAM_OMEGA_MAX_KEYS, PARAM_VECT_MAX_VERSION_CHECKS, PARAM_OMEGA_ELIMINATE_REDUNDANT_CONSTRAINTS): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122749 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-sra.c (early_sra): New.rth2007-02-141-0/+1
| | | | | | | | | (decl_can_be_decomposed_p): Deny va_list if early_sra. (tree_sra_early, pass_sra_early): New. * tree-pass.h (pass_sra_early): Declare. * passes.c (init_optimization_passes): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121953 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (passes.o, ipa-inline.o): Add dependencies.hubicka2007-02-091-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cgraphbuild.c (build_cgraph_edges): Compute frequencies. (rebuild_cgraph_edges): Likewise. * cgraph.c (cgraph_set_call_stmt): Add new argument frequency. (dump_cgraph_node): Dump frequencies. (cgraph_clone_edge): Add frequency scales. (cgraph_clone_node): Add freuqnecy. * cgraph.h (cgraph_edge): Add freuqnecy argument. (CGRAPH_FREQ_BASE, CGRAPH_FREQ_MAX): New constants. (cgraph_create_edge, cgraph_clone_edge, cgraph_clone_node): Update. * tree-pass.h (TODO_rebuild_frequencies): New constant. * cgraphunit.c (verify_cgraph_node): Verify frequencies. (cgraph_copy_node_for_versioning): Update call of cgraph_clone_edge. (save_inline_function_body): Likewise. * ipa-inline.c: inluce rtl.h (cgraph_clone_inlined_nods): Update call of cgraph_clone_node. (cgraph_edge_badness): Use frequencies. (cgraph_decide_recursive_inlining): Update clonning. (cgraph_decide_inlining_of_small_function): Dump frequency. * predict.c (estimate_bb_frequencies): Export. * predict.h (estimate_bb_frequencies): Declare. * tree-inline.c (copy_bb): Watch overflows. (expand_call_inline): Update call of cgraph_create_edge. (optimize_inline_calls): Use TODO flags to update frequnecies. * passes.h: Include predict.h (init_optimization_passes): Move profile ahead. (execute_function_todo): Handle TODO_rebuild_frequencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121780 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/:ian2007-02-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lower-subreg.c: New file. * rtl.def (CONCATN): Define. * passes.c (init_optimization_passes): Add pass_lower_subreg and pass_lower_subreg2. * emit-rtl.c (update_reg_offset): New static function, broken out of gen_rtx_REG_offset. (gen_rtx_REG_offset): Call update_reg_offset. (gen_reg_rtx_offset): New function. * regclass.c: Revert patch of 2006-03-05, restoring reg_scan_update. (clear_reg_info_regno): New function. * dwarf2out.c (concatn_loc_descriptor): New static function. (loc_descriptor): Handle CONCATN. * common.opt (fsplit_wide_types): New option. * opts.c (decode_options): Set flag_split_wide_types when optimizing. * timevar.def (TV_LOWER_SUBREG): Define. * rtl.h (gen_reg_rtx_offset): Declare. (reg_scan_update): Declare. * regs.h (clear_reg_info_regno): Declare. * tree-pass.h (pass_lower_subreg): Declare. (pass_lower_subreg2): Declare. * doc/invoke.texi (Option Summary): List -fno-split-wide-types. (Optimize Options): Add -fsplit-wide-types to -O1 list. Document -fsplit-wide-types. * doc/rtl.texi (Regs and Memory): Document concat and concatn. * Makefile.in (OBJS-common): Add lower-subreg.o. (lower-subreg.o): New target. gcc/testsuite/: * gcc.dg/lower-subreg-1.c (test): New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121453 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-01-22 Richard Guenther <rguenther@suse.de>rguenth2007-01-221-0/+1
| | | | | | | | | | | | | | | | | | PR tree-optimization/30038 * tree-ssa-math-opts.c (maybe_record_sincos): New static helper function. (execute_cse_sincos_1): Likewise. (execute_cse_sincos): Likewise. (gate_cse_sincos): Likewise. (pass_cse_sincos): New pass CSEing sin() and cos() calls using the cexpi() canonicalization of sincos(). * tree-pass.h (pass_cse_sincos): Declare. * passes.c (init_optimization_passes): New pass pas_cse_sincos. * gcc.dg/builtins-62.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121052 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.h (cgraph_decide_inlining_incrementally): Kill.hubicka2007-01-161-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree-pass.h: Reorder to make IPA passes appear toegher. (pass_early_inline, pass_inline_parameters, pass_apply_inline): Declare. * cgraphunit.c (cgraph_finalize_function): Do not compute inling parameters, do not call early inliner. * ipa-inline.c: Update comments. Include tree-flow.h (cgraph_decide_inlining): Do not compute inlining parameters. (cgraph_decide_inlining_incrementally): Return TODOs; assume to be called with function context set up. (pass_ipa_inline): Remove unreachable functions before pass. (cgraph_early_inlining): Simplify assuming to be called from the PM as local pass. (pass_early_inline): New pass. (cgraph_gate_ipa_early_inlining): New gate. (pass_ipa_early_inline): Turn into simple wrapper. (compute_inline_parameters): New function. (gate_inline_passes): New gate. (pass_inline_parameters): New pass. (apply_inline): Move here from tree-optimize.c (pass_apply_inline): New pass. * ipa.c (cgraph_remove_unreachable_nodes): Verify cgraph after transforming. * tree-inline.c (optimize_inline_calls): Return TODOs rather than doing them by hand. (tree_function_versioning): Do not allocate dummy struct function. * tree-inline.h (optimize_inline_calls): Update prototype. * tree-optimize.c (execute_fixup_cfg): Export. (pass_fixup_cfg): Remove (tree_rest_of_compilation): Do not apply inlines. * tree-flow.h (execute_fixup_cfg): Declare. * Makefile.in (gt-passes.c): New. * passes.c: Include gt-passes.h (init_optimization_passes): New passes. (nnodes, order): New static vars. (do_per_function_toporder): New function. (execute_one_pass): Dump current pass here. (execute_ipa_pass_list): Don't dump current pass here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120835 138bc75d-0d04-0410-961f-82ee72b054a4
* PR tree-optimization/1046hubicka2007-01-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree-tailcall.c (suitable_for_tail_call_opt_p): Use TREE_ADDRESSABLE when alias info is not ready. (pass_tail_recursion): Do not require aliasing. * tree-ssa-copyrename.c (pass_rename_ssa_cop): Likewise. * tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Likewise. * tree-ssa-copy.c (pass_copy_prop): Likewise. * tree-ssa-forwprop.c (pass_forwprop): Likewise. * tree-ssa-dce.c (pass_dce, pass_dce_loop, pass_cd_dce): Likewise. * passes.c (init_optimization_passes): Execute rename_ssa_copies, ccp, forwprop, copy_prop, merge_phi, copy_prop, dce and tail recursion before inlining. * tree-ssa-operands.c (add_virtual_operand, get_indirect_ref_operand): When aliasing is not build, mark statement as volatile. * gcc.dg/tree-ssa/tailrecursion-4.c: Update dump file. * gcc.dg/tree-ssa/tailrecursion-1.c: Update dump file. * gcc.dg/tree-ssa/tailrecursion-2.c: Update dump file. * gcc.dg/tree-ssa/tailrecursion-3.c: Update dump file. * gcc.dg/tree-ssa/pr21658.c: Likewise. * gcc.dg/tree-ssa/pr15349.c: Likewise. * gcc.dg/tree-ssa/pr25501.c: Likewise. * gcc.dg/tree-ssa/vrp11.c: Make more complex so it still test transformation in question. * gcc.dg/tree-ssa/vrp05.c: Likewise. * gcc.dg/tree-ssa/pr20701.c: Likewise. * gcc.dg/always_inline3.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120681 138bc75d-0d04-0410-961f-82ee72b054a4