gcc/gcc/tree-pass.h

638 lines
25 KiB
C
Raw Normal View History

/* Definitions for describing one tree-ssa optimization pass.
Make-lang.in, [...]: Update copyright years. * ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, calls.c, c-common.c, cgraph.h, collect2.h, config/alpha/alpha.c, config/alpha/alpha.md, config/alpha/predicates.md, config/arm/arm.md, config/arm/lib1funcs.asm, config/arm/neon-schedgen.ml, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin.c, config/darwin9.h, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cpuid.h, config/i386/cygming.h, config/i386/cygwin.h, config/i386/mingw32.h, config/i386/msformat-c.c, config/i386/sol2-10.h, config/i386/xopintrin.h, config/ia64/ia64.c, config/ia64/ia64.md, config/ia64/sync.md, config/mep/mep.c, config/mips/mips.md, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.md, config/rs6000/aix.h, config/rs6000/dfp.md, config/rs6000/rs6000-builtin.def, config/rs6000/rs6000-c.c, config/rs6000/vector.md, config/rtems.h, config/rx/rx.md, config/s390/s390.md, config/sol2-c.c, config/sparc/sol2-bi.h, config/sparc/sol2-gas.h, config/sparc/sparc.h, config/sparc/sparc.md, config/sparc/sparc-protos.h, config/spu/spu.c, config/spu/spu-c.c, config/t-darwin, convert.c, c.opt, c-opts.c, cp/Make-lang.in, c-pretty-print.c, c-typeck.c, df-core.c, df-scan.c, diagnostic.c, diagnostic.h, doc/cppopts.texi, doc/cpp.texi, doc/extend.texi, doc/gimple.texi, doc/languages.texi, doc/plugins.texi, doc/rtl.texi, doc/standards.texi, doc/tree-ssa.texi, doc/trouble.texi, dominance.c, fold-const.c, fortran/Make-lang.in, fwprop.c, gcc-plugin.h, gensupport.c, gimple.h, gimple-iterator.c, graphite.c, graphite-clast-to-gimple.c, graphite-clast-to-gimple.h, graphite-dependences.c, graphite-poly.c, graphite-poly.h, graphite-ppl.c, graphite-ppl.h, graphite-scop-detection.c, graphite-sese-to-poly.c, graphite-sese-to-poly.h, ifcvt.c, intl.c, intl.h, ipa.c, ipa-cp.c, ipa-inline.c, ipa-prop.c, ipa-prop.h, ipa-pure-const.c, ipa-reference.c, ipa-type-escape.c, ira-color.c, ira-conflicts.c, ira-lives.c, java/Make-lang.in, lambda-code.c, loop-invariant.c, lto/Make-lang.in, lto-streamer.h, lto-streamer-in.c, objc/Make-lang.in, objcp/Make-lang.in, omp-low.c, optc-gen.awk, opt-functions.awk, opth-gen.awk, params.def, passes.c, postreload-gcse.c, print-tree.c, recog.c, regrename.c, reload.h, rtl.def, sched-int.h, sched-rgn.c, sel-sched-dump.c, sese.c, sese.h, store-motion.c, stor-layout.c, tree-cfgcleanup.c, tree-chrec.c, tree-complex.c, tree-data-ref.c, tree.def, tree-eh.c, tree-flow.h, tree-flow-inline.h, tree.h, tree-loop-distribution.c, tree-outof-ssa.c, tree-parloops.c, tree-pass.h, tree-predcom.c, tree-profile.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-manip.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-pre.c, tree-ssa-sccvn.c, tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-loop.c, tree-vectorizer.h, tree-vect-slp.c, tree-vrp.c, unwind-dw2-fde-darwin.c, varpool.c: Update copyright years. From-SVN: r157950
2010-04-02 21:54:46 +02:00
Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_TREE_PASS_H
#define GCC_TREE_PASS_H 1
df.h: Include "timevar.h". * df.h: Include "timevar.h". (struct df_problem): Change tv_id field to timevar_id_t. * tree-pass.h: Include "timevar.h". (struct opt_pass): Change tv_id field to timevar_id_t. * timevar.h (timevar_id_t): Define TV_NONE. * passes.c (execute_one_ipa_transform_pass): Check for tv_id != TV_NONE rather than tv_id != 0. (execute_one_pass): Likewise. * Makefile.in (DF_H): Add $(TIMEVAR_H). (TREE_PASS_H): Define. Change all instances of tree-pass.h in dependencies to $(TREE_PASS_H). * bt-load.c (pass_branch_target_load_optimize1): Set tv_id field to TV_NONE. (pass_branch_target_load_optimize2): Likewise. * cfglayout.c (pass_into_cfg_layout_mode): Likewise. (pass_outof_cfg_layout_mode): Likewise. * cgraphbuild.c (pass_remove_cgraph_callee_edges): Likewise. (pass_rebuild_cgraph_edges): Likewise. (pass_remove_cgraph_callee_edges): Likewise. * df-core.c (pass_df_initialize_opt): Likewise. (pass_df_initialize_no_opt): Likewise. (pass_df_finish): Likewise. * emit-rtl.c (pass_unshare_all_rtl): Likewise. * except.c (pass_set_nothrow_function_flags): Likewise. (pass_convert_to_eh_region_ranges): Likewise. * final.c (pass_compute_alignments): Likewise. * function.c (pass_instantiate_virtual_regs): Likewise. (pass_init_function): Likewise. (pass_leaf_regs): Likewise. (pass_match_asm_constraints): Likewise. * gimple-low.c (pass_lower_cf): Likewise. (pass_mark_used_blocks): Likewise. * init-regs.c (pass_initialize_regs): Likewise. * integrate.c (pass_initial_value_sets): Likewise. * ira.c (pass_ira): Likewise. * jump.c (pass_cleanup_barriers): Likewise. * omp-low.c (pass_expand_omp): Likewise. (pass_lower_omp): Likewise. * matrix-reorg.c (pass_ipa_matrix_reorg): Likewise. * recog.c (pass_split_all_insns): Likewise. (pass_split_after_reload): Likewise. (pass_split_before_regstack): Likewise. (pass_split_before_sched2): Likewise. (pass_split_for_shorten_branches): Likewise. * reginfo.c (pass_reginfo_init): Likewise. (pass_subregs_of_mode_init): Likewise. (pass_subregs_of_mode_finish): Likewise. * passes.c (pass_postreload): Likewise. * stack-ptr-mod.c (pass_stack_ptr_mod): Likewise. * tree-cfg.c (pass_remove_useless_stmts): Likewise. (pass_warn_function_return): Likewise. (pass_warn_function_noreturn): Likewise. * tree-complex.c (pass_lower_complex): Likewise. (pass_lower_complex_O0): Likewise. * tree-if-conv.c (pass_if_conversion): Likewise. * tree-into-ssa.c (pass_build_ssa): Likewise. * tree-mudflap.c (pass_mudflap_1): Likewise. (pass_mudflap_2): Likewise. * tree-nomudflap.c (pass_mudflap_1): Likewise. (pass_mudflap_2): Likewise. * tree-nrv.c (pass_return_slot): Likewise. * tree-object-size.c (pass_object_sizes): Likewise. * tree-optimize.c (pass_all_optimizations): Likewise. (pass_early_local_passes): Likewise. (pass_all_early_optimizations): Likewise. (pass_cleanup_cfg): Likewise. (pass_cleanup_cfg_post_optimizing): Likewise. (pass_free_datastructures): Likewise. (pass_free_cfg_annotations): Likewise. (pass_fixup_cfg): Likewise. (pass_init_datastructures): Likewise. * tree-ssa.c (pass_early_warn_uninitialized): Likewise. (pass_late_warn_uninitialized): Likewise. (pass_update_address_taken): Likewise. * tree-ssa-ccp.c (pass_fold_builtins): Likewise. * tree-ssa-math-opts.c (pass_cse_reciprocals): Likewise. (pass_cse_sincos): Likewise. (pass_convert_to_rsqrt): Likewise. * tree-ssa-structalias.c (pass_build_alias): Likewise. * tree-stdarg.c (pass_stdarg): Likewise. * tree-tailcall.c (pass_tail_recursion): Likewise. (pass_tail_calls): Likewise. * tree-vect-generic.c (pass_lower_vector): Likewise. (pass_lower_vector_ssa): Likewise. * tree-vectorizer.c (pass_ipa_increase_alignment): Likewise. From-SVN: r146222
2009-04-17 07:40:46 +02:00
#include "timevar.h"
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
/* Different tree dump places. When you add new tree dump places,
extend the DUMP_FILES array in tree-dump.c. */
enum tree_dump_index
{
TDI_none, /* No dump */
passes.c (register_one_dump_file): Accept the current properties instead of pass number. 2006-02-08 Paolo Bonzini <bonzini@gnu.org> * passes.c (register_one_dump_file): Accept the current properties instead of pass number. Adjust call to dump_register. Remove duplicated code. (register_dump_files): Now a wrapper around... (register_dump_files_1): ... this one. Do not modify the pass structure. (next_pass_1): Cosmetic fix. (execute_todo): Keep second parameter only. Use curr_properties instead of fetching it from the pass structure. Check and set last_verified. (execute_one_pass): Handle TODO_set_props. Use curr_properties instead of fetching it from the pass structure. Fix calls to execute_todo. Update curr_properties and initialize .vcg RTL dump after running the pass. Reset last_verified. * tree-dump.c (dump_files): Renumber consecutively. Put .cgraph dump at the beginning. (FIRST_AUTO_NUMBERED_DUMP): New. (dump_register): Remove "num" parameter, assign it within the function. (get_dump_file_name): Modify template for dumps. * tree-dump.h (dump_register): Adjust prototype. * tree-pass.h (enum tree_dump_index): Move cgraph at the beginning. (PROP_trees): Add PROP_gimple_lomp. (TODO_set_props): New. * gimple-low.c (pass_lower_cf): Do not destroy PROP_gimple_lcf. * tree-eh.c (pass_lower_eh): Do not destroy PROP_gimple_leh. * cfgexpand.c (pass_expand): Destroy PROP_trees. gcc/testsuite: 2006-02-08 Paolo Bonzini <bonzini@gnu.org> * lib/gcc-dg.exp (cleanup-rtl-dump, cleanup-tree-dump, cleanup-ipa-dump): Update dump file glob patterns. * lib/scantree.exp (scan-tree-dump, scan-tree-dump-times, scan-tree-dump-not, scan-tree-dump-dem): Likewise. * lib/scanipa.exp (scan-ipa-dump, scan-ipa-dump-times, scan-ipa-dump-not, scan-ipa-dump-dem): Likewise. * lib/scanrtl.exp: New. * lib/gcc-dg.exp: Load it. * objc.dg/stubify-2.m: Use scan-rtl-dump-not. From-SVN: r110742
2006-02-08 09:13:20 +01:00
TDI_cgraph, /* dump function call graph. */
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
TDI_tu, /* dump the whole translation unit. */
TDI_class, /* dump class hierarchy. */
TDI_original, /* dump each function before optimizing it */
TDI_generic, /* dump each function after genericizing it */
TDI_nested, /* dump each function after unnesting it */
TDI_vcg, /* create a VCG graph file for each
function's flowgraph. */
TDI_ada, /* dump declarations in Ada syntax. */
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
TDI_tree_all, /* enable all the GENERIC/GIMPLE dumps. */
TDI_rtl_all, /* enable all the RTL dumps. */
TDI_ipa_all, /* enable all the IPA dumps. */
TDI_end
};
/* Bit masks to control dumping. Not all values are applicable to
all dumps. Add new ones at the end. When you define new
values, extend the DUMP_OPTIONS array in tree-dump.c */
#define TDF_ADDRESS (1 << 0) /* dump node addresses */
#define TDF_SLIM (1 << 1) /* don't go wild following links */
#define TDF_RAW (1 << 2) /* don't unparse the function */
#define TDF_DETAILS (1 << 3) /* show more detailed info about
each pass */
#define TDF_STATS (1 << 4) /* dump various statistics about
each pass */
#define TDF_BLOCKS (1 << 5) /* display basic block boundaries */
#define TDF_VOPS (1 << 6) /* display virtual operands */
#define TDF_LINENO (1 << 7) /* display statement line numbers */
#define TDF_UID (1 << 8) /* display decl UIDs */
#define TDF_TREE (1 << 9) /* is a tree dump */
#define TDF_RTL (1 << 10) /* is a RTL dump */
#define TDF_IPA (1 << 11) /* is an IPA dump */
#define TDF_STMTADDR (1 << 12) /* Address of stmt. */
#define TDF_GRAPH (1 << 13) /* a graph dump is being emitted */
[multiple changes] 2006-12-11 Diego Novillo <dnovillo@redhat.com> * doc/tree-ssa.texi: Update documentation for virtual operands and the use of push_stmt_changes/pop_stmt_changes. * doc/invoke.texi: Remove documentation for params global-var-threshold. Update documentation on max-aliased-vops. * tree-into-ssa.c: Cleanup comments, variables and spacing in various functions. (regs_to_rename): Declare. (mem_syms_to_rename): Declare. (dump_update_ssa): Declare. (debug_update_ssa): Declare. (dump_names_replaced_by): Declare. (debug_names_replaced_by): Declare. (dump_def_blocks): Declare. (debug_def_blocks): Declare. (dump_defs_stack): Declare. (debug_defs_stack): Declare. (dump_currdefs): Declare. (debug_currdefs): Declare. (mark_def_sites): Do not handle virtual operands. (compute_idf): Rename from find_idf. Update users. (register_new_def): Make local. Convert second argument to 'tree'. Use BLOCK_DEFS_STACK directly. If pushing a non-register, also push the underlying symbol. (rewrite_stmt): Do not handle virtual operands. (dump_tree_ssa): Call dump_def_blocks, dump_defs_stack, dump_currdefs and dump_tree_ssa_stats. (dump_tree_ssa_stats): Also dump REPL_TBL. (replace_use): Remove. Update all users to call SET_USE instead. (rewrite_blocks): Move code to free memory to fini_ssa_renamer. (mark_def_site_blocks): Move initialization code to init_ssa_renamer. (init_ssa_renamer): New. (fini_ssa_renamer): New. (rewrite_into_ssa): Call them. (prepare_block_for_update): Process SSA_OP_ALL_USES first and SSA_OP_ALL_DEFS later. Do not process virtual operands separately. (dump_update_ssa): Call dump_decl_set. (init_update_ssa): Initialize regs_to_rename and mem_syms_to_rename. Call init_ssa_renamer. (delete_update_ssa): Call fini_ssa_renamer. Free blocks_with_phis_to_rewrite. (mark_sym_for_renaming): If the variable has sub-variables, also mark them. If the variable belongs to a partition, also mark it. (mark_set_for_renaming): Call mark_sym_for_renaming on every symbol in the set. (switch_virtuals_to_full_rewrite): Call mark_set_for_renaming. (update_ssa): Separate syms_to_rename into regs_to_rename and mem_syms_to_rename. * tree-dump.c (dump_options): Add TDF_MEMSYMS. * tree-pretty-print.c (debug_generic_expr): Add TDF_MEMSYMS. (debug_generic_stmt): Likewise. (debug_tree_chain): Likewise. (dump_symbols): New. (dump_generic_node): Check for TDF_MEMSYMS. Handle MEMORY_PARTITION_TAG. If the statement references memory and TDF_MEMSYMS is given, call dump_symbols. Indicate default names with (D). (dump_vops): Update for new virtual operator format. * tree.c (init_ttree): Add MEMORY_PARTITION_TAG to tree_contains_struct. (tree_code_size): Handle MEMORY_PARTITION_TAG. (tree_node_structure): Likewise. (needs_to_live_in_memory): Handle SSA names. * tree.h (MTAG_P): Likewise. (struct tree_memory_partition_tag): Declare. (MPT_SYMBOLS): Define. (union tree_node): Add field 'mpt'. * treestruct.def (TS_MEMORY_PARTITION_TAG): Define. * tree.def (MEMORY_PARTITION_TAG): Define. * tree-pass.h (TDF_MEMSYMS): Define. * params.h (GLOBAL_VAR_THRESHOLD): Remove. * tree-ssa-alias.c: Include pointer-set.h (struct alias_map_d): Remove fields total_alias_vops, grouped_p and may_aliases. Update all users. (struct mp_info_def): Declare. (mp_info_t): New type. (get_smt_for): Rename from get_tmt_for. Update all users. (add_may_alias): Add argument ALREADY_ADDED. If given, use it to avoid adding duplicate entries to alias sets. (replace_may_alias): Remove. Update all users. (total_alias_vops_cmp): Remove. Update all users. (group_aliases_into): Remove. Update all users. (tree_pointer_compare): Remove. Update all users. (compact_name_tags): Remove. Update all users. (group_aliases): Remove. Update all users. (mark_non_addressable): Move from tree-flow-inline.h. Remove the symbol from the partition holding it, if needed. (dump_mp_info): New. (debug_mp_info): New. (sort_mp_info): New. (create_partition_for): New. (rewrite_alias_set_for): New. (compute_memory_partitions): New. (compute_may_aliases): Call it. (init_alias_info): If computing aliases for the first time, mark every memory symbol for renaming. (have_common_aliases_p): New. (compute_flow_insensitive_aliasing): Call it. (setup_pointers_and_addressables): Do not cache num_referenced_vars. For register promoted symbols, mark their former partition for renaming. (maybe_create_global_var): Only create .GLOBAL_VAR if there are no call-clobbered variables and a mix of pure and non-pure functions were found. (may_alias_p): Tidy comments. (create_tag_raw): Remove unused variable new_type. (dump_alias_info): call dump_memory_partitions. (dump_points_to_info_for): Call dump_decl_set. (may_be_aliased): Tidy comments and formatting. * timevar.def (TV_MEMORY_PARTITIONING): Define. * tree-vectorizer.c (vect_memsyms_to_rename): Rename from vect_vnames_to_rename. Set DECL_UIDs instead of SSA name versions in it. (slpeel_update_phi_nodes_for_guard1): Ignore memory PHIs. * tree-vect-transform.c (vect_transform_loop): Call mark_set_for_renaming with vect_memsyms_to_rename. * tree-flow-inline.h (zero_imm_uses_p): New. (memory_partition): New. (set_memory_partition): New. (factoring_name_p): New. (symbol_mem_tag): New. Update every function that used to access the annotation directly. (set_symbol_mem_tag): Likewise. * tree-ssa-copy.c (may_propagate_copy): Allow copies between a partition and a symbol as long as the symbol belongs to the partition. (merge_alias_info): Ignore merge requests when memory partitions are involved. * tree-ssa.c (verify_ssa_name): Check that default definitions have empty defining statements. (verify_use): Remove argument IS_VIRTUAL. Don't call verify_ssa_name. (verify_phi_args): Call verify_ssa_name. (verify_flow_insensitive_alias_info): Handle MPTs. (verify_flow_sensitive_alias_info): Likewise. (verify_name_tags): Likewise. (verify_call_clobbering): Likewise. (verify_ssa): Check for VOPs only after aliasing information is available. Check virtuals and real operands separately. Call verify_ssa_name on every operand. (stmt_references_memory_p): Move to tree-ssa-operands.c. (walk_use_def_chains_1): Guard against NULL PHI arguments. * tree-ssa-operands.c (stmt_references_memory_p): Move from tree-ssa.c. (get_mpt_for): New. (dump_memory_partitions): New. (debug_memory_partitions): New. * tree-flow.h (struct var_ann_d): Add field mpt. (struct stmt_ann_d): Add bitfield references_memory. * Makefile.in (tree-ssa-structalias.o): Include pointer-set.h (tree-ssa-alias.o): Likewise. * tree-ssa-structalias.c: (update_alias_info): Use STORED_SYMS to determine which variables are being written to by the store operation. * tree-ssa-structalias.h (struct alias_info) <total_alias_vops>: Remove. Update all users. <written_vars>: Change to a pointer set. Update all users. <dereferenced_ptrs_store>: Likewise. <dereferenced_ptrs_load>: Likewise. (NUM_REFERENCES): Remove. Update all users. (NUM_REFERENCES_CLEAR): Remove. Update all users. (NUM_REFERENCES_INC): Remove. Update all users. (NUM_REFERENCES_SET): Remove. Update all users. * params.def (PARAM_GLOBAL_VAR_THRESHOLD): Remove. Update all users. (PARAM_MAX_ALIASED_VOPS): Set to 10. * tree-ssanames.c (make_ssa_name): Initialize SSA_NAME_IS_DEFAULT_DEF to 0. 2006-12-11 Aldy Hernandez <aldyh@redhat.com> * tree-ssa-dse.c (aggregate_vardecl_d): New. (dse_global_data): Add aggregate_vardecl field. (dse_possible_dead_store_p): New. Add prev_defvar variable. Allow immediate uses and previous immediate uses to differ if they are setting different parts of the whole. (get_aggregate_vardecl): New. (dse_record_partial_aggregate_store): New. (dse_whole_aggregate_clobbered_p): New. (dse_partial_kill_p): New. (dse_optimize_stmt): Abstract code checking a possible dead store into new function dse_possible_dead_store_p(). Call dse_maybe_record_aggregate_store(). When checking whether a STMT and its USE_STMT refer to the same memory address, check also for partial kills that clobber the whole. Move some variable definitions to the block where they are used. (aggregate_vardecl_hash): New. (aggregate_vardecl_eq): New. (aggregate_vardecl_free): New. (aggregate_whole_store_p): New. (tree_ssa_dse): Initialize and free aggregate_vardecl. Mark which aggregate stores we care about. 2006-12-11 Andrew Macleod <amacleod@redhat.com> * tree-ssa-operands.h (struct vuse_element_d): Declare. (vuse_element_t): Declare. (struct vuse_vec_d): Declare. (vuse_vec_p): Declare. (VUSE_VECT_NUM_ELEM): Define. (VUSE_VECT_ELEMENT_NC): Define. (VUSE_ELEMENT_PTR_NC): Define. (VUSE_ELEMENT_VAR_NC): Define. (VUSE_VECT_ELEMENT): Define. (VUSE_ELEMENT_PTR): Define. (VUSE_ELEMENT_VAR): Define. (struct maydef_optype_d) <use_var>: Remove. <use_ptr>: Remove. <usev>: Add. (struct vuse_optype_d) <kill_var>: Remove. <use_ptr>: Remove. <usev>: Add. (struct mustdef_optype_d) <kill_var>: Remove. <use_ptr>: Remove. <usev>: Add. (VUSE_OP_PTR): Add argument. Use VUSE_ELEMENT_PTR. (VUSE_OP): Add argument. Use VUSE_ELEMENT_PTR. (VUSE_NUM): Define. (VUSE_VECT): Define. (MAYDEF_OP_PTR): Add argument. Use VUSE_OP_PTR. (MAYDEF_OP): Add argument. Use VUSE_OP. (MAYDEF_NUM): Define. (MAYDEF_VECT): Define. (MUSTDEF_KILL_PTR): Use VUSE_OP_PTR. (MUSTDEF_KILL): Use VUSE_OP. (MUSTDEF_NUM): Define. (MUSTDEF_VECT): Define. (realloc_maydef): Declare. (realloc_vuse): Declare. (struct ssa_operand_iterator_d) <vuse_index>: Add. <mayuse_index>: Add. (LOADED_SYMS): Define. (STORED_SYMS): Define. (FOR_EACH_SSA_MUSTDEF_OPERAND): Call op_iter_next_mustdef. * tree-into-ssa.c: Adapt for multi-operand V_MAY_DEF and VUSE operators. * tree-pretty-print.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-flow-inline.h: Likewise. (op_iter_next_mustdef): New. * tree-ssa-operands.c: Likewise. (ALLOC_OPTYPE): Remove. Update all users. (alloc_def): New. (alloc_use): New. (alloc_maydef): New. (alloc_vuse): New. (alloc_mustdef): New. (realloc_maydef): New. (realloc_vuse): New. 2006-12-11 Aldy Hernandez <aldyh@redhat.com> * tree-ssa-operands.c: Remove build_v_must_defs. (init_ssa_operands): Delete build_v_must_defs. (finalize_ssa_v_must_def_ops): Remove. (finalize_ssa_v_must_defs): Remove. (finalize_ssa_stmt_operands): Do not call finalize_ssa_v_must_defs. (start_ssa_stmt_operands): Do not check build_v_must_defs. (append_v_must_def): Delete. (copy_virtual_operands): Do not copy V_MUST_DEFs. (get_modify_expr_operands): Remove reference to V_MUST_DEF from comment. Remove opf_kill_def. (build_ssa_operands): Remove references to v_must_defs. (copy_virtual_operands): Same. (copy_virtual_operands): Same. (fini_ssa_operands): Same. (free_ssa_operands): Same. (add_mustdef_op): Remove. Remove mustdef_optype_p. (alloc_mustdef): Remove. Remove references to V_MUST_DEFs in comment at top of file. (get_expr_operands): Remove opf_kill_def. (opf_kill_def): Remove. (add_virtual_operand): Remove opf_kill_def. (get_indirect_ref_operands): Same. (get_tmr_operands): Same. * tree-vectorizer.c (rename_variables_in_bb): Remove SSA_OP_ALL_KILLS. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Remove SSA_OP_ALL_KILLS. (check_loop_closed_ssa_stmt): Same. * tree-ssa.c (verify_def): Remove V_MUST_DEF from comment. (verify_use): Same. (verify_ssa): Remove V_MUST_DEFs traces. (verify_ssa): Remove SSA_OP_ALL_KILLS. * tree-into-ssa.c (mark_def_sites): Change SSA_OP_VMUSTDEF to SSA_OP_VMAYDEF. (rewrite_update_stmt): Remove SSA_OP_VIRTUAL_KILLS. (rewrite_stmt): Remove SSA_OP_ALL_KILLS. * tree-ssa-operands.h (struct stmt_operands_d): Remove V_MUST_DEF references. (MUSTDEF_OPS): Remove. (SSA_OP_VMUSTDEF): Remove. (FOR_EACH_SSA_MUSTDEF_OPERAND): Remove. (struct mustdef_optype_d): Remove. Remove mustdef_optype_p. (struct stmt_operands_d): Remove mustdef_ops. (ssa_operand_iterator_d): Remove mustdefs and mustkills. (SSA_OP_VIRTUAL_DEFS): Remove SSA_OP_VMUSTDEF. (MUSTDEF_RESULT_PTR): Remove. (MUSTDEF_RESULT): Remove. (MUSTDEF_KILL_PTR): Remove. (MUSTDEF_KILL): Remove. (MUSTDEF_NUM): Remove. (MUSTDEF_VECT): Remove. (SSA_OP_VIRTUAL_KILLS): Remove. (SSA_OP_ALL_VIRTUALS): Remove SSA_OP_VIRTUAL_KILLS. (SSA_OP_VMUSTKILL): Remove. (SSA_OP_ALL_KILLS): Remove. (SSA_OP_ALL_OPERANDS): Remove SSA_OP_ALL_KILLS. * tree-flow-inline.h (op_iter_init_def): Remove SSA_OP_VIRTUAL_KILLS. (delink_stmt_imm_use): Remove SSA_OP_ALL_KILLS. * tree-ssa-pre.c (compute_rvuse_and_antic_safe): Remove SSA_OP_VIRTUAL_KILLS. * tree-ssa-loop-im.c (determine_max_movement): Remove SSA_OP_VIRTUAL_KILLS. (gather_mem_refs_stmt): Same. (gather_mem_refs_stmt): Same. * tree-ssa-dce.c (mark_really_necessary_kill_operand_phis): Delete. (perform_tree_ssa_dce): Remove call to mark_really_necessary_kill_operand_phis. * tree-flow-inline.h (op_iter_init): Remove setting of mustdefs and mustkills. (op_iter_next_use): Do not check mustkills. (op_iter_next_def): Do not check mustdefs. (op_iter_next_tree): Do not check mustkills or mustdefs. (clear_and_done_ssa_iter): Do not set mustdefs or mustkills. (op_iter_next_maymustdef): Do not check mustkills. (op_iter_init_must_and_may_def): Remove SSA_OP_VMUSTKILL. (op_iter_init_mustdef): Remove. * tree-ssa-live.c (create_ssa_var_map): Change SSA_OP_VMUSTDEF to SSA_OP_VMAYDEF. * tree-ssa-dse.c (dse_optimize_stmt): Remove SSA_OP_VMUSTDEF. * tree-ssa-ccp.c: Remove V_MUST_DEF traces from comments. (visit_assignment): Same. * tree-ssa-copy.c (copy_prop_visit_assignment): Same. * tree-sra.c (mark_all_v_defs_1): Remove V_MUST_DEF from comment. * tree-outof-ssa.c (check_replaceable): Remove SSA_OP_VMUSTDEF. * tree-pretty-print.c (dump_vops): Remove printing of V_MUST_DEF. Remove kill_p variable. * tree-dfa.c (struct dfa_stats_d): Remove num_v_must_defs. (dump_dfa_stats): Remove code related to V_MUST_DEFs. (collect_dfa_stats_r): Do not set num_v_must_defs. (mark_new_vars_to_rename): Remove v_must_defs_{before,after} code. * tree-into-ssa.c (mark_def_sites): Change SSA_OP_VMUSTKILL to SSA_OP_VMAYUSE. * tree-ssa-pre.c (compute_rvuse_and_antic_safe): Remove SSA_OP_VMUSTDEF and SSA_OP_VMUSTKILL. * tree-ssa-propagate.c (stmt_makes_single_store): Remove SSA_OP_VMUSTDEF. From-SVN: r119760
2006-12-12 02:48:51 +01:00
#define TDF_MEMSYMS (1 << 14) /* display memory symbols in expr.
Implies TDF_VOPS. */
#define TDF_DIAGNOSTIC (1 << 15) /* A dump to be put in a diagnostic
message. */
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
#define TDF_VERBOSE (1 << 16) /* A dump that uses the full tree
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
dumper to print stmts. */
#define TDF_RHS_ONLY (1 << 17) /* a flag to only print the RHS of
a gimple stmt. */
#define TDF_ASMNAME (1 << 18) /* display asm names of decls */
#define TDF_EH (1 << 19) /* display EH region number
holding this gimple statement. */
#define TDF_NOUID (1 << 20) /* omit UIDs from dumps. */
tree-ssa-structalias.c (struct variable_info): Add is_fn_info flag. 2010-04-15 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (struct variable_info): Add is_fn_info flag. (new_var_info): Initialize it. (dump_constraints): Support printing last added constraints. (debug_constraints): Adjust. (dump_constraint_graph): Likewise. (make_heapvar_for): Check for NULL cfun. (get_function_part_constraint): New function. (get_fi_for_callee): Likewise. (find_func_aliases): Properly implement IPA PTA constraints. (process_ipa_clobber): New function. (find_func_clobbers): Likewise. (insert_into_field_list_sorted): Remove. (create_function_info_for): Properly allocate vars for IPA mode. Do not use insert_into_field_list_sorted. (create_variable_info_for): Properly generate constraints for global vars in IPA mode. (dump_solution_for_var): Always dump the solution. (set_uids_in_ptset): Initialize DECL_PT_UID if in ipa-mode. (find_what_var_points_to): Adjust. (pt_solution_set): Change. (pt_solution_ior_into): New function. (pt_solution_empty_p): Export. (pt_solution_includes_global): Adjust. (pt_solution_includes_1): Likewise. (pt_solutions_intersect_1): Likewise. (dump_sa_points_to_info): Check some invariants. (solve_constraints): Move constraint dumping ... (compute_points_to_sets): ... here. (ipa_pta_execute): ... and here. (compute_may_aliases): Do not re-compute points-to info locally if IPA info is available. (ipa_escaped_pt): New global var. (ipa_pta_execute): Properly implement IPA PTA. * tree-into-ssa.c (dump_decl_set): Support dumping decls not in referenced-vars. * tree-flow.h (struct gimple_df): Add ipa_pta flag. * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Adjust. (dump_points_to_solution): Likewise. * tree-dfa.c (dump_variable): Also dump DECL_PT_UID. * tree-inline.c (remap_ssa_name): Copy IPA points-to solution. (remap_gimple_stmt): Reset call clobber/use information if necessary. (copy_decl_to_var): Copy DECL_PT_UID. (copy_result_decl_to_var): Likewise. * tree.c (make_node_stat): Initialize DECL_PT_UID. (copy_node_stat): Copy it. * tree.h (DECL_PT_UID): New macro. (SET_DECL_PT_UID): Likewise. (DECL_PT_UID_SET_P): Likewise. (struct tree_decl_minimal): Add pt_uid member. * tree-ssa-alias.h (struct pt_solution): Add ipa_escaped flag. (pt_solution_empty_p): Declare. (pt_solution_set): Adjust. (ipa_escaped_pt): Declare. * cfgexpand.c (update_alias_info_with_stack_vars): Adjust. * gimple-pretty-print.c (pp_points_to_solution): New function. (dump_gimple_call): Dump call clobber/use information. * tree-dump.c (dump_option_value_in): Add TDF_ALIAS entry. * tree-pass.h (TDF_ALIAS): New dump option. * tree-pretty-print.c (dump_decl_name): Dump DECL_PT_UID if asked to. * doc/invoke.texi (-fipa-pta): Update documentation. * gcc.dg/ipa/ipa-pta-1.c: New testcase. * gcc.dg/ipa/ipa-pta-2.c: Likewise. * gcc.dg/ipa/ipa-pta-3.c: Likewise. * gcc.dg/ipa/ipa-pta-4.c: Likewise. * gcc.dg/ipa/ipa-pta-5.c: Likewise. * gcc.dg/ipa/ipa-pta-6.c: Likewise. * gcc.dg/ipa/ipa-pta-7.c: Likewise. * gcc.dg/ipa/ipa-pta-8.c: Likewise. * gcc.dg/ipa/ipa-pta-9.c: Likewise. * gcc.dg/ipa/ipa-pta-10.c: Likewise. * gcc.dg/ipa/ipa-pta-11.c: Likewise. * gcc.dg/ipa/ipa-pta-12.c: Likewise. * gcc.dg/ipa/ipa-pta-13.c: Likewise. * gcc.dg/torture/ipa-pta-2.c: Likewise. * gcc.dg/torture/ipa-pta-1.c: Adjust. From-SVN: r158374
2010-04-15 15:16:44 +02:00
#define TDF_ALIAS (1 << 21) /* display alias information */
#define TDF_ENUMERATE_LOCALS (1 << 22) /* Enumerate locals by uid. */
tree-ssa-structalias.c (struct variable_info): Add is_fn_info flag. 2010-04-15 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (struct variable_info): Add is_fn_info flag. (new_var_info): Initialize it. (dump_constraints): Support printing last added constraints. (debug_constraints): Adjust. (dump_constraint_graph): Likewise. (make_heapvar_for): Check for NULL cfun. (get_function_part_constraint): New function. (get_fi_for_callee): Likewise. (find_func_aliases): Properly implement IPA PTA constraints. (process_ipa_clobber): New function. (find_func_clobbers): Likewise. (insert_into_field_list_sorted): Remove. (create_function_info_for): Properly allocate vars for IPA mode. Do not use insert_into_field_list_sorted. (create_variable_info_for): Properly generate constraints for global vars in IPA mode. (dump_solution_for_var): Always dump the solution. (set_uids_in_ptset): Initialize DECL_PT_UID if in ipa-mode. (find_what_var_points_to): Adjust. (pt_solution_set): Change. (pt_solution_ior_into): New function. (pt_solution_empty_p): Export. (pt_solution_includes_global): Adjust. (pt_solution_includes_1): Likewise. (pt_solutions_intersect_1): Likewise. (dump_sa_points_to_info): Check some invariants. (solve_constraints): Move constraint dumping ... (compute_points_to_sets): ... here. (ipa_pta_execute): ... and here. (compute_may_aliases): Do not re-compute points-to info locally if IPA info is available. (ipa_escaped_pt): New global var. (ipa_pta_execute): Properly implement IPA PTA. * tree-into-ssa.c (dump_decl_set): Support dumping decls not in referenced-vars. * tree-flow.h (struct gimple_df): Add ipa_pta flag. * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Adjust. (dump_points_to_solution): Likewise. * tree-dfa.c (dump_variable): Also dump DECL_PT_UID. * tree-inline.c (remap_ssa_name): Copy IPA points-to solution. (remap_gimple_stmt): Reset call clobber/use information if necessary. (copy_decl_to_var): Copy DECL_PT_UID. (copy_result_decl_to_var): Likewise. * tree.c (make_node_stat): Initialize DECL_PT_UID. (copy_node_stat): Copy it. * tree.h (DECL_PT_UID): New macro. (SET_DECL_PT_UID): Likewise. (DECL_PT_UID_SET_P): Likewise. (struct tree_decl_minimal): Add pt_uid member. * tree-ssa-alias.h (struct pt_solution): Add ipa_escaped flag. (pt_solution_empty_p): Declare. (pt_solution_set): Adjust. (ipa_escaped_pt): Declare. * cfgexpand.c (update_alias_info_with_stack_vars): Adjust. * gimple-pretty-print.c (pp_points_to_solution): New function. (dump_gimple_call): Dump call clobber/use information. * tree-dump.c (dump_option_value_in): Add TDF_ALIAS entry. * tree-pass.h (TDF_ALIAS): New dump option. * tree-pretty-print.c (dump_decl_name): Dump DECL_PT_UID if asked to. * doc/invoke.texi (-fipa-pta): Update documentation. * gcc.dg/ipa/ipa-pta-1.c: New testcase. * gcc.dg/ipa/ipa-pta-2.c: Likewise. * gcc.dg/ipa/ipa-pta-3.c: Likewise. * gcc.dg/ipa/ipa-pta-4.c: Likewise. * gcc.dg/ipa/ipa-pta-5.c: Likewise. * gcc.dg/ipa/ipa-pta-6.c: Likewise. * gcc.dg/ipa/ipa-pta-7.c: Likewise. * gcc.dg/ipa/ipa-pta-8.c: Likewise. * gcc.dg/ipa/ipa-pta-9.c: Likewise. * gcc.dg/ipa/ipa-pta-10.c: Likewise. * gcc.dg/ipa/ipa-pta-11.c: Likewise. * gcc.dg/ipa/ipa-pta-12.c: Likewise. * gcc.dg/ipa/ipa-pta-13.c: Likewise. * gcc.dg/torture/ipa-pta-2.c: Likewise. * gcc.dg/torture/ipa-pta-1.c: Adjust. From-SVN: r158374
2010-04-15 15:16:44 +02:00
df.h: Include "timevar.h". * df.h: Include "timevar.h". (struct df_problem): Change tv_id field to timevar_id_t. * tree-pass.h: Include "timevar.h". (struct opt_pass): Change tv_id field to timevar_id_t. * timevar.h (timevar_id_t): Define TV_NONE. * passes.c (execute_one_ipa_transform_pass): Check for tv_id != TV_NONE rather than tv_id != 0. (execute_one_pass): Likewise. * Makefile.in (DF_H): Add $(TIMEVAR_H). (TREE_PASS_H): Define. Change all instances of tree-pass.h in dependencies to $(TREE_PASS_H). * bt-load.c (pass_branch_target_load_optimize1): Set tv_id field to TV_NONE. (pass_branch_target_load_optimize2): Likewise. * cfglayout.c (pass_into_cfg_layout_mode): Likewise. (pass_outof_cfg_layout_mode): Likewise. * cgraphbuild.c (pass_remove_cgraph_callee_edges): Likewise. (pass_rebuild_cgraph_edges): Likewise. (pass_remove_cgraph_callee_edges): Likewise. * df-core.c (pass_df_initialize_opt): Likewise. (pass_df_initialize_no_opt): Likewise. (pass_df_finish): Likewise. * emit-rtl.c (pass_unshare_all_rtl): Likewise. * except.c (pass_set_nothrow_function_flags): Likewise. (pass_convert_to_eh_region_ranges): Likewise. * final.c (pass_compute_alignments): Likewise. * function.c (pass_instantiate_virtual_regs): Likewise. (pass_init_function): Likewise. (pass_leaf_regs): Likewise. (pass_match_asm_constraints): Likewise. * gimple-low.c (pass_lower_cf): Likewise. (pass_mark_used_blocks): Likewise. * init-regs.c (pass_initialize_regs): Likewise. * integrate.c (pass_initial_value_sets): Likewise. * ira.c (pass_ira): Likewise. * jump.c (pass_cleanup_barriers): Likewise. * omp-low.c (pass_expand_omp): Likewise. (pass_lower_omp): Likewise. * matrix-reorg.c (pass_ipa_matrix_reorg): Likewise. * recog.c (pass_split_all_insns): Likewise. (pass_split_after_reload): Likewise. (pass_split_before_regstack): Likewise. (pass_split_before_sched2): Likewise. (pass_split_for_shorten_branches): Likewise. * reginfo.c (pass_reginfo_init): Likewise. (pass_subregs_of_mode_init): Likewise. (pass_subregs_of_mode_finish): Likewise. * passes.c (pass_postreload): Likewise. * stack-ptr-mod.c (pass_stack_ptr_mod): Likewise. * tree-cfg.c (pass_remove_useless_stmts): Likewise. (pass_warn_function_return): Likewise. (pass_warn_function_noreturn): Likewise. * tree-complex.c (pass_lower_complex): Likewise. (pass_lower_complex_O0): Likewise. * tree-if-conv.c (pass_if_conversion): Likewise. * tree-into-ssa.c (pass_build_ssa): Likewise. * tree-mudflap.c (pass_mudflap_1): Likewise. (pass_mudflap_2): Likewise. * tree-nomudflap.c (pass_mudflap_1): Likewise. (pass_mudflap_2): Likewise. * tree-nrv.c (pass_return_slot): Likewise. * tree-object-size.c (pass_object_sizes): Likewise. * tree-optimize.c (pass_all_optimizations): Likewise. (pass_early_local_passes): Likewise. (pass_all_early_optimizations): Likewise. (pass_cleanup_cfg): Likewise. (pass_cleanup_cfg_post_optimizing): Likewise. (pass_free_datastructures): Likewise. (pass_free_cfg_annotations): Likewise. (pass_fixup_cfg): Likewise. (pass_init_datastructures): Likewise. * tree-ssa.c (pass_early_warn_uninitialized): Likewise. (pass_late_warn_uninitialized): Likewise. (pass_update_address_taken): Likewise. * tree-ssa-ccp.c (pass_fold_builtins): Likewise. * tree-ssa-math-opts.c (pass_cse_reciprocals): Likewise. (pass_cse_sincos): Likewise. (pass_convert_to_rsqrt): Likewise. * tree-ssa-structalias.c (pass_build_alias): Likewise. * tree-stdarg.c (pass_stdarg): Likewise. * tree-tailcall.c (pass_tail_recursion): Likewise. (pass_tail_calls): Likewise. * tree-vect-generic.c (pass_lower_vector): Likewise. (pass_lower_vector_ssa): Likewise. * tree-vectorizer.c (pass_ipa_increase_alignment): Likewise. From-SVN: r146222
2009-04-17 07:40:46 +02:00
/* In tree-dump.c */
Fix enum conversions which are invalid in C++: gcc/: Fix enum conversions which are invalid in C++: * auto-inc-dec.c (attempt_change): Change 0 to SET in function call. * calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function call. * cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call. * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type. * dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function call. (dbxout_parms): Likewise. * df-core.c (df_set_flags): Change changeable_flags parameter to int. (df_clear_flags): Likewise. * df-problems.c (df_rd_bb_local_compute_process_def): Change top_flag parameter to int. (df_chain_create_bb_process_use): Likewise. (df_chain_add_problem): Change chain_flags parameter to unsigned int. Remove cast. * df-scan.c (df_ref_create): Change ref_flags parameter to int. (df_ref_create_structure, df_def_record_1): Likewise. (df_defs_record, df_uses_record, df_get_call_refs): Likewise. (df_notes_rescan): Change 0 to VOIDmode in function call. (df_get_call_refs, df_insn_refs_collect): Likewise. (df_bb_regs_collect): Likewise. (df_entry_block_defs_collect): Likewise. (df_exit_block_uses_collect): Likewise. * df.h: Update declarations. * double-int.c (double_int_divmod): Add cast to enum type. * dse.c (replace_inc_dec): Reverse parameters to gen_int_mode. * dwarf2out.c (new_reg_loc_descr): Add casts to enum type. (based_loc_descr): Likewise. (loc_descriptor_from_tree_1): Change first_op and second_op to enum dwarf_location_atom. Add cast to enum type. * expmed.c (init_expmed): Change 0 to SET in function call. * expr.c (init_expr_target): Change 0 to VOIDmode in function call. (expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call. (do_store_flag): Likewise. * fixed-value.h (struct fixed_value): Change mode to enum machine_mode. * function.c (assign_parms): Change 0 to VOIDmode in function call. * genautomata.c (insert_automaton_decl): Change 1 to INSERT in function call. (insert_insn_decl, insert_decl, insert_state): Likewise. (automata_list_finish): Likewise. * genrecog.c (process_define_predicate): Add cast to enum type. * gensupport.c (init_predicate_table): Add cast to enum type. * gimple.c (gimple_build_return): Change 0 to ERROR_MARK in function call. (gimple_build_call_1, gimple_build_label): Likewise. (gimple_build_goto, gimple_build_asm_1): Likewise. (gimple_build_switch_1, gimple_build_cdt): Likewise. * gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function call. (enum fallback): Rename from enum fallback_t. (fallback_t): Typedef as int. * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to GSI_SAME_STMT in function call. * ira.c (setup_class_subset_and_memory_move_costs): Add casts to enum type. (setup_reg_class_relations): Likewise. (setup_reg_class_nregs): Change cl to int. Add casts to enum type. (setup_prohibited_class_mode_regs): Add cast to enum type. (setup_prohibited_mode_move_regs): Likewise. * ira-costs.c (record_reg_classes): Change rclass to enum reg_class. (record_address_regs): Change i to enum reg_class. * lists.c (alloc_EXPR_LIST): Add cast to enum type. * machmode.h (GET_MODE_CLASS): Cast value to enum mode_class. (GET_MODE_WIDER_MODE): Cast value to enum machine_mode. (GET_MODE_2XWIDER_MODE): Likewise. (GET_CLASS_NARROWEST_MODE): Likewise. * omp-low.c (expand_omp_for): Add cast to enum type. * optabs.c (debug_optab_libfuncs): Add casts to enum type. * opts.c (enable_warning_as_error): Change kind to diagostic_t. * postreload.c (reload_cse_simplify_operands): Change rclass local to enum reg_class. * predict.c (combine_predictions_for_insn): Change best_predictor and predictor to enum br_predictor. (combine_predictions_for_bb): Likewise. (build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to use SET_PREDICT_EXPR_OUTCOME. * real.c (real_arithmetic): Change icode to code in function call. * reginfo.c (init_move_cost): Add casts to enum type. (init_reg_sets_1, init_fake_stack_mems): Likewise. * regmove.c (regclass_compatible_p): Change class0 and class1 to enum reg_class. * reload.c (find_valid_class): Add casts to enum type. (push_reload): Change 0 to NO_REGS in function call. (find_reloads): Change this_alternative to array of enum reg_class. Remove some now-unnecessary casts. (make_memloc): Change 0 to VOIDmode in function call. * reload1.c (reload): Change 0 to VOIDmode in function call. (eliminate_regs_1, elimination_effects): Likewise. (eliminate_regs_in_insn): Likewise. (emit_input_reload_insns): Add cast to enum type. (delete_output_reload): Change 0 to VOIDmode in function call. * reorg.c (insn_sets_resource_p): Convert include_delayed_effects to enum type in function call. * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type. (SET_PREDICT_EXPR_OUTCOME): Define. * tree-dump.c (get_dump_file_info): Change phase parameter to int. (get_dump_file_name, dump_begin, dump_enabled_p): Likewise. (dump_initialized_p, dump_flag_name, dump_end): Likewise. (dump_function): Likewise. * tree-dump.h: Update declarations. * tree-pass.h: Update declarations. * varasm.c (assemble_integer): Change mclass to enum mode_class. * config/arm/arm.c (thumb_legitimize_reload_address): Add cast to enum type. (arm_rtx_costs_1): Correct parenthesization. (arm_rtx_costs): Add casts to enum type. (adjacent_mem_locations): Reverse arguments to const_ok_for_op. (vfp_emit_fstmd): Use add_rg_note. (emit_multi_reg_push, emit_sfm): Likewise. (thumb_set_frame_pointer): Likewise. (arm_expand_prologue): Likewise. (arm_regno_class): Change return type to enum reg_class. (thumb1_expand_prologue): Use add_reg_note. * config/arm/arm-protos.h (arm_regno_class): Update declaration. * config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL in function call. * config/arm/gentune.sh: Add cast to enum type. * config/arm/arm-tune.md: Rebuild. * config/i386/i386.c (ix86_expand_prologue): Use add_reg_note. (ix86_split_fp_branch, predict_jump): Likewise. (ix86_expand_multi_arg_builtin): Change sub_code from enum insn_code to enum rtx_code. (ix86_builtin_vectorized_function): Add cast to enum type. * config/i386/i386.md (truncdfsf2): Change slot to enum ix86_stack_slot. (truncxf<mode>2, isinf<mode>2): Likewise. * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to enum type. * config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note. (spill_restore_mem, do_spill, ia64_expand_prologue): Likewise. (insert_bundle_state): Change 1 to INSERT in function call. (ia64_add_bundle_selector_before): Likewise. * config/ia64/ia64.md (cpu attr): Add cast to enum type. (save_stack_nonlocal): Change 0 to LCT_NORMAL in function call. (restore_stack_nonlocal): Likewise. * config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/mips/mips.c (mips_binary_cost): Change 0 to SET in function call. (mips_rtx_costs): Likewise. (mips_override_options): Add casts to enum type. * config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/pa/pa.c (legitimize_pic_address): Use add_reg_note. (store_reg, set_reg_plus_d): Likewise. (hppa_expand_prologue, hppa_profile_hook): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add cast to enum type. (altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in function call. (emit_unlikely_jump): Use add_reg_note. (rs6000_emit_allocate_stack): Likewise. (rs6000_frame_related, rs6000_emit_prologue): Likewise. (output_toc): Change 1 to INSERT in function call. (output_profile_hook): Change 0 to LCT_NORMAL in function call. (rs6000_initialize_trampoline): Likewise. (rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in function call. * config/s390/s390.c (s390_rtx_costs): Add cast to enum type. (s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call. (s390_expand_setmem, s390_expand_cmpmem): Likewise. (save_gprs): Use add_reg_note. (s390_emit_prologue): Likewise. (s390_expand_builtin): Change 0 to EXPAND_NORMAL in function call. * config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note. (sparc_fold_builtin): Add cast to enum type. * config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to enum insn_code. (spu_expand_prologue): Use add_reg_note. (expand_builtin_args): Change 0 to EXPAND_NORMAL in function call. * c-parser.c (c_parser_attributes): Change VEC back to tree list. (c_parser_postfix_expression_after_primary): Get VEC for list of arguments. Get original types of arguments. Call build_function_call_vec. (cached_expr_list_1, cached_expr_list_2): New static variables. (c_parser_expr_list): Change return type to VEC *. Add p_orig_types parameter. Change all callers. (c_parser_release_expr): New static function. (c_parser_vec_to_tree_list): New static function. * c-typeck.c (build_function_call): Rewrite to build a VEC and call build_function_call_vec. (build_function_call_vec): New function, based on old build_function_call. (convert_arguments): Remove nargs and argarray parameters. Change values to a VEC. Add origtypes parameter. (build_modify_expr): Add rhs_origtype parameter. Change all callers. (convert_for_assignment): Add origtype parameter. Change all callers. If warn_cxx_compat, check for conversion to an enum type when calling a function. (store_init_value): Add origtype parameter. Change all callers. (digest_init): Likewise. (struct init_node): Add origtype field. (add_pending_init): Add origtype parameter. Change all callers. (output_init_element): Likewise. (output_pending_init_elements): Pass origtype from init_node to output_init_element. (process_init_elemnt): Pass origtype from c_expr to output_init_element. (c_finish_return): Add origtype parameter. Change all callers. * c-common.c (sync_resolve_size): Change params to VEC *. Change caller. (sync_resolve_params): Likewise. (sync_resolve_return): Change params to first_param. Change caller. (resolve_overloaded_builtins): Change params to VEC *. Change callers. Save first parameter around call to build_function_call_vec. * c-decl.c (finish_decl): Add origtype parameter. Change all callers. Call build_function_call_vec rather than build_function_call for cleanup. * c-tree.h: Update declarations. * c-common.h: Update declarations. * stub-objc.c (objc_rewrite_function_call): Change parameter from params to first_param. * target.h (struct gcc_target): Change resolve_overloaded_builtin params parameter from tree to void *. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change arglist parameter to have type void *, and to be a pointer to a VEC. * config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin): Update declaration. * config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change fnargs parameter to have type void *, and to be a pointer to a VEC. Call build_function_call_vec instead of build_function_call. * config/spu/spu-protos.h (spu_expand_builtin): Update declaration. gcc/cp/: * typeck.c (build_function_call_vec): New function. (cp_build_function_call): Only pass first parameter to objc_rewrite_function_call. (build_modify_expr): Add rhs_origtype parameter. Change all callers. * decl.c (finish_decl): Add origtype parameter. Change all callers. * semantics.c (finish_call_expr): Pass VEC to resolve_overloaded_builtin. gcc/objc: * objc-act.c (objc_rewrite_function_call): Change parameter from params to first_param. Change all callers. gcc/testsuite: * gcc.dg/Wcxx-compat-3.c: New testcase. From-SVN: r146451
2009-04-20 21:35:00 +02:00
extern char *get_dump_file_name (int);
extern int dump_enabled_p (int);
extern int dump_initialized_p (int);
extern FILE *dump_begin (int, int *);
extern void dump_end (int, FILE *);
c-common.c (vector_types_convertible_p, [...]): Constify. * c-common.c (vector_types_convertible_p, 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. From-SVN: r127799
2007-08-25 17:10:40 +02:00
extern void dump_node (const_tree, int, FILE *);
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
extern int dump_switch_p (const char *);
Fix enum conversions which are invalid in C++: gcc/: Fix enum conversions which are invalid in C++: * auto-inc-dec.c (attempt_change): Change 0 to SET in function call. * calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function call. * cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call. * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type. * dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function call. (dbxout_parms): Likewise. * df-core.c (df_set_flags): Change changeable_flags parameter to int. (df_clear_flags): Likewise. * df-problems.c (df_rd_bb_local_compute_process_def): Change top_flag parameter to int. (df_chain_create_bb_process_use): Likewise. (df_chain_add_problem): Change chain_flags parameter to unsigned int. Remove cast. * df-scan.c (df_ref_create): Change ref_flags parameter to int. (df_ref_create_structure, df_def_record_1): Likewise. (df_defs_record, df_uses_record, df_get_call_refs): Likewise. (df_notes_rescan): Change 0 to VOIDmode in function call. (df_get_call_refs, df_insn_refs_collect): Likewise. (df_bb_regs_collect): Likewise. (df_entry_block_defs_collect): Likewise. (df_exit_block_uses_collect): Likewise. * df.h: Update declarations. * double-int.c (double_int_divmod): Add cast to enum type. * dse.c (replace_inc_dec): Reverse parameters to gen_int_mode. * dwarf2out.c (new_reg_loc_descr): Add casts to enum type. (based_loc_descr): Likewise. (loc_descriptor_from_tree_1): Change first_op and second_op to enum dwarf_location_atom. Add cast to enum type. * expmed.c (init_expmed): Change 0 to SET in function call. * expr.c (init_expr_target): Change 0 to VOIDmode in function call. (expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call. (do_store_flag): Likewise. * fixed-value.h (struct fixed_value): Change mode to enum machine_mode. * function.c (assign_parms): Change 0 to VOIDmode in function call. * genautomata.c (insert_automaton_decl): Change 1 to INSERT in function call. (insert_insn_decl, insert_decl, insert_state): Likewise. (automata_list_finish): Likewise. * genrecog.c (process_define_predicate): Add cast to enum type. * gensupport.c (init_predicate_table): Add cast to enum type. * gimple.c (gimple_build_return): Change 0 to ERROR_MARK in function call. (gimple_build_call_1, gimple_build_label): Likewise. (gimple_build_goto, gimple_build_asm_1): Likewise. (gimple_build_switch_1, gimple_build_cdt): Likewise. * gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function call. (enum fallback): Rename from enum fallback_t. (fallback_t): Typedef as int. * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to GSI_SAME_STMT in function call. * ira.c (setup_class_subset_and_memory_move_costs): Add casts to enum type. (setup_reg_class_relations): Likewise. (setup_reg_class_nregs): Change cl to int. Add casts to enum type. (setup_prohibited_class_mode_regs): Add cast to enum type. (setup_prohibited_mode_move_regs): Likewise. * ira-costs.c (record_reg_classes): Change rclass to enum reg_class. (record_address_regs): Change i to enum reg_class. * lists.c (alloc_EXPR_LIST): Add cast to enum type. * machmode.h (GET_MODE_CLASS): Cast value to enum mode_class. (GET_MODE_WIDER_MODE): Cast value to enum machine_mode. (GET_MODE_2XWIDER_MODE): Likewise. (GET_CLASS_NARROWEST_MODE): Likewise. * omp-low.c (expand_omp_for): Add cast to enum type. * optabs.c (debug_optab_libfuncs): Add casts to enum type. * opts.c (enable_warning_as_error): Change kind to diagostic_t. * postreload.c (reload_cse_simplify_operands): Change rclass local to enum reg_class. * predict.c (combine_predictions_for_insn): Change best_predictor and predictor to enum br_predictor. (combine_predictions_for_bb): Likewise. (build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to use SET_PREDICT_EXPR_OUTCOME. * real.c (real_arithmetic): Change icode to code in function call. * reginfo.c (init_move_cost): Add casts to enum type. (init_reg_sets_1, init_fake_stack_mems): Likewise. * regmove.c (regclass_compatible_p): Change class0 and class1 to enum reg_class. * reload.c (find_valid_class): Add casts to enum type. (push_reload): Change 0 to NO_REGS in function call. (find_reloads): Change this_alternative to array of enum reg_class. Remove some now-unnecessary casts. (make_memloc): Change 0 to VOIDmode in function call. * reload1.c (reload): Change 0 to VOIDmode in function call. (eliminate_regs_1, elimination_effects): Likewise. (eliminate_regs_in_insn): Likewise. (emit_input_reload_insns): Add cast to enum type. (delete_output_reload): Change 0 to VOIDmode in function call. * reorg.c (insn_sets_resource_p): Convert include_delayed_effects to enum type in function call. * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type. (SET_PREDICT_EXPR_OUTCOME): Define. * tree-dump.c (get_dump_file_info): Change phase parameter to int. (get_dump_file_name, dump_begin, dump_enabled_p): Likewise. (dump_initialized_p, dump_flag_name, dump_end): Likewise. (dump_function): Likewise. * tree-dump.h: Update declarations. * tree-pass.h: Update declarations. * varasm.c (assemble_integer): Change mclass to enum mode_class. * config/arm/arm.c (thumb_legitimize_reload_address): Add cast to enum type. (arm_rtx_costs_1): Correct parenthesization. (arm_rtx_costs): Add casts to enum type. (adjacent_mem_locations): Reverse arguments to const_ok_for_op. (vfp_emit_fstmd): Use add_rg_note. (emit_multi_reg_push, emit_sfm): Likewise. (thumb_set_frame_pointer): Likewise. (arm_expand_prologue): Likewise. (arm_regno_class): Change return type to enum reg_class. (thumb1_expand_prologue): Use add_reg_note. * config/arm/arm-protos.h (arm_regno_class): Update declaration. * config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL in function call. * config/arm/gentune.sh: Add cast to enum type. * config/arm/arm-tune.md: Rebuild. * config/i386/i386.c (ix86_expand_prologue): Use add_reg_note. (ix86_split_fp_branch, predict_jump): Likewise. (ix86_expand_multi_arg_builtin): Change sub_code from enum insn_code to enum rtx_code. (ix86_builtin_vectorized_function): Add cast to enum type. * config/i386/i386.md (truncdfsf2): Change slot to enum ix86_stack_slot. (truncxf<mode>2, isinf<mode>2): Likewise. * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to enum type. * config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note. (spill_restore_mem, do_spill, ia64_expand_prologue): Likewise. (insert_bundle_state): Change 1 to INSERT in function call. (ia64_add_bundle_selector_before): Likewise. * config/ia64/ia64.md (cpu attr): Add cast to enum type. (save_stack_nonlocal): Change 0 to LCT_NORMAL in function call. (restore_stack_nonlocal): Likewise. * config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/mips/mips.c (mips_binary_cost): Change 0 to SET in function call. (mips_rtx_costs): Likewise. (mips_override_options): Add casts to enum type. * config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/pa/pa.c (legitimize_pic_address): Use add_reg_note. (store_reg, set_reg_plus_d): Likewise. (hppa_expand_prologue, hppa_profile_hook): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add cast to enum type. (altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in function call. (emit_unlikely_jump): Use add_reg_note. (rs6000_emit_allocate_stack): Likewise. (rs6000_frame_related, rs6000_emit_prologue): Likewise. (output_toc): Change 1 to INSERT in function call. (output_profile_hook): Change 0 to LCT_NORMAL in function call. (rs6000_initialize_trampoline): Likewise. (rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in function call. * config/s390/s390.c (s390_rtx_costs): Add cast to enum type. (s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call. (s390_expand_setmem, s390_expand_cmpmem): Likewise. (save_gprs): Use add_reg_note. (s390_emit_prologue): Likewise. (s390_expand_builtin): Change 0 to EXPAND_NORMAL in function call. * config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note. (sparc_fold_builtin): Add cast to enum type. * config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to enum insn_code. (spu_expand_prologue): Use add_reg_note. (expand_builtin_args): Change 0 to EXPAND_NORMAL in function call. * c-parser.c (c_parser_attributes): Change VEC back to tree list. (c_parser_postfix_expression_after_primary): Get VEC for list of arguments. Get original types of arguments. Call build_function_call_vec. (cached_expr_list_1, cached_expr_list_2): New static variables. (c_parser_expr_list): Change return type to VEC *. Add p_orig_types parameter. Change all callers. (c_parser_release_expr): New static function. (c_parser_vec_to_tree_list): New static function. * c-typeck.c (build_function_call): Rewrite to build a VEC and call build_function_call_vec. (build_function_call_vec): New function, based on old build_function_call. (convert_arguments): Remove nargs and argarray parameters. Change values to a VEC. Add origtypes parameter. (build_modify_expr): Add rhs_origtype parameter. Change all callers. (convert_for_assignment): Add origtype parameter. Change all callers. If warn_cxx_compat, check for conversion to an enum type when calling a function. (store_init_value): Add origtype parameter. Change all callers. (digest_init): Likewise. (struct init_node): Add origtype field. (add_pending_init): Add origtype parameter. Change all callers. (output_init_element): Likewise. (output_pending_init_elements): Pass origtype from init_node to output_init_element. (process_init_elemnt): Pass origtype from c_expr to output_init_element. (c_finish_return): Add origtype parameter. Change all callers. * c-common.c (sync_resolve_size): Change params to VEC *. Change caller. (sync_resolve_params): Likewise. (sync_resolve_return): Change params to first_param. Change caller. (resolve_overloaded_builtins): Change params to VEC *. Change callers. Save first parameter around call to build_function_call_vec. * c-decl.c (finish_decl): Add origtype parameter. Change all callers. Call build_function_call_vec rather than build_function_call for cleanup. * c-tree.h: Update declarations. * c-common.h: Update declarations. * stub-objc.c (objc_rewrite_function_call): Change parameter from params to first_param. * target.h (struct gcc_target): Change resolve_overloaded_builtin params parameter from tree to void *. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change arglist parameter to have type void *, and to be a pointer to a VEC. * config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin): Update declaration. * config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change fnargs parameter to have type void *, and to be a pointer to a VEC. Call build_function_call_vec instead of build_function_call. * config/spu/spu-protos.h (spu_expand_builtin): Update declaration. gcc/cp/: * typeck.c (build_function_call_vec): New function. (cp_build_function_call): Only pass first parameter to objc_rewrite_function_call. (build_modify_expr): Add rhs_origtype parameter. Change all callers. * decl.c (finish_decl): Add origtype parameter. Change all callers. * semantics.c (finish_call_expr): Pass VEC to resolve_overloaded_builtin. gcc/objc: * objc-act.c (objc_rewrite_function_call): Change parameter from params to first_param. Change all callers. gcc/testsuite: * gcc.dg/Wcxx-compat-3.c: New testcase. From-SVN: r146451
2009-04-20 21:35:00 +02:00
extern const char *dump_flag_name (int);
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
/* Global variables used to communicate with passes. */
extern FILE *dump_file;
extern int dump_flags;
Unify the management of RTL and tree-level dump files. 2004-09-06 Paolo Bonzini <bonzini@gnu.org> Unify the management of RTL and tree-level dump files. * cfgexpand.c (tree_expand_cfg): Fix incorrect comment. Don't print function name to the dump file, the pass manager would do this for us. Add code from the top of rest_of_compilation, up to the initial RTL dump. * passes.c (rest_of_handle_jump): Call fixup_tail_calls and close the DFI_sibling dump file. (rest_of_compilation): Don't do that here. Remove code up to the initial RTL dump. (init_optimization_passes): Remove. (pass_rest_of_compilation): Change pass name to NULL. * toplev.c (lang_dependent_init): Do not use an empty dump file prefix. Do not call init_optimization_passes. * toplev.h (init_optimization_passes): Remove. * graph.c (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Remove SUFFIX parameter. * graph.h (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Likewise. * tree-pass.h (struct tree_opt_pass): Add `letter' field. * cfgexpand.c (pass_expand): Adjust. * gimple-low.c (pass_lower_cf, pass_remove_useless_vars): Adjust. * passes.c (pass_rest_of_compilation): Adjust. * predict.c (pass_profile): Adjust. * tree-alias-common.c (pass_build_pta, pass_del_pta): Adjust. * tree-cfg.c (pass_build_cfg, pass_remove_useless_stmts, pass_split_crit_edges, pass_warn_function_return): Adjust. * tree-complex.c (pass_lower_vector_ssa, pass_pre_expand): Adjust. * tree-dfa.c (pass_referenced_vars): Adjust. * tree-eh.c (pass_lower_eh): Adjust. * tree-if-conv.c (pass_build_ssa): Adjust. * tree-into-ssa.c (pass_build_ssa): Adjust. * tree-mudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nomudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nrv.c (pass_nrv): Adjust. * tree-optimize.c (pass_gimple, pass_all_optimizations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures): Adjust. * tree-outof-ssa.c (pass_del_ssa): Adjust. * tree-profile.c (pass_tree_profile): Adjust. * tree-sra.c (pass_sra): Adjust. * tree-ssa-alias.c (pass_may_alias): Adjust. * tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Adjust. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Adjust. * tree-ssa-dce.c (pass_dce, pass_cd_dce): Adjust. * tree-ssa-dom.c (pass_dominator): Adjust. * tree-ssa-dse.c (pass_dse): Adjust. * tree-ssa-forwprop.c (pass_forwprop): Adjust. * tree-ssa-if-conv.c (pass_if_conversion): Adjust. * tree-ssa-loop-ch.c (pass_ch): Adjust. * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_lim, pass_loop_done, pass_complete_unroll, pass_iv_canon, pass_iv_optimize, pass_vectorize): Adjust. * tree-ssa-phiopt.c (pass_phiopt): Adjust. * tree-ssa-pre.c (pass_pre, pass_fre): Adjust. * tree-ssa.c (pass_redundant_phi, pass_early_warn_uninitialized, pass_late_warn_uninnitialized): Adjust. * tree-tailcall.c (pass_tail_recursion, pass_tail_calls): Adjust. * Makefile.in (tree-dump.o): Add new dependencies. * cgraph.c (cgraph_remove_node): TDF_all -> TDF_tree_all. * cgraphunit.c (cgraph_preserve_function_body_p, cgraph_optimize): Likewise. * toplev.c (dump_file_name): New. * tree-dump.c (dump_enable_all): Add LETTER parameter. (struct dump_file_info): Add NUM and LETTER fields. (dump_files): Adjust and add RTL dump files. (dump_register): Add NUM and LETTER fields. (get_dump_file_name, dump_initialized_p, enable_rtl_dump_file): New. (dump_begin): Use get_dump_file_name. (dump_switch_p_1): Adjust call to dump_enable_all. * tree-dump.h (dump_register): Adjust prototype. * tree-optimize.c (register_one_dump_file): Take dump file index. Support flags for RTL dumps. (register_dump_files): Fill in NUM field of struct dump_file_info. Track properties both when the gate is executed and when it is not. (execute_todo): Dump RTL. Add PROPERTIES parameter. (execute_one_pass): Pass properties to execute_todo. Handle VCG dumps of RTL. * tree-pass.h (dump_file_name): New. * tree.h (TDF_TREE, TDF_RTL, get_dump_file_name, dump_initialized_p): New. * Makefile.in (passes.o): Add new dependencies. * passes.c (struct dump_file_info, enum dump_file_index, dump_file_tbl, init_optimization_passes): Remove. (open_dump_file, close_dump_file): Use tree-dumping infrastructure. (rest_of_handle_new_regalloc, rest_of_handle_old_regalloc): Use dump_enabled_p. (finish_optimization_passes): Update finish_graph_dump_file loop. (enable_rtl_dump_file): Remove. * tree-dump.c (dump_files): Adjust and add RTL dump files. (enable_rtl_dump_file): Add here. * tree.h (enum tree_dump_index): Add RTL dump file indices. * doc/invoke.texi (Debugging options): Document new RTL debugging options. Update. From-SVN: r87113
2004-09-06 12:08:17 +02:00
extern const char *dump_file_name;
Unify the management of RTL and tree-level dump files. 2004-09-06 Paolo Bonzini <bonzini@gnu.org> Unify the management of RTL and tree-level dump files. * cfgexpand.c (tree_expand_cfg): Fix incorrect comment. Don't print function name to the dump file, the pass manager would do this for us. Add code from the top of rest_of_compilation, up to the initial RTL dump. * passes.c (rest_of_handle_jump): Call fixup_tail_calls and close the DFI_sibling dump file. (rest_of_compilation): Don't do that here. Remove code up to the initial RTL dump. (init_optimization_passes): Remove. (pass_rest_of_compilation): Change pass name to NULL. * toplev.c (lang_dependent_init): Do not use an empty dump file prefix. Do not call init_optimization_passes. * toplev.h (init_optimization_passes): Remove. * graph.c (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Remove SUFFIX parameter. * graph.h (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Likewise. * tree-pass.h (struct tree_opt_pass): Add `letter' field. * cfgexpand.c (pass_expand): Adjust. * gimple-low.c (pass_lower_cf, pass_remove_useless_vars): Adjust. * passes.c (pass_rest_of_compilation): Adjust. * predict.c (pass_profile): Adjust. * tree-alias-common.c (pass_build_pta, pass_del_pta): Adjust. * tree-cfg.c (pass_build_cfg, pass_remove_useless_stmts, pass_split_crit_edges, pass_warn_function_return): Adjust. * tree-complex.c (pass_lower_vector_ssa, pass_pre_expand): Adjust. * tree-dfa.c (pass_referenced_vars): Adjust. * tree-eh.c (pass_lower_eh): Adjust. * tree-if-conv.c (pass_build_ssa): Adjust. * tree-into-ssa.c (pass_build_ssa): Adjust. * tree-mudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nomudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nrv.c (pass_nrv): Adjust. * tree-optimize.c (pass_gimple, pass_all_optimizations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures): Adjust. * tree-outof-ssa.c (pass_del_ssa): Adjust. * tree-profile.c (pass_tree_profile): Adjust. * tree-sra.c (pass_sra): Adjust. * tree-ssa-alias.c (pass_may_alias): Adjust. * tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Adjust. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Adjust. * tree-ssa-dce.c (pass_dce, pass_cd_dce): Adjust. * tree-ssa-dom.c (pass_dominator): Adjust. * tree-ssa-dse.c (pass_dse): Adjust. * tree-ssa-forwprop.c (pass_forwprop): Adjust. * tree-ssa-if-conv.c (pass_if_conversion): Adjust. * tree-ssa-loop-ch.c (pass_ch): Adjust. * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_lim, pass_loop_done, pass_complete_unroll, pass_iv_canon, pass_iv_optimize, pass_vectorize): Adjust. * tree-ssa-phiopt.c (pass_phiopt): Adjust. * tree-ssa-pre.c (pass_pre, pass_fre): Adjust. * tree-ssa.c (pass_redundant_phi, pass_early_warn_uninitialized, pass_late_warn_uninnitialized): Adjust. * tree-tailcall.c (pass_tail_recursion, pass_tail_calls): Adjust. * Makefile.in (tree-dump.o): Add new dependencies. * cgraph.c (cgraph_remove_node): TDF_all -> TDF_tree_all. * cgraphunit.c (cgraph_preserve_function_body_p, cgraph_optimize): Likewise. * toplev.c (dump_file_name): New. * tree-dump.c (dump_enable_all): Add LETTER parameter. (struct dump_file_info): Add NUM and LETTER fields. (dump_files): Adjust and add RTL dump files. (dump_register): Add NUM and LETTER fields. (get_dump_file_name, dump_initialized_p, enable_rtl_dump_file): New. (dump_begin): Use get_dump_file_name. (dump_switch_p_1): Adjust call to dump_enable_all. * tree-dump.h (dump_register): Adjust prototype. * tree-optimize.c (register_one_dump_file): Take dump file index. Support flags for RTL dumps. (register_dump_files): Fill in NUM field of struct dump_file_info. Track properties both when the gate is executed and when it is not. (execute_todo): Dump RTL. Add PROPERTIES parameter. (execute_one_pass): Pass properties to execute_todo. Handle VCG dumps of RTL. * tree-pass.h (dump_file_name): New. * tree.h (TDF_TREE, TDF_RTL, get_dump_file_name, dump_initialized_p): New. * Makefile.in (passes.o): Add new dependencies. * passes.c (struct dump_file_info, enum dump_file_index, dump_file_tbl, init_optimization_passes): Remove. (open_dump_file, close_dump_file): Use tree-dumping infrastructure. (rest_of_handle_new_regalloc, rest_of_handle_old_regalloc): Use dump_enabled_p. (finish_optimization_passes): Update finish_graph_dump_file loop. (enable_rtl_dump_file): Remove. * tree-dump.c (dump_files): Adjust and add RTL dump files. (enable_rtl_dump_file): Add here. * tree.h (enum tree_dump_index): Add RTL dump file indices. * doc/invoke.texi (Debugging options): Document new RTL debugging options. Update. From-SVN: r87113
2004-09-06 12:08:17 +02:00
/* Return the dump_file_info for the given phase. */
Fix enum conversions which are invalid in C++: gcc/: Fix enum conversions which are invalid in C++: * auto-inc-dec.c (attempt_change): Change 0 to SET in function call. * calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function call. * cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call. * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type. * dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function call. (dbxout_parms): Likewise. * df-core.c (df_set_flags): Change changeable_flags parameter to int. (df_clear_flags): Likewise. * df-problems.c (df_rd_bb_local_compute_process_def): Change top_flag parameter to int. (df_chain_create_bb_process_use): Likewise. (df_chain_add_problem): Change chain_flags parameter to unsigned int. Remove cast. * df-scan.c (df_ref_create): Change ref_flags parameter to int. (df_ref_create_structure, df_def_record_1): Likewise. (df_defs_record, df_uses_record, df_get_call_refs): Likewise. (df_notes_rescan): Change 0 to VOIDmode in function call. (df_get_call_refs, df_insn_refs_collect): Likewise. (df_bb_regs_collect): Likewise. (df_entry_block_defs_collect): Likewise. (df_exit_block_uses_collect): Likewise. * df.h: Update declarations. * double-int.c (double_int_divmod): Add cast to enum type. * dse.c (replace_inc_dec): Reverse parameters to gen_int_mode. * dwarf2out.c (new_reg_loc_descr): Add casts to enum type. (based_loc_descr): Likewise. (loc_descriptor_from_tree_1): Change first_op and second_op to enum dwarf_location_atom. Add cast to enum type. * expmed.c (init_expmed): Change 0 to SET in function call. * expr.c (init_expr_target): Change 0 to VOIDmode in function call. (expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call. (do_store_flag): Likewise. * fixed-value.h (struct fixed_value): Change mode to enum machine_mode. * function.c (assign_parms): Change 0 to VOIDmode in function call. * genautomata.c (insert_automaton_decl): Change 1 to INSERT in function call. (insert_insn_decl, insert_decl, insert_state): Likewise. (automata_list_finish): Likewise. * genrecog.c (process_define_predicate): Add cast to enum type. * gensupport.c (init_predicate_table): Add cast to enum type. * gimple.c (gimple_build_return): Change 0 to ERROR_MARK in function call. (gimple_build_call_1, gimple_build_label): Likewise. (gimple_build_goto, gimple_build_asm_1): Likewise. (gimple_build_switch_1, gimple_build_cdt): Likewise. * gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function call. (enum fallback): Rename from enum fallback_t. (fallback_t): Typedef as int. * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to GSI_SAME_STMT in function call. * ira.c (setup_class_subset_and_memory_move_costs): Add casts to enum type. (setup_reg_class_relations): Likewise. (setup_reg_class_nregs): Change cl to int. Add casts to enum type. (setup_prohibited_class_mode_regs): Add cast to enum type. (setup_prohibited_mode_move_regs): Likewise. * ira-costs.c (record_reg_classes): Change rclass to enum reg_class. (record_address_regs): Change i to enum reg_class. * lists.c (alloc_EXPR_LIST): Add cast to enum type. * machmode.h (GET_MODE_CLASS): Cast value to enum mode_class. (GET_MODE_WIDER_MODE): Cast value to enum machine_mode. (GET_MODE_2XWIDER_MODE): Likewise. (GET_CLASS_NARROWEST_MODE): Likewise. * omp-low.c (expand_omp_for): Add cast to enum type. * optabs.c (debug_optab_libfuncs): Add casts to enum type. * opts.c (enable_warning_as_error): Change kind to diagostic_t. * postreload.c (reload_cse_simplify_operands): Change rclass local to enum reg_class. * predict.c (combine_predictions_for_insn): Change best_predictor and predictor to enum br_predictor. (combine_predictions_for_bb): Likewise. (build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to use SET_PREDICT_EXPR_OUTCOME. * real.c (real_arithmetic): Change icode to code in function call. * reginfo.c (init_move_cost): Add casts to enum type. (init_reg_sets_1, init_fake_stack_mems): Likewise. * regmove.c (regclass_compatible_p): Change class0 and class1 to enum reg_class. * reload.c (find_valid_class): Add casts to enum type. (push_reload): Change 0 to NO_REGS in function call. (find_reloads): Change this_alternative to array of enum reg_class. Remove some now-unnecessary casts. (make_memloc): Change 0 to VOIDmode in function call. * reload1.c (reload): Change 0 to VOIDmode in function call. (eliminate_regs_1, elimination_effects): Likewise. (eliminate_regs_in_insn): Likewise. (emit_input_reload_insns): Add cast to enum type. (delete_output_reload): Change 0 to VOIDmode in function call. * reorg.c (insn_sets_resource_p): Convert include_delayed_effects to enum type in function call. * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type. (SET_PREDICT_EXPR_OUTCOME): Define. * tree-dump.c (get_dump_file_info): Change phase parameter to int. (get_dump_file_name, dump_begin, dump_enabled_p): Likewise. (dump_initialized_p, dump_flag_name, dump_end): Likewise. (dump_function): Likewise. * tree-dump.h: Update declarations. * tree-pass.h: Update declarations. * varasm.c (assemble_integer): Change mclass to enum mode_class. * config/arm/arm.c (thumb_legitimize_reload_address): Add cast to enum type. (arm_rtx_costs_1): Correct parenthesization. (arm_rtx_costs): Add casts to enum type. (adjacent_mem_locations): Reverse arguments to const_ok_for_op. (vfp_emit_fstmd): Use add_rg_note. (emit_multi_reg_push, emit_sfm): Likewise. (thumb_set_frame_pointer): Likewise. (arm_expand_prologue): Likewise. (arm_regno_class): Change return type to enum reg_class. (thumb1_expand_prologue): Use add_reg_note. * config/arm/arm-protos.h (arm_regno_class): Update declaration. * config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL in function call. * config/arm/gentune.sh: Add cast to enum type. * config/arm/arm-tune.md: Rebuild. * config/i386/i386.c (ix86_expand_prologue): Use add_reg_note. (ix86_split_fp_branch, predict_jump): Likewise. (ix86_expand_multi_arg_builtin): Change sub_code from enum insn_code to enum rtx_code. (ix86_builtin_vectorized_function): Add cast to enum type. * config/i386/i386.md (truncdfsf2): Change slot to enum ix86_stack_slot. (truncxf<mode>2, isinf<mode>2): Likewise. * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to enum type. * config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note. (spill_restore_mem, do_spill, ia64_expand_prologue): Likewise. (insert_bundle_state): Change 1 to INSERT in function call. (ia64_add_bundle_selector_before): Likewise. * config/ia64/ia64.md (cpu attr): Add cast to enum type. (save_stack_nonlocal): Change 0 to LCT_NORMAL in function call. (restore_stack_nonlocal): Likewise. * config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/mips/mips.c (mips_binary_cost): Change 0 to SET in function call. (mips_rtx_costs): Likewise. (mips_override_options): Add casts to enum type. * config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/pa/pa.c (legitimize_pic_address): Use add_reg_note. (store_reg, set_reg_plus_d): Likewise. (hppa_expand_prologue, hppa_profile_hook): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add cast to enum type. (altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in function call. (emit_unlikely_jump): Use add_reg_note. (rs6000_emit_allocate_stack): Likewise. (rs6000_frame_related, rs6000_emit_prologue): Likewise. (output_toc): Change 1 to INSERT in function call. (output_profile_hook): Change 0 to LCT_NORMAL in function call. (rs6000_initialize_trampoline): Likewise. (rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in function call. * config/s390/s390.c (s390_rtx_costs): Add cast to enum type. (s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call. (s390_expand_setmem, s390_expand_cmpmem): Likewise. (save_gprs): Use add_reg_note. (s390_emit_prologue): Likewise. (s390_expand_builtin): Change 0 to EXPAND_NORMAL in function call. * config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note. (sparc_fold_builtin): Add cast to enum type. * config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to enum insn_code. (spu_expand_prologue): Use add_reg_note. (expand_builtin_args): Change 0 to EXPAND_NORMAL in function call. * c-parser.c (c_parser_attributes): Change VEC back to tree list. (c_parser_postfix_expression_after_primary): Get VEC for list of arguments. Get original types of arguments. Call build_function_call_vec. (cached_expr_list_1, cached_expr_list_2): New static variables. (c_parser_expr_list): Change return type to VEC *. Add p_orig_types parameter. Change all callers. (c_parser_release_expr): New static function. (c_parser_vec_to_tree_list): New static function. * c-typeck.c (build_function_call): Rewrite to build a VEC and call build_function_call_vec. (build_function_call_vec): New function, based on old build_function_call. (convert_arguments): Remove nargs and argarray parameters. Change values to a VEC. Add origtypes parameter. (build_modify_expr): Add rhs_origtype parameter. Change all callers. (convert_for_assignment): Add origtype parameter. Change all callers. If warn_cxx_compat, check for conversion to an enum type when calling a function. (store_init_value): Add origtype parameter. Change all callers. (digest_init): Likewise. (struct init_node): Add origtype field. (add_pending_init): Add origtype parameter. Change all callers. (output_init_element): Likewise. (output_pending_init_elements): Pass origtype from init_node to output_init_element. (process_init_elemnt): Pass origtype from c_expr to output_init_element. (c_finish_return): Add origtype parameter. Change all callers. * c-common.c (sync_resolve_size): Change params to VEC *. Change caller. (sync_resolve_params): Likewise. (sync_resolve_return): Change params to first_param. Change caller. (resolve_overloaded_builtins): Change params to VEC *. Change callers. Save first parameter around call to build_function_call_vec. * c-decl.c (finish_decl): Add origtype parameter. Change all callers. Call build_function_call_vec rather than build_function_call for cleanup. * c-tree.h: Update declarations. * c-common.h: Update declarations. * stub-objc.c (objc_rewrite_function_call): Change parameter from params to first_param. * target.h (struct gcc_target): Change resolve_overloaded_builtin params parameter from tree to void *. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change arglist parameter to have type void *, and to be a pointer to a VEC. * config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin): Update declaration. * config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change fnargs parameter to have type void *, and to be a pointer to a VEC. Call build_function_call_vec instead of build_function_call. * config/spu/spu-protos.h (spu_expand_builtin): Update declaration. gcc/cp/: * typeck.c (build_function_call_vec): New function. (cp_build_function_call): Only pass first parameter to objc_rewrite_function_call. (build_modify_expr): Add rhs_origtype parameter. Change all callers. * decl.c (finish_decl): Add origtype parameter. Change all callers. * semantics.c (finish_call_expr): Pass VEC to resolve_overloaded_builtin. gcc/objc: * objc-act.c (objc_rewrite_function_call): Change parameter from params to first_param. Change all callers. gcc/testsuite: * gcc.dg/Wcxx-compat-3.c: New testcase. From-SVN: r146451
2009-04-20 21:35:00 +02:00
extern struct dump_file_info *get_dump_file_info (int);
Unify the management of RTL and tree-level dump files. 2004-09-06 Paolo Bonzini <bonzini@gnu.org> Unify the management of RTL and tree-level dump files. * cfgexpand.c (tree_expand_cfg): Fix incorrect comment. Don't print function name to the dump file, the pass manager would do this for us. Add code from the top of rest_of_compilation, up to the initial RTL dump. * passes.c (rest_of_handle_jump): Call fixup_tail_calls and close the DFI_sibling dump file. (rest_of_compilation): Don't do that here. Remove code up to the initial RTL dump. (init_optimization_passes): Remove. (pass_rest_of_compilation): Change pass name to NULL. * toplev.c (lang_dependent_init): Do not use an empty dump file prefix. Do not call init_optimization_passes. * toplev.h (init_optimization_passes): Remove. * graph.c (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Remove SUFFIX parameter. * graph.h (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Likewise. * tree-pass.h (struct tree_opt_pass): Add `letter' field. * cfgexpand.c (pass_expand): Adjust. * gimple-low.c (pass_lower_cf, pass_remove_useless_vars): Adjust. * passes.c (pass_rest_of_compilation): Adjust. * predict.c (pass_profile): Adjust. * tree-alias-common.c (pass_build_pta, pass_del_pta): Adjust. * tree-cfg.c (pass_build_cfg, pass_remove_useless_stmts, pass_split_crit_edges, pass_warn_function_return): Adjust. * tree-complex.c (pass_lower_vector_ssa, pass_pre_expand): Adjust. * tree-dfa.c (pass_referenced_vars): Adjust. * tree-eh.c (pass_lower_eh): Adjust. * tree-if-conv.c (pass_build_ssa): Adjust. * tree-into-ssa.c (pass_build_ssa): Adjust. * tree-mudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nomudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nrv.c (pass_nrv): Adjust. * tree-optimize.c (pass_gimple, pass_all_optimizations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures): Adjust. * tree-outof-ssa.c (pass_del_ssa): Adjust. * tree-profile.c (pass_tree_profile): Adjust. * tree-sra.c (pass_sra): Adjust. * tree-ssa-alias.c (pass_may_alias): Adjust. * tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Adjust. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Adjust. * tree-ssa-dce.c (pass_dce, pass_cd_dce): Adjust. * tree-ssa-dom.c (pass_dominator): Adjust. * tree-ssa-dse.c (pass_dse): Adjust. * tree-ssa-forwprop.c (pass_forwprop): Adjust. * tree-ssa-if-conv.c (pass_if_conversion): Adjust. * tree-ssa-loop-ch.c (pass_ch): Adjust. * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_lim, pass_loop_done, pass_complete_unroll, pass_iv_canon, pass_iv_optimize, pass_vectorize): Adjust. * tree-ssa-phiopt.c (pass_phiopt): Adjust. * tree-ssa-pre.c (pass_pre, pass_fre): Adjust. * tree-ssa.c (pass_redundant_phi, pass_early_warn_uninitialized, pass_late_warn_uninnitialized): Adjust. * tree-tailcall.c (pass_tail_recursion, pass_tail_calls): Adjust. * Makefile.in (tree-dump.o): Add new dependencies. * cgraph.c (cgraph_remove_node): TDF_all -> TDF_tree_all. * cgraphunit.c (cgraph_preserve_function_body_p, cgraph_optimize): Likewise. * toplev.c (dump_file_name): New. * tree-dump.c (dump_enable_all): Add LETTER parameter. (struct dump_file_info): Add NUM and LETTER fields. (dump_files): Adjust and add RTL dump files. (dump_register): Add NUM and LETTER fields. (get_dump_file_name, dump_initialized_p, enable_rtl_dump_file): New. (dump_begin): Use get_dump_file_name. (dump_switch_p_1): Adjust call to dump_enable_all. * tree-dump.h (dump_register): Adjust prototype. * tree-optimize.c (register_one_dump_file): Take dump file index. Support flags for RTL dumps. (register_dump_files): Fill in NUM field of struct dump_file_info. Track properties both when the gate is executed and when it is not. (execute_todo): Dump RTL. Add PROPERTIES parameter. (execute_one_pass): Pass properties to execute_todo. Handle VCG dumps of RTL. * tree-pass.h (dump_file_name): New. * tree.h (TDF_TREE, TDF_RTL, get_dump_file_name, dump_initialized_p): New. * Makefile.in (passes.o): Add new dependencies. * passes.c (struct dump_file_info, enum dump_file_index, dump_file_tbl, init_optimization_passes): Remove. (open_dump_file, close_dump_file): Use tree-dumping infrastructure. (rest_of_handle_new_regalloc, rest_of_handle_old_regalloc): Use dump_enabled_p. (finish_optimization_passes): Update finish_graph_dump_file loop. (enable_rtl_dump_file): Remove. * tree-dump.c (dump_files): Adjust and add RTL dump files. (enable_rtl_dump_file): Add here. * tree.h (enum tree_dump_index): Add RTL dump file indices. * doc/invoke.texi (Debugging options): Document new RTL debugging options. Update. From-SVN: r87113
2004-09-06 12:08:17 +02:00
basic-block.h (enum profile_status): Break out of struct control_flow_graph. ./: * basic-block.h (enum profile_status): Break out of struct control_flow_graph. * cgraph.h (struct inline_summary): Break out of struct cgraph_local_info. * cgraphunit.c (enum cgraph_order_sort_kind): New enum, broken out of struct cgraph_order_sort. * combine.c (enum undo_kind): New enum, broken out of struct undo. * cse.c (struct branch_path): Break out of struct cse_basic_block_data. * except.h (enum eh_region_type): Break out of struct eh_region. * gcc.c (enum add_del): Break out of struct modify_target. * genrecog.c (enum decision_type): Break out of struct decision_test. * ggc-page.c (struct ggc_pch_ondisk): Break out of struct ggc_pch_data. * matrix-reorg.c (struct free_info): Break out of struct matrix_info. * regmove.c (enum match_use): New enum, broken out of struct match. * sched-int.h (enum post_call_group): New enum, broken out of struct deps. (struct deps_reg): Break out of struct deps. * target.h (struct asm_int_op): Break out of struct gcc_target. * tree-eh.c (struct goto_queue_node): Break out of struct leh_tf_state. * tree-inline.h (enum copy_body_cge_which): Break out of copy_body_data. * tree-pass.h (enum opt_pass_type): Break out of struct opt_pass. * c-decl.c (in_struct, struct_types): New static variables. (pushtag): Add loc parameter. Change all callers. (lookup_tag): Add ploc parameter. Change all callers. (check_compound_literal_type): New function. (parser_xref_tag): Add loc parameter. Change all callers. If -Wc++-compat, warn about struct/union/enum types defined within a struct or union. (start_struct): Add enclosing_in_struct, enclosing_struct_types, and loc parameters. Change all callers. Change error calls to error_at, using loc. For a redefinition, if the location of the original definition is known, report it. Set in_struct and struct_types. If -Wc++-compat warn if in sizeof, typeof, or alignof. (finish_struct): Add new parameters enclosing_in_struct and enclosing_struct_types. Change all callers. Set C_TYPE_DEFINED_IN_STRUCT for all struct/union/enum types defined in the struct. If in a struct, add this struct to struct_types. (start_enum): Add loc parameter. Change all callers. Use error_at for errors, using loc. For a redefinition, if the location of the original definition is known, report it. If in a struct, add this enum type to struct_types. If -Wc++-compat warn if in sizeof, typeof, or alignof. * c-parser.c (disable_extension_diagnostics): Disable -Wc++-compat. (enable_extension_diagnostics): Reenable -Wc++-compat if appropriate. (c_parser_enum_specifier): Get enum location for start_enum. (c_parser_struct_or_union_specifier): Get struct location for start_struct. Save in_struct and struct_types status between start_struct and finish_struct. (c_parser_cast_expression): Get location of cast. (c_parser_alignof_expression): Get location of type. (c_parser_postfix_expression): Likewise. (c_parser_postfix_expression_after_paren_type): Add type_loc parameter. Change all callers. Call check_compound_literal_type. Use type_loc for error about variable size type. * c-typeck.c (build_external_ref): If -Wc++-compat, warn about a use of an enum constant from an enum type defined in a struct or union. (c_cast_expr): Add loc parameter. Change all callers. If -Wc++-compat, warn about defining a type in a cast. * c-tree.h (C_TYPE_DEFINED_IN_STRUCT): Define. (start_enum, start_struct, finish_struct): Update declarations. (parser_xref_tag, c_cast_expr): Update declarations. (check_compound_literal_type): Declare. fortran/: * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of gfc_omp_clauses. (enum gfc_omp_default_sharing): Likewise. * module.c (enum gfc_rsym_state): New enum, broken out of pointer_info. (enum gfc_wsym_state): Likewise. * parse.c (enum state_order): New enum, broken out of st_state. objc/: * objc-act.c (objc_building_struct): New static variable. (objc_in_struct, objc_struct_types): New static variables. (objc_start_struct, objc_finish_struct): New static functions. (generate_struct_by_value_array): Call objc_start_struct instead of start_struct, and call objc_finish_struct instead of finish_struct. (objc_build_struct, build_objc_symtab_template): Likewise. (build_module_descriptor): Likewise. (build_next_objc_exception_stuff): Likewise. (build_protocol_template): Likewise. (build_method_prototype_list_template): Likewise. (build_method_prototype_template): Likewise. (build_category_template, build_selector_template): Likewise. (build_class_template, build_super_template): Likewise. (build_ivar_template, build_ivar_list_template): Likewise. (build_method_list_template): Likewise. (build_method_template): Likewise. objcp/: * objcp-decl.h (start_struct): Add three new, ignored, macro parameters. (finish_struct): Add two new, ignored, macro parameters. testsuite/: * gcc.dg/Wcxx-compat-7.c: New testcase. * gcc.dg/Wcxx-compat-8.c: New testcase. * gcc.dg/c99-tag-1.c: Recognize new "originally defined here" notes * gcc.dg/pr17188-1.c: Likewise. * gcc.dg/pr39084.c: Likewise. From-SVN: r147358
2009-05-11 03:02:40 +02:00
/* Optimization pass type. */
enum opt_pass_type
{
GIMPLE_PASS,
RTL_PASS,
SIMPLE_IPA_PASS,
IPA_PASS
};
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
/* Describe one pass; this is the common part shared across different pass
types. */
struct opt_pass
{
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
/* Optimization pass type. */
basic-block.h (enum profile_status): Break out of struct control_flow_graph. ./: * basic-block.h (enum profile_status): Break out of struct control_flow_graph. * cgraph.h (struct inline_summary): Break out of struct cgraph_local_info. * cgraphunit.c (enum cgraph_order_sort_kind): New enum, broken out of struct cgraph_order_sort. * combine.c (enum undo_kind): New enum, broken out of struct undo. * cse.c (struct branch_path): Break out of struct cse_basic_block_data. * except.h (enum eh_region_type): Break out of struct eh_region. * gcc.c (enum add_del): Break out of struct modify_target. * genrecog.c (enum decision_type): Break out of struct decision_test. * ggc-page.c (struct ggc_pch_ondisk): Break out of struct ggc_pch_data. * matrix-reorg.c (struct free_info): Break out of struct matrix_info. * regmove.c (enum match_use): New enum, broken out of struct match. * sched-int.h (enum post_call_group): New enum, broken out of struct deps. (struct deps_reg): Break out of struct deps. * target.h (struct asm_int_op): Break out of struct gcc_target. * tree-eh.c (struct goto_queue_node): Break out of struct leh_tf_state. * tree-inline.h (enum copy_body_cge_which): Break out of copy_body_data. * tree-pass.h (enum opt_pass_type): Break out of struct opt_pass. * c-decl.c (in_struct, struct_types): New static variables. (pushtag): Add loc parameter. Change all callers. (lookup_tag): Add ploc parameter. Change all callers. (check_compound_literal_type): New function. (parser_xref_tag): Add loc parameter. Change all callers. If -Wc++-compat, warn about struct/union/enum types defined within a struct or union. (start_struct): Add enclosing_in_struct, enclosing_struct_types, and loc parameters. Change all callers. Change error calls to error_at, using loc. For a redefinition, if the location of the original definition is known, report it. Set in_struct and struct_types. If -Wc++-compat warn if in sizeof, typeof, or alignof. (finish_struct): Add new parameters enclosing_in_struct and enclosing_struct_types. Change all callers. Set C_TYPE_DEFINED_IN_STRUCT for all struct/union/enum types defined in the struct. If in a struct, add this struct to struct_types. (start_enum): Add loc parameter. Change all callers. Use error_at for errors, using loc. For a redefinition, if the location of the original definition is known, report it. If in a struct, add this enum type to struct_types. If -Wc++-compat warn if in sizeof, typeof, or alignof. * c-parser.c (disable_extension_diagnostics): Disable -Wc++-compat. (enable_extension_diagnostics): Reenable -Wc++-compat if appropriate. (c_parser_enum_specifier): Get enum location for start_enum. (c_parser_struct_or_union_specifier): Get struct location for start_struct. Save in_struct and struct_types status between start_struct and finish_struct. (c_parser_cast_expression): Get location of cast. (c_parser_alignof_expression): Get location of type. (c_parser_postfix_expression): Likewise. (c_parser_postfix_expression_after_paren_type): Add type_loc parameter. Change all callers. Call check_compound_literal_type. Use type_loc for error about variable size type. * c-typeck.c (build_external_ref): If -Wc++-compat, warn about a use of an enum constant from an enum type defined in a struct or union. (c_cast_expr): Add loc parameter. Change all callers. If -Wc++-compat, warn about defining a type in a cast. * c-tree.h (C_TYPE_DEFINED_IN_STRUCT): Define. (start_enum, start_struct, finish_struct): Update declarations. (parser_xref_tag, c_cast_expr): Update declarations. (check_compound_literal_type): Declare. fortran/: * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of gfc_omp_clauses. (enum gfc_omp_default_sharing): Likewise. * module.c (enum gfc_rsym_state): New enum, broken out of pointer_info. (enum gfc_wsym_state): Likewise. * parse.c (enum state_order): New enum, broken out of st_state. objc/: * objc-act.c (objc_building_struct): New static variable. (objc_in_struct, objc_struct_types): New static variables. (objc_start_struct, objc_finish_struct): New static functions. (generate_struct_by_value_array): Call objc_start_struct instead of start_struct, and call objc_finish_struct instead of finish_struct. (objc_build_struct, build_objc_symtab_template): Likewise. (build_module_descriptor): Likewise. (build_next_objc_exception_stuff): Likewise. (build_protocol_template): Likewise. (build_method_prototype_list_template): Likewise. (build_method_prototype_template): Likewise. (build_category_template, build_selector_template): Likewise. (build_class_template, build_super_template): Likewise. (build_ivar_template, build_ivar_list_template): Likewise. (build_method_list_template): Likewise. (build_method_template): Likewise. objcp/: * objcp-decl.h (start_struct): Add three new, ignored, macro parameters. (finish_struct): Add two new, ignored, macro parameters. testsuite/: * gcc.dg/Wcxx-compat-7.c: New testcase. * gcc.dg/Wcxx-compat-8.c: New testcase. * gcc.dg/c99-tag-1.c: Recognize new "originally defined here" notes * gcc.dg/pr17188-1.c: Likewise. * gcc.dg/pr39084.c: Likewise. From-SVN: r147358
2009-05-11 03:02:40 +02:00
enum opt_pass_type type;
/* Terse name of the pass used as a fragment of the dump file
name. If the name starts with a star, no dump happens. */
const char *name;
/* If non-null, this pass and all sub-passes are executed only if
the function returns true. */
bool (*gate) (void);
/* This is the code to run. If null, then there should be sub-passes
tree-vrp.c (execute_vrp): Return value. 2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-03-02 20:00:11 +01:00
otherwise this pass does nothing. The return value contains
TODOs to execute in addition to those in TODO_flags_finish. */
unsigned int (*execute) (void);
/* A list of sub-passes to run, dependent on gate predicate. */
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
struct opt_pass *sub;
/* Next in the list of passes to run, independent of gate predicate. */
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
struct opt_pass *next;
/* Static pass number, used as a fragment of the dump file name. */
int static_pass_number;
/* The timevar id associated with this pass. */
/* ??? Ideally would be dynamically assigned. */
df.h: Include "timevar.h". * df.h: Include "timevar.h". (struct df_problem): Change tv_id field to timevar_id_t. * tree-pass.h: Include "timevar.h". (struct opt_pass): Change tv_id field to timevar_id_t. * timevar.h (timevar_id_t): Define TV_NONE. * passes.c (execute_one_ipa_transform_pass): Check for tv_id != TV_NONE rather than tv_id != 0. (execute_one_pass): Likewise. * Makefile.in (DF_H): Add $(TIMEVAR_H). (TREE_PASS_H): Define. Change all instances of tree-pass.h in dependencies to $(TREE_PASS_H). * bt-load.c (pass_branch_target_load_optimize1): Set tv_id field to TV_NONE. (pass_branch_target_load_optimize2): Likewise. * cfglayout.c (pass_into_cfg_layout_mode): Likewise. (pass_outof_cfg_layout_mode): Likewise. * cgraphbuild.c (pass_remove_cgraph_callee_edges): Likewise. (pass_rebuild_cgraph_edges): Likewise. (pass_remove_cgraph_callee_edges): Likewise. * df-core.c (pass_df_initialize_opt): Likewise. (pass_df_initialize_no_opt): Likewise. (pass_df_finish): Likewise. * emit-rtl.c (pass_unshare_all_rtl): Likewise. * except.c (pass_set_nothrow_function_flags): Likewise. (pass_convert_to_eh_region_ranges): Likewise. * final.c (pass_compute_alignments): Likewise. * function.c (pass_instantiate_virtual_regs): Likewise. (pass_init_function): Likewise. (pass_leaf_regs): Likewise. (pass_match_asm_constraints): Likewise. * gimple-low.c (pass_lower_cf): Likewise. (pass_mark_used_blocks): Likewise. * init-regs.c (pass_initialize_regs): Likewise. * integrate.c (pass_initial_value_sets): Likewise. * ira.c (pass_ira): Likewise. * jump.c (pass_cleanup_barriers): Likewise. * omp-low.c (pass_expand_omp): Likewise. (pass_lower_omp): Likewise. * matrix-reorg.c (pass_ipa_matrix_reorg): Likewise. * recog.c (pass_split_all_insns): Likewise. (pass_split_after_reload): Likewise. (pass_split_before_regstack): Likewise. (pass_split_before_sched2): Likewise. (pass_split_for_shorten_branches): Likewise. * reginfo.c (pass_reginfo_init): Likewise. (pass_subregs_of_mode_init): Likewise. (pass_subregs_of_mode_finish): Likewise. * passes.c (pass_postreload): Likewise. * stack-ptr-mod.c (pass_stack_ptr_mod): Likewise. * tree-cfg.c (pass_remove_useless_stmts): Likewise. (pass_warn_function_return): Likewise. (pass_warn_function_noreturn): Likewise. * tree-complex.c (pass_lower_complex): Likewise. (pass_lower_complex_O0): Likewise. * tree-if-conv.c (pass_if_conversion): Likewise. * tree-into-ssa.c (pass_build_ssa): Likewise. * tree-mudflap.c (pass_mudflap_1): Likewise. (pass_mudflap_2): Likewise. * tree-nomudflap.c (pass_mudflap_1): Likewise. (pass_mudflap_2): Likewise. * tree-nrv.c (pass_return_slot): Likewise. * tree-object-size.c (pass_object_sizes): Likewise. * tree-optimize.c (pass_all_optimizations): Likewise. (pass_early_local_passes): Likewise. (pass_all_early_optimizations): Likewise. (pass_cleanup_cfg): Likewise. (pass_cleanup_cfg_post_optimizing): Likewise. (pass_free_datastructures): Likewise. (pass_free_cfg_annotations): Likewise. (pass_fixup_cfg): Likewise. (pass_init_datastructures): Likewise. * tree-ssa.c (pass_early_warn_uninitialized): Likewise. (pass_late_warn_uninitialized): Likewise. (pass_update_address_taken): Likewise. * tree-ssa-ccp.c (pass_fold_builtins): Likewise. * tree-ssa-math-opts.c (pass_cse_reciprocals): Likewise. (pass_cse_sincos): Likewise. (pass_convert_to_rsqrt): Likewise. * tree-ssa-structalias.c (pass_build_alias): Likewise. * tree-stdarg.c (pass_stdarg): Likewise. * tree-tailcall.c (pass_tail_recursion): Likewise. (pass_tail_calls): Likewise. * tree-vect-generic.c (pass_lower_vector): Likewise. (pass_lower_vector_ssa): Likewise. * tree-vectorizer.c (pass_ipa_increase_alignment): Likewise. From-SVN: r146222
2009-04-17 07:40:46 +02:00
timevar_id_t tv_id;
/* Sets of properties input and output from this pass. */
unsigned int properties_required;
unsigned int properties_provided;
unsigned int properties_destroyed;
/* Flags indicating common sets things to do before and after. */
unsigned int todo_flags_start;
unsigned int todo_flags_finish;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
};
/* Description of GIMPLE pass. */
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
struct gimple_opt_pass
{
struct opt_pass pass;
};
Unify the management of RTL and tree-level dump files. 2004-09-06 Paolo Bonzini <bonzini@gnu.org> Unify the management of RTL and tree-level dump files. * cfgexpand.c (tree_expand_cfg): Fix incorrect comment. Don't print function name to the dump file, the pass manager would do this for us. Add code from the top of rest_of_compilation, up to the initial RTL dump. * passes.c (rest_of_handle_jump): Call fixup_tail_calls and close the DFI_sibling dump file. (rest_of_compilation): Don't do that here. Remove code up to the initial RTL dump. (init_optimization_passes): Remove. (pass_rest_of_compilation): Change pass name to NULL. * toplev.c (lang_dependent_init): Do not use an empty dump file prefix. Do not call init_optimization_passes. * toplev.h (init_optimization_passes): Remove. * graph.c (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Remove SUFFIX parameter. * graph.h (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Likewise. * tree-pass.h (struct tree_opt_pass): Add `letter' field. * cfgexpand.c (pass_expand): Adjust. * gimple-low.c (pass_lower_cf, pass_remove_useless_vars): Adjust. * passes.c (pass_rest_of_compilation): Adjust. * predict.c (pass_profile): Adjust. * tree-alias-common.c (pass_build_pta, pass_del_pta): Adjust. * tree-cfg.c (pass_build_cfg, pass_remove_useless_stmts, pass_split_crit_edges, pass_warn_function_return): Adjust. * tree-complex.c (pass_lower_vector_ssa, pass_pre_expand): Adjust. * tree-dfa.c (pass_referenced_vars): Adjust. * tree-eh.c (pass_lower_eh): Adjust. * tree-if-conv.c (pass_build_ssa): Adjust. * tree-into-ssa.c (pass_build_ssa): Adjust. * tree-mudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nomudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nrv.c (pass_nrv): Adjust. * tree-optimize.c (pass_gimple, pass_all_optimizations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures): Adjust. * tree-outof-ssa.c (pass_del_ssa): Adjust. * tree-profile.c (pass_tree_profile): Adjust. * tree-sra.c (pass_sra): Adjust. * tree-ssa-alias.c (pass_may_alias): Adjust. * tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Adjust. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Adjust. * tree-ssa-dce.c (pass_dce, pass_cd_dce): Adjust. * tree-ssa-dom.c (pass_dominator): Adjust. * tree-ssa-dse.c (pass_dse): Adjust. * tree-ssa-forwprop.c (pass_forwprop): Adjust. * tree-ssa-if-conv.c (pass_if_conversion): Adjust. * tree-ssa-loop-ch.c (pass_ch): Adjust. * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_lim, pass_loop_done, pass_complete_unroll, pass_iv_canon, pass_iv_optimize, pass_vectorize): Adjust. * tree-ssa-phiopt.c (pass_phiopt): Adjust. * tree-ssa-pre.c (pass_pre, pass_fre): Adjust. * tree-ssa.c (pass_redundant_phi, pass_early_warn_uninitialized, pass_late_warn_uninnitialized): Adjust. * tree-tailcall.c (pass_tail_recursion, pass_tail_calls): Adjust. * Makefile.in (tree-dump.o): Add new dependencies. * cgraph.c (cgraph_remove_node): TDF_all -> TDF_tree_all. * cgraphunit.c (cgraph_preserve_function_body_p, cgraph_optimize): Likewise. * toplev.c (dump_file_name): New. * tree-dump.c (dump_enable_all): Add LETTER parameter. (struct dump_file_info): Add NUM and LETTER fields. (dump_files): Adjust and add RTL dump files. (dump_register): Add NUM and LETTER fields. (get_dump_file_name, dump_initialized_p, enable_rtl_dump_file): New. (dump_begin): Use get_dump_file_name. (dump_switch_p_1): Adjust call to dump_enable_all. * tree-dump.h (dump_register): Adjust prototype. * tree-optimize.c (register_one_dump_file): Take dump file index. Support flags for RTL dumps. (register_dump_files): Fill in NUM field of struct dump_file_info. Track properties both when the gate is executed and when it is not. (execute_todo): Dump RTL. Add PROPERTIES parameter. (execute_one_pass): Pass properties to execute_todo. Handle VCG dumps of RTL. * tree-pass.h (dump_file_name): New. * tree.h (TDF_TREE, TDF_RTL, get_dump_file_name, dump_initialized_p): New. * Makefile.in (passes.o): Add new dependencies. * passes.c (struct dump_file_info, enum dump_file_index, dump_file_tbl, init_optimization_passes): Remove. (open_dump_file, close_dump_file): Use tree-dumping infrastructure. (rest_of_handle_new_regalloc, rest_of_handle_old_regalloc): Use dump_enabled_p. (finish_optimization_passes): Update finish_graph_dump_file loop. (enable_rtl_dump_file): Remove. * tree-dump.c (dump_files): Adjust and add RTL dump files. (enable_rtl_dump_file): Add here. * tree.h (enum tree_dump_index): Add RTL dump file indices. * doc/invoke.texi (Debugging options): Document new RTL debugging options. Update. From-SVN: r87113
2004-09-06 12:08:17 +02:00
cgraph.c: Fix typos in comments. gcc/ * cgraph.c: Fix typos in comments. (cgraph_availability_names): Fix string typo. * fold-const.c: Fix typos in comments. (fold_binary): Fix typo in warning. * genautomata.c: Fix typos in comments. (check_presence_pattern_sets): Fix typo in local variable. (output_description): Fix typo in output. * ggc-zone.c (ggc_pch_finish): Fix typo in error message. * hwint.h: Likewise. * matrix-reorg.c (check_allocation_function): Likewise. * omega.c (smooth_weird_equations): Likewise. * auto-inc-dec.c: Fix typos in comments. * bb-reorder.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfglayout.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * gimplify.c: Likewise. * gthr-lynx.h: Likewise. * haifa-sched.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa.c: Likewise. * loop-doloop.c: Likewise. * mips-tfile.c: Likewise. * mkmap-flat.awk: Likewise. * mkmap-symver.awk: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-conflict.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * scan.h: Likewise. * sched-rgn.c: Likewise. * see.c: Likewise. * stmt.c: Likewise. * target.h: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-analyze.c: Likewise. * tree-vect-transform.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vn.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * unwind-dw2-fde.c: Likewise. * unwind.inc: Likewise. * value-prof.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r136425
2008-06-06 07:42:00 +02:00
/* Description of RTL pass. */
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
struct rtl_opt_pass
{
struct opt_pass pass;
};
struct varpool_node;
struct cgraph_node;
struct cgraph_node_set_def;
* lto-symtab.c (lto_symtab_entry_def) Add vnode. (lto_varpool_replace_node): New. (lto_symtab_resolve_symbols): Resolve varpool nodes. (lto_symtab_merge_decls_1): Prefer decls with varpool node. (lto_symtab_merge_cgraph_nodes_1): Merge varpools. * cgraph.h (varpool_node_ptr): New type. (varpool_node_ptr): New vector. (varpool_node_set_def): New structure. (varpool_node_set): New type. (varpool_node_set): New vector. (varpool_node_set_element_def): New structure. (varpool_node_set_element, const_varpool_node_set_element): New types. (varpool_node_set_iterator): New type. (varpool_node): Add prev pointers, add used_from_other_partition, in_other_partition. (varpool_node_set_new, varpool_node_set_find, varpool_node_set_add, varpool_node_set_remove, dump_varpool_node_set, debug_varpool_node_set, varpool_get_node, varpool_remove_node): Declare. (vsi_end_p, vsi_next, vsi_node, vsi_start, varpool_node_in_set_p, varpool_node_set_size): New inlines. * cgraph.c (dump_cgraph_node): Dump asm names of aliases. * tree-pass.h (varpool_node_set_def): Forward declare. (ipa_opt_pass_d): Summary writting takes vnode sets too. (ipa_write_optimization_summaries): Update prototype. * ipa-cp.c (ipcp_write_summary): Update. * ipa-reference.c (ipa_reference_write_summary): Update. * lto-cgraph.c (lto_output_varpool_node): New static function. (output_varpool): New function. (input_varpool_node): New static function. (input_varpool_1): New function. (input_cgraph): Input varpool. * ipa-pure-const.c (pure_const_write_summary): Update. * lto-streamer-out.c (lto_output): Update, output varpool too. (write_global_stream): Kill WPA hack. (produce_asm_for_decls): Update. (output_alias_pair_p): Handle variables. (output_unreferenced_globals): Output only needed partition of varpool. * ipa-inline.c (inline_write_summary): Update. * lto-streamer-in.c (lto_input_tree_ref, lto_input_tree): Do not build cgraph. * lto-section-in.c (lto_section_name): Add varpool and jump funcs. * ipa.c (hash_varpool_node_set_element, eq_varpool_node_set_element, varpool_node_set_new, varpool_node_set_add, varpool_node_set_remove, varpool_node_set_find, dump_varpool_node_set, debug_varpool_node_set): New functions. * passes.c (rest_of_decl_compilation): when in LTO do not finalize. (execute_one_pass): Process new decls too. (ipa_write_summaries_2): Pass around vsets. (ipa_write_summaries_1): Likewise. (ipa_write_summaries): Build vset; be more selective about cgraph nodes to add. (ipa_write_optimization_summaries_1): Pass around vsets. (ipa_write_optimization_summaries): Likewise. * varpool.c (varpool_get_node): New. (varpool_node): Update doubly linked lists. (varpool_remove_node): New. (dump_varpool_node): More dumping. (varpool_enqueue_needed_node): Update doubly linked lists. (decide_is_variable_needed): Kill ltrans hack. (varpool_finalize_decl): Kill lto hack. (varpool_assemble_decl): Skip decls in other partitions. (varpool_assemble_pending_decls): Update doubly linkes lists. (varpool_empty_needed_queue): Likewise. (varpool_extra_name_alias): Likewise. * lto-streamer.c (lto_get_section_name): Add vars section. * lto-streamer.h (lto_section_type): Update. (output_varpool, input_varpool): Declare. * lto.c (lto_varpool_node_sets): New. (lto_1_to_1_map): Partition varpool too. (globalize_context_t, globalize_cross_file_statics, lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node, lto_scan_statics_in_remaining_global_vars): Remove. (lto_promote_cross_file_statics): Rewrite. (get_filename_for_set): Take vset argument. (lto_wpa_write_files): Pass around vsets. From-SVN: r158854
2010-04-29 09:10:38 +02:00
struct varpool_node_set_def;
/* Description of IPA pass with generate summary, write, execute, read and
transform stages. */
alias.c (struct alias_set_entry_d): Rename from struct alias_set_entry. gcc/ChangeLog: * alias.c (struct alias_set_entry_d): Rename from struct alias_set_entry. Change all uses. * except.c (struct call_site_record_d): Rename from struct call_site_record. Change all uses. * except.h (struct eh_region_d): Rename from struct eh_region. Change all uses. * gcse.c (struct hash_table_d): Rename from struct hash_table. Change all uses. * graphite.c (struct ivtype_map_elt_d): Rename fromstruct ivtype_map_elt. Change all uses. (struct rename_map_elt_d): Rename fromstruct rename_map_elt. Change all uses. (struct ifsese_d): Rename fromstruct ifsese. Change all uses. * graphite.h (struct name_tree_d): Rename from struct name_tree. Change all uses. (struct sese_d): Rename from struct sese. Change all uses. * omega.h (struct eqn_d): Rename from struct eqn. Change all uses. (struct omega_pb_d): Rename from struct omega_pb. Change all uses. * optabs.h (struct optab_d): Rename from struct optab. Change all uses. (struct convert_optab_d): Rename from struct convert_optab. Change all uses. * tree-pass.h (struct ipa_opt_pass_d): Rename fromstruct ipa_opt_pass. Change all uses. * tree-predcom.c (struct dref_d): Rename from struct dref. Change all uses. * c-decl.c (pushtag): If -Wc++-compat, warn if the tag is already defined as a typedef. (grokdeclarator): If -Wc++-compat, warn if a typedef is already defined as a tag. gcc/cp/ChangeLog: * cp-tree.h (enum cp_lvalue_kind_flags): Rename from cp_lvalue_kind. Change all uses. (enum base_access_flags): Rename from enum base_access. Change all uses. * parser.c (enum cp_parser_flags): Remove enum tag. gcc/testsuite/ChangeLog: * gcc.dg/Wcxx-compat-10.c: New testcase. libcpp/ChangeLog: * include/cpplib.h (enum cpp_builtin_type): Rename from enum builtin_type. Change all uses. From-SVN: r147605
2009-05-16 08:54:11 +02:00
struct ipa_opt_pass_d
{
struct opt_pass pass;
/* IPA passes can analyze function body and variable initializers
using this hook and produce summary. */
void (*generate_summary) (void);
/* This hook is used to serialize IPA summaries on disk. */
* lto-symtab.c (lto_symtab_entry_def) Add vnode. (lto_varpool_replace_node): New. (lto_symtab_resolve_symbols): Resolve varpool nodes. (lto_symtab_merge_decls_1): Prefer decls with varpool node. (lto_symtab_merge_cgraph_nodes_1): Merge varpools. * cgraph.h (varpool_node_ptr): New type. (varpool_node_ptr): New vector. (varpool_node_set_def): New structure. (varpool_node_set): New type. (varpool_node_set): New vector. (varpool_node_set_element_def): New structure. (varpool_node_set_element, const_varpool_node_set_element): New types. (varpool_node_set_iterator): New type. (varpool_node): Add prev pointers, add used_from_other_partition, in_other_partition. (varpool_node_set_new, varpool_node_set_find, varpool_node_set_add, varpool_node_set_remove, dump_varpool_node_set, debug_varpool_node_set, varpool_get_node, varpool_remove_node): Declare. (vsi_end_p, vsi_next, vsi_node, vsi_start, varpool_node_in_set_p, varpool_node_set_size): New inlines. * cgraph.c (dump_cgraph_node): Dump asm names of aliases. * tree-pass.h (varpool_node_set_def): Forward declare. (ipa_opt_pass_d): Summary writting takes vnode sets too. (ipa_write_optimization_summaries): Update prototype. * ipa-cp.c (ipcp_write_summary): Update. * ipa-reference.c (ipa_reference_write_summary): Update. * lto-cgraph.c (lto_output_varpool_node): New static function. (output_varpool): New function. (input_varpool_node): New static function. (input_varpool_1): New function. (input_cgraph): Input varpool. * ipa-pure-const.c (pure_const_write_summary): Update. * lto-streamer-out.c (lto_output): Update, output varpool too. (write_global_stream): Kill WPA hack. (produce_asm_for_decls): Update. (output_alias_pair_p): Handle variables. (output_unreferenced_globals): Output only needed partition of varpool. * ipa-inline.c (inline_write_summary): Update. * lto-streamer-in.c (lto_input_tree_ref, lto_input_tree): Do not build cgraph. * lto-section-in.c (lto_section_name): Add varpool and jump funcs. * ipa.c (hash_varpool_node_set_element, eq_varpool_node_set_element, varpool_node_set_new, varpool_node_set_add, varpool_node_set_remove, varpool_node_set_find, dump_varpool_node_set, debug_varpool_node_set): New functions. * passes.c (rest_of_decl_compilation): when in LTO do not finalize. (execute_one_pass): Process new decls too. (ipa_write_summaries_2): Pass around vsets. (ipa_write_summaries_1): Likewise. (ipa_write_summaries): Build vset; be more selective about cgraph nodes to add. (ipa_write_optimization_summaries_1): Pass around vsets. (ipa_write_optimization_summaries): Likewise. * varpool.c (varpool_get_node): New. (varpool_node): Update doubly linked lists. (varpool_remove_node): New. (dump_varpool_node): More dumping. (varpool_enqueue_needed_node): Update doubly linked lists. (decide_is_variable_needed): Kill ltrans hack. (varpool_finalize_decl): Kill lto hack. (varpool_assemble_decl): Skip decls in other partitions. (varpool_assemble_pending_decls): Update doubly linkes lists. (varpool_empty_needed_queue): Likewise. (varpool_extra_name_alias): Likewise. * lto-streamer.c (lto_get_section_name): Add vars section. * lto-streamer.h (lto_section_type): Update. (output_varpool, input_varpool): Declare. * lto.c (lto_varpool_node_sets): New. (lto_1_to_1_map): Partition varpool too. (globalize_context_t, globalize_cross_file_statics, lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node, lto_scan_statics_in_remaining_global_vars): Remove. (lto_promote_cross_file_statics): Rewrite. (get_filename_for_set): Take vset argument. (lto_wpa_write_files): Pass around vsets. From-SVN: r158854
2010-04-29 09:10:38 +02:00
void (*write_summary) (struct cgraph_node_set_def *,
struct varpool_node_set_def *);
/* This hook is used to deserialize IPA summaries from disk. */
void (*read_summary) (void);
/* This hook is used to serialize IPA optimization summaries on disk. */
* lto-symtab.c (lto_symtab_entry_def) Add vnode. (lto_varpool_replace_node): New. (lto_symtab_resolve_symbols): Resolve varpool nodes. (lto_symtab_merge_decls_1): Prefer decls with varpool node. (lto_symtab_merge_cgraph_nodes_1): Merge varpools. * cgraph.h (varpool_node_ptr): New type. (varpool_node_ptr): New vector. (varpool_node_set_def): New structure. (varpool_node_set): New type. (varpool_node_set): New vector. (varpool_node_set_element_def): New structure. (varpool_node_set_element, const_varpool_node_set_element): New types. (varpool_node_set_iterator): New type. (varpool_node): Add prev pointers, add used_from_other_partition, in_other_partition. (varpool_node_set_new, varpool_node_set_find, varpool_node_set_add, varpool_node_set_remove, dump_varpool_node_set, debug_varpool_node_set, varpool_get_node, varpool_remove_node): Declare. (vsi_end_p, vsi_next, vsi_node, vsi_start, varpool_node_in_set_p, varpool_node_set_size): New inlines. * cgraph.c (dump_cgraph_node): Dump asm names of aliases. * tree-pass.h (varpool_node_set_def): Forward declare. (ipa_opt_pass_d): Summary writting takes vnode sets too. (ipa_write_optimization_summaries): Update prototype. * ipa-cp.c (ipcp_write_summary): Update. * ipa-reference.c (ipa_reference_write_summary): Update. * lto-cgraph.c (lto_output_varpool_node): New static function. (output_varpool): New function. (input_varpool_node): New static function. (input_varpool_1): New function. (input_cgraph): Input varpool. * ipa-pure-const.c (pure_const_write_summary): Update. * lto-streamer-out.c (lto_output): Update, output varpool too. (write_global_stream): Kill WPA hack. (produce_asm_for_decls): Update. (output_alias_pair_p): Handle variables. (output_unreferenced_globals): Output only needed partition of varpool. * ipa-inline.c (inline_write_summary): Update. * lto-streamer-in.c (lto_input_tree_ref, lto_input_tree): Do not build cgraph. * lto-section-in.c (lto_section_name): Add varpool and jump funcs. * ipa.c (hash_varpool_node_set_element, eq_varpool_node_set_element, varpool_node_set_new, varpool_node_set_add, varpool_node_set_remove, varpool_node_set_find, dump_varpool_node_set, debug_varpool_node_set): New functions. * passes.c (rest_of_decl_compilation): when in LTO do not finalize. (execute_one_pass): Process new decls too. (ipa_write_summaries_2): Pass around vsets. (ipa_write_summaries_1): Likewise. (ipa_write_summaries): Build vset; be more selective about cgraph nodes to add. (ipa_write_optimization_summaries_1): Pass around vsets. (ipa_write_optimization_summaries): Likewise. * varpool.c (varpool_get_node): New. (varpool_node): Update doubly linked lists. (varpool_remove_node): New. (dump_varpool_node): More dumping. (varpool_enqueue_needed_node): Update doubly linked lists. (decide_is_variable_needed): Kill ltrans hack. (varpool_finalize_decl): Kill lto hack. (varpool_assemble_decl): Skip decls in other partitions. (varpool_assemble_pending_decls): Update doubly linkes lists. (varpool_empty_needed_queue): Likewise. (varpool_extra_name_alias): Likewise. * lto-streamer.c (lto_get_section_name): Add vars section. * lto-streamer.h (lto_section_type): Update. (output_varpool, input_varpool): Declare. * lto.c (lto_varpool_node_sets): New. (lto_1_to_1_map): Partition varpool too. (globalize_context_t, globalize_cross_file_statics, lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node, lto_scan_statics_in_remaining_global_vars): Remove. (lto_promote_cross_file_statics): Rewrite. (get_filename_for_set): Take vset argument. (lto_wpa_write_files): Pass around vsets. From-SVN: r158854
2010-04-29 09:10:38 +02:00
void (*write_optimization_summary) (struct cgraph_node_set_def *,
struct varpool_node_set_def *);
/* This hook is used to deserialize IPA summaries from disk. */
void (*read_optimization_summary) (void);
/* Hook to convert gimple stmt uids into true gimple statements. The second
parameter is an array of statements indexed by their uid. */
void (*stmt_fixup) (struct cgraph_node *, gimple *);
/* Results of interprocedural propagation of an IPA pass is applied to
function body via this hook. */
unsigned int function_transform_todo_flags_start;
unsigned int (*function_transform) (struct cgraph_node *);
void (*variable_transform) (struct varpool_node *);
};
/* Description of simple IPA pass. Simple IPA passes have just one execute
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
hook. */
struct simple_ipa_opt_pass
{
struct opt_pass pass;
Unify the management of RTL and tree-level dump files. 2004-09-06 Paolo Bonzini <bonzini@gnu.org> Unify the management of RTL and tree-level dump files. * cfgexpand.c (tree_expand_cfg): Fix incorrect comment. Don't print function name to the dump file, the pass manager would do this for us. Add code from the top of rest_of_compilation, up to the initial RTL dump. * passes.c (rest_of_handle_jump): Call fixup_tail_calls and close the DFI_sibling dump file. (rest_of_compilation): Don't do that here. Remove code up to the initial RTL dump. (init_optimization_passes): Remove. (pass_rest_of_compilation): Change pass name to NULL. * toplev.c (lang_dependent_init): Do not use an empty dump file prefix. Do not call init_optimization_passes. * toplev.h (init_optimization_passes): Remove. * graph.c (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Remove SUFFIX parameter. * graph.h (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Likewise. * tree-pass.h (struct tree_opt_pass): Add `letter' field. * cfgexpand.c (pass_expand): Adjust. * gimple-low.c (pass_lower_cf, pass_remove_useless_vars): Adjust. * passes.c (pass_rest_of_compilation): Adjust. * predict.c (pass_profile): Adjust. * tree-alias-common.c (pass_build_pta, pass_del_pta): Adjust. * tree-cfg.c (pass_build_cfg, pass_remove_useless_stmts, pass_split_crit_edges, pass_warn_function_return): Adjust. * tree-complex.c (pass_lower_vector_ssa, pass_pre_expand): Adjust. * tree-dfa.c (pass_referenced_vars): Adjust. * tree-eh.c (pass_lower_eh): Adjust. * tree-if-conv.c (pass_build_ssa): Adjust. * tree-into-ssa.c (pass_build_ssa): Adjust. * tree-mudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nomudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nrv.c (pass_nrv): Adjust. * tree-optimize.c (pass_gimple, pass_all_optimizations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures): Adjust. * tree-outof-ssa.c (pass_del_ssa): Adjust. * tree-profile.c (pass_tree_profile): Adjust. * tree-sra.c (pass_sra): Adjust. * tree-ssa-alias.c (pass_may_alias): Adjust. * tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Adjust. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Adjust. * tree-ssa-dce.c (pass_dce, pass_cd_dce): Adjust. * tree-ssa-dom.c (pass_dominator): Adjust. * tree-ssa-dse.c (pass_dse): Adjust. * tree-ssa-forwprop.c (pass_forwprop): Adjust. * tree-ssa-if-conv.c (pass_if_conversion): Adjust. * tree-ssa-loop-ch.c (pass_ch): Adjust. * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_lim, pass_loop_done, pass_complete_unroll, pass_iv_canon, pass_iv_optimize, pass_vectorize): Adjust. * tree-ssa-phiopt.c (pass_phiopt): Adjust. * tree-ssa-pre.c (pass_pre, pass_fre): Adjust. * tree-ssa.c (pass_redundant_phi, pass_early_warn_uninitialized, pass_late_warn_uninnitialized): Adjust. * tree-tailcall.c (pass_tail_recursion, pass_tail_calls): Adjust. * Makefile.in (tree-dump.o): Add new dependencies. * cgraph.c (cgraph_remove_node): TDF_all -> TDF_tree_all. * cgraphunit.c (cgraph_preserve_function_body_p, cgraph_optimize): Likewise. * toplev.c (dump_file_name): New. * tree-dump.c (dump_enable_all): Add LETTER parameter. (struct dump_file_info): Add NUM and LETTER fields. (dump_files): Adjust and add RTL dump files. (dump_register): Add NUM and LETTER fields. (get_dump_file_name, dump_initialized_p, enable_rtl_dump_file): New. (dump_begin): Use get_dump_file_name. (dump_switch_p_1): Adjust call to dump_enable_all. * tree-dump.h (dump_register): Adjust prototype. * tree-optimize.c (register_one_dump_file): Take dump file index. Support flags for RTL dumps. (register_dump_files): Fill in NUM field of struct dump_file_info. Track properties both when the gate is executed and when it is not. (execute_todo): Dump RTL. Add PROPERTIES parameter. (execute_one_pass): Pass properties to execute_todo. Handle VCG dumps of RTL. * tree-pass.h (dump_file_name): New. * tree.h (TDF_TREE, TDF_RTL, get_dump_file_name, dump_initialized_p): New. * Makefile.in (passes.o): Add new dependencies. * passes.c (struct dump_file_info, enum dump_file_index, dump_file_tbl, init_optimization_passes): Remove. (open_dump_file, close_dump_file): Use tree-dumping infrastructure. (rest_of_handle_new_regalloc, rest_of_handle_old_regalloc): Use dump_enabled_p. (finish_optimization_passes): Update finish_graph_dump_file loop. (enable_rtl_dump_file): Remove. * tree-dump.c (dump_files): Adjust and add RTL dump files. (enable_rtl_dump_file): Add here. * tree.h (enum tree_dump_index): Add RTL dump file indices. * doc/invoke.texi (Debugging options): Document new RTL debugging options. Update. From-SVN: r87113
2004-09-06 12:08:17 +02:00
};
/* Define a tree dump switch. */
struct dump_file_info
{
const char *suffix; /* suffix to give output file. */
const char *swtch; /* command line switch */
const char *glob; /* command line glob */
Unify the management of RTL and tree-level dump files. 2004-09-06 Paolo Bonzini <bonzini@gnu.org> Unify the management of RTL and tree-level dump files. * cfgexpand.c (tree_expand_cfg): Fix incorrect comment. Don't print function name to the dump file, the pass manager would do this for us. Add code from the top of rest_of_compilation, up to the initial RTL dump. * passes.c (rest_of_handle_jump): Call fixup_tail_calls and close the DFI_sibling dump file. (rest_of_compilation): Don't do that here. Remove code up to the initial RTL dump. (init_optimization_passes): Remove. (pass_rest_of_compilation): Change pass name to NULL. * toplev.c (lang_dependent_init): Do not use an empty dump file prefix. Do not call init_optimization_passes. * toplev.h (init_optimization_passes): Remove. * graph.c (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Remove SUFFIX parameter. * graph.h (print_rtl_graph_with_bb, clean_graph_dump_file, finish_graph_dump_file): Likewise. * tree-pass.h (struct tree_opt_pass): Add `letter' field. * cfgexpand.c (pass_expand): Adjust. * gimple-low.c (pass_lower_cf, pass_remove_useless_vars): Adjust. * passes.c (pass_rest_of_compilation): Adjust. * predict.c (pass_profile): Adjust. * tree-alias-common.c (pass_build_pta, pass_del_pta): Adjust. * tree-cfg.c (pass_build_cfg, pass_remove_useless_stmts, pass_split_crit_edges, pass_warn_function_return): Adjust. * tree-complex.c (pass_lower_vector_ssa, pass_pre_expand): Adjust. * tree-dfa.c (pass_referenced_vars): Adjust. * tree-eh.c (pass_lower_eh): Adjust. * tree-if-conv.c (pass_build_ssa): Adjust. * tree-into-ssa.c (pass_build_ssa): Adjust. * tree-mudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nomudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust. * tree-nrv.c (pass_nrv): Adjust. * tree-optimize.c (pass_gimple, pass_all_optimizations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures): Adjust. * tree-outof-ssa.c (pass_del_ssa): Adjust. * tree-profile.c (pass_tree_profile): Adjust. * tree-sra.c (pass_sra): Adjust. * tree-ssa-alias.c (pass_may_alias): Adjust. * tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Adjust. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Adjust. * tree-ssa-dce.c (pass_dce, pass_cd_dce): Adjust. * tree-ssa-dom.c (pass_dominator): Adjust. * tree-ssa-dse.c (pass_dse): Adjust. * tree-ssa-forwprop.c (pass_forwprop): Adjust. * tree-ssa-if-conv.c (pass_if_conversion): Adjust. * tree-ssa-loop-ch.c (pass_ch): Adjust. * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_lim, pass_loop_done, pass_complete_unroll, pass_iv_canon, pass_iv_optimize, pass_vectorize): Adjust. * tree-ssa-phiopt.c (pass_phiopt): Adjust. * tree-ssa-pre.c (pass_pre, pass_fre): Adjust. * tree-ssa.c (pass_redundant_phi, pass_early_warn_uninitialized, pass_late_warn_uninnitialized): Adjust. * tree-tailcall.c (pass_tail_recursion, pass_tail_calls): Adjust. * Makefile.in (tree-dump.o): Add new dependencies. * cgraph.c (cgraph_remove_node): TDF_all -> TDF_tree_all. * cgraphunit.c (cgraph_preserve_function_body_p, cgraph_optimize): Likewise. * toplev.c (dump_file_name): New. * tree-dump.c (dump_enable_all): Add LETTER parameter. (struct dump_file_info): Add NUM and LETTER fields. (dump_files): Adjust and add RTL dump files. (dump_register): Add NUM and LETTER fields. (get_dump_file_name, dump_initialized_p, enable_rtl_dump_file): New. (dump_begin): Use get_dump_file_name. (dump_switch_p_1): Adjust call to dump_enable_all. * tree-dump.h (dump_register): Adjust prototype. * tree-optimize.c (register_one_dump_file): Take dump file index. Support flags for RTL dumps. (register_dump_files): Fill in NUM field of struct dump_file_info. Track properties both when the gate is executed and when it is not. (execute_todo): Dump RTL. Add PROPERTIES parameter. (execute_one_pass): Pass properties to execute_todo. Handle VCG dumps of RTL. * tree-pass.h (dump_file_name): New. * tree.h (TDF_TREE, TDF_RTL, get_dump_file_name, dump_initialized_p): New. * Makefile.in (passes.o): Add new dependencies. * passes.c (struct dump_file_info, enum dump_file_index, dump_file_tbl, init_optimization_passes): Remove. (open_dump_file, close_dump_file): Use tree-dumping infrastructure. (rest_of_handle_new_regalloc, rest_of_handle_old_regalloc): Use dump_enabled_p. (finish_optimization_passes): Update finish_graph_dump_file loop. (enable_rtl_dump_file): Remove. * tree-dump.c (dump_files): Adjust and add RTL dump files. (enable_rtl_dump_file): Add here. * tree.h (enum tree_dump_index): Add RTL dump file indices. * doc/invoke.texi (Debugging options): Document new RTL debugging options. Update. From-SVN: r87113
2004-09-06 12:08:17 +02:00
int flags; /* user flags */
int state; /* state of play */
int num; /* dump file number */
};
/* Pass properties. */
#define PROP_gimple_any (1 << 0) /* entire gimple grammar */
#define PROP_gimple_lcf (1 << 1) /* lowered control flow */
#define PROP_gimple_leh (1 << 2) /* lowered eh */
#define PROP_cfg (1 << 3)
#define PROP_referenced_vars (1 << 4)
#define PROP_ssa (1 << 5)
#define PROP_no_crit_edges (1 << 6)
#define PROP_rtl (1 << 7)
#define PROP_gimple_lomp (1 << 8) /* lowered OpenMP directives */
#define PROP_cfglayout (1 << 9) /* cfglayout mode on RTL */
#define PROP_gimple_lcx (1 << 10) /* lowered complex */
coverage.c: Remove argument to rest_of_compilation. gcc/ChangeLog: 2004-06-16 Paolo Bonzini <bonzini@gnu.org> * coverage.c: Remove argument to rest_of_compilation. * expr.c (execute_expand, set_save_expr_context, pass_expand): New. * passes.c (rest_of_compilation): Remove argument. (pass_rest_of_compilation): New. (rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking rest_of_handle_machine_reorg, rest_of_handle_regrename rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2 rest_of_handle_regmove, rest_of_handle_tracer rest_of_handle_if_conversion, rest_of_handle_if_after_combine rest_of_handle_web, rest_of_handle_branch_prob rest_of_handle_value_profile_transformations, rest_of_handle_cfg rest_of_handle_addressof, rest_of_handle_jump_bypass rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2): Check that the two arguments are actually superfluous. * toplev.h (rest_of_compilation): Adjust prototype. * tree-optimize.c (register_dump_files): Add properties argument. Track validity of passes. Only initialize dump files for tree-based passes. Store the full set of provided passes in the pass. (init_tree_optimization_passes): Register pass_expand and pass_rest_of_compilation. (execute_one_pass): Do not track the presence of required properties here. Set in_gimple_form. Do not update current_properties. (current_properties): Remove. (set_save_expr_context): Remove. (tree_rest_of_compilation): Do not set in_gimple_form. Do not expand to RTL here, and do not call rest_of_compilation. Push GGC context even before gimplification. * tree-pass.h (PROP_rtl, PROP_trees): New flags. (pass_expand, pass_rest_of_compilation): Declare. gcc/java/ChangeLog: 2004-06-16 Paolo Bonzini <bonzini@gnu.org> * java/class.c (emit_register_classes): Remove argument to rest_of_compilation. * java/resource.c (write_resource_constructor): Likewise. From-SVN: r83225
2004-06-16 09:25:53 +02:00
#define PROP_trees \
passes.c (register_one_dump_file): Accept the current properties instead of pass number. 2006-02-08 Paolo Bonzini <bonzini@gnu.org> * passes.c (register_one_dump_file): Accept the current properties instead of pass number. Adjust call to dump_register. Remove duplicated code. (register_dump_files): Now a wrapper around... (register_dump_files_1): ... this one. Do not modify the pass structure. (next_pass_1): Cosmetic fix. (execute_todo): Keep second parameter only. Use curr_properties instead of fetching it from the pass structure. Check and set last_verified. (execute_one_pass): Handle TODO_set_props. Use curr_properties instead of fetching it from the pass structure. Fix calls to execute_todo. Update curr_properties and initialize .vcg RTL dump after running the pass. Reset last_verified. * tree-dump.c (dump_files): Renumber consecutively. Put .cgraph dump at the beginning. (FIRST_AUTO_NUMBERED_DUMP): New. (dump_register): Remove "num" parameter, assign it within the function. (get_dump_file_name): Modify template for dumps. * tree-dump.h (dump_register): Adjust prototype. * tree-pass.h (enum tree_dump_index): Move cgraph at the beginning. (PROP_trees): Add PROP_gimple_lomp. (TODO_set_props): New. * gimple-low.c (pass_lower_cf): Do not destroy PROP_gimple_lcf. * tree-eh.c (pass_lower_eh): Do not destroy PROP_gimple_leh. * cfgexpand.c (pass_expand): Destroy PROP_trees. gcc/testsuite: 2006-02-08 Paolo Bonzini <bonzini@gnu.org> * lib/gcc-dg.exp (cleanup-rtl-dump, cleanup-tree-dump, cleanup-ipa-dump): Update dump file glob patterns. * lib/scantree.exp (scan-tree-dump, scan-tree-dump-times, scan-tree-dump-not, scan-tree-dump-dem): Likewise. * lib/scanipa.exp (scan-ipa-dump, scan-ipa-dump-times, scan-ipa-dump-not, scan-ipa-dump-dem): Likewise. * lib/scanrtl.exp: New. * lib/gcc-dg.exp: Load it. * objc.dg/stubify-2.m: Use scan-rtl-dump-not. From-SVN: r110742
2006-02-08 09:13:20 +01:00
(PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp)
/* To-do flags. */
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
#define TODO_dump_func (1 << 0)
#define TODO_ggc_collect (1 << 1)
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
#define TODO_verify_ssa (1 << 2)
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
#define TODO_verify_flow (1 << 3)
#define TODO_verify_stmts (1 << 4)
#define TODO_cleanup_cfg (1 << 5)
#define TODO_dump_cgraph (1 << 7)
#define TODO_remove_functions (1 << 8)
#define TODO_rebuild_frequencies (1 << 9)
regrename.c (pass_regrename, [...]): Add RTL sharing verifier. * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing 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. From-SVN: r128126
2007-09-05 12:49:01 +02:00
#define TODO_verify_rtl_sharing (1 << 10)
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
/* To-do flags for calls to update_ssa. */
/* Update the SSA form inserting PHI nodes for newly exposed symbols
and virtual names marked for updating. When updating real names,
only insert PHI nodes for a real name O_j in blocks reached by all
the new and old definitions for O_j. If the iterated dominance
frontier for O_j is not pruned, we may end up inserting PHI nodes
in blocks that have one or more edges with no incoming definition
for O_j. This would lead to uninitialized warnings for O_j's
symbol. */
regrename.c (pass_regrename, [...]): Add RTL sharing verifier. * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing 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. From-SVN: r128126
2007-09-05 12:49:01 +02:00
#define TODO_update_ssa (1 << 11)
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
/* Update the SSA form without inserting any new PHI nodes at all.
This is used by passes that have either inserted all the PHI nodes
themselves or passes that need only to patch use-def and def-def
chains for virtuals (e.g., DCE). */
regrename.c (pass_regrename, [...]): Add RTL sharing verifier. * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing 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. From-SVN: r128126
2007-09-05 12:49:01 +02:00
#define TODO_update_ssa_no_phi (1 << 12)
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
/* Insert PHI nodes everywhere they are needed. No pruning of the
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
IDF is done. This is used by passes that need the PHI nodes for
O_j even if it means that some arguments will come from the default
definition of O_j's symbol (e.g., pass_linear_transform).
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
WARNING: If you need to use this flag, chances are that your pass
may be doing something wrong. Inserting PHI nodes for an old name
where not all edges carry a new replacement may lead to silent
codegen errors or spurious uninitialized warnings. */
regrename.c (pass_regrename, [...]): Add RTL sharing verifier. * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing 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. From-SVN: r128126
2007-09-05 12:49:01 +02:00
#define TODO_update_ssa_full_phi (1 << 13)
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
/* Passes that update the SSA form on their own may want to delegate
the updating of virtual names to the generic updater. Since FUD
chains are easier to maintain, this simplifies the work they need
to do. NOTE: If this flag is used, any OLD->NEW mappings for real
names are explicitly destroyed and only the symbols marked for
renaming are processed. */
regrename.c (pass_regrename, [...]): Add RTL sharing verifier. * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing 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. From-SVN: r128126
2007-09-05 12:49:01 +02:00
#define TODO_update_ssa_only_virtuals (1 << 14)
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
tree-pass.h (TODO_remove_unused_locals): Define. 2006-01-05 Richard Guenther <rguenther@suse.de> Diego Novillo <dnovillo@redhat.com> * tree-pass.h (TODO_remove_unused_locals): Define. * gimple-low.c (expand_var_p, remove_useless_vars, pass_remove_useless_vars): Remove. Update all users. * tree-ssa-live.c (mark_all_vars_used_1): Handle SSA names. (remove_unused_locals): New function. * tree-flow.h (remove_unused_locals): Declare. * passes.c (execute_todo): Call remove_unused_locals if TODO_remove_unused_locals is set. * tree-into-ssa.c (pass_build_ssa): Add TODO_remove_unused_locals. * tree-ssa-dce.c (pass_dce): Likewise. * tree-outof-ssa.c (pass_del_ssa): Likewise. * gcc.dg/tree-ssa/loop-11.c: Deal with removed vars pass. * gcc.dg/tree-ssa/loop-8.c: Likewise. * gcc.dg/tree-ssa/loop-1.c: Likewise. * gcc.dg/tree-ssa/pr23294.c: Likewise. * gcc.dg/tree-ssa/pr21985.c: Likewise. * gcc.dg/tree-ssa/loop-14.c: Likewise. * gcc.dg/tree-ssa/loop-2.c: Likewise. * gcc.dg/tree-ssa/loop-3.c: Likewise. * gcc.dg/tree-ssa/loop-4.c: Likewise. * gcc.dg/tree-ssa/pr21171.c: Likewise. * gcc.dg/tree-ssa/loop-5.c: Likewise. * gcc.dg/tree-ssa/loop-10.c: Likewise. * gcc.dg/tree-ssa/loop-6.c: Likewise. * treelang/compile/extravar.tree: Likewise. * g++.dg/tree-ssa/ssa-cast-1.C: Likewise. * g++.dg/tree-ssa/pointer-reference-alias.C: Likewise. * g++.dg/tree-ssa/ssa-sra-1.C: Likewise. * g++.dg/tree-ssa/ssa-sra-2.C: Likewise. * gcc.dg/tree-ssa/20031106-6.c: Disable SRA. Co-Authored-By: Diego Novillo <dnovillo@redhat.com> From-SVN: r109379
2006-01-05 14:53:54 +01:00
/* Some passes leave unused local variables that can be removed from
except.c (dw2_size_of_call_site_table, [...]): Use vector API for call_site_record. * except.c (dw2_size_of_call_site_table, 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. From-SVN: r134425
2008-04-18 07:26:12 +02:00
cfun->local_decls. This reduces the size of dump files
and the memory footprint for VAR_DECLs. */
regrename.c (pass_regrename, [...]): Add RTL sharing verifier. * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing 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. From-SVN: r128126
2007-09-05 12:49:01 +02:00
#define TODO_remove_unused_locals (1 << 15)
tree-pass.h (TODO_remove_unused_locals): Define. 2006-01-05 Richard Guenther <rguenther@suse.de> Diego Novillo <dnovillo@redhat.com> * tree-pass.h (TODO_remove_unused_locals): Define. * gimple-low.c (expand_var_p, remove_useless_vars, pass_remove_useless_vars): Remove. Update all users. * tree-ssa-live.c (mark_all_vars_used_1): Handle SSA names. (remove_unused_locals): New function. * tree-flow.h (remove_unused_locals): Declare. * passes.c (execute_todo): Call remove_unused_locals if TODO_remove_unused_locals is set. * tree-into-ssa.c (pass_build_ssa): Add TODO_remove_unused_locals. * tree-ssa-dce.c (pass_dce): Likewise. * tree-outof-ssa.c (pass_del_ssa): Likewise. * gcc.dg/tree-ssa/loop-11.c: Deal with removed vars pass. * gcc.dg/tree-ssa/loop-8.c: Likewise. * gcc.dg/tree-ssa/loop-1.c: Likewise. * gcc.dg/tree-ssa/pr23294.c: Likewise. * gcc.dg/tree-ssa/pr21985.c: Likewise. * gcc.dg/tree-ssa/loop-14.c: Likewise. * gcc.dg/tree-ssa/loop-2.c: Likewise. * gcc.dg/tree-ssa/loop-3.c: Likewise. * gcc.dg/tree-ssa/loop-4.c: Likewise. * gcc.dg/tree-ssa/pr21171.c: Likewise. * gcc.dg/tree-ssa/loop-5.c: Likewise. * gcc.dg/tree-ssa/loop-10.c: Likewise. * gcc.dg/tree-ssa/loop-6.c: Likewise. * treelang/compile/extravar.tree: Likewise. * g++.dg/tree-ssa/ssa-cast-1.C: Likewise. * g++.dg/tree-ssa/pointer-reference-alias.C: Likewise. * g++.dg/tree-ssa/ssa-sra-1.C: Likewise. * g++.dg/tree-ssa/ssa-sra-2.C: Likewise. * gcc.dg/tree-ssa/20031106-6.c: Disable SRA. Co-Authored-By: Diego Novillo <dnovillo@redhat.com> From-SVN: r109379
2006-01-05 14:53:54 +01:00
/* Call df_finish at the end of the pass. This is done after all of
the dumpers have been allowed to run so that they have access to
the instance before it is destroyed. */
regrename.c (pass_regrename, [...]): Add RTL sharing verifier. * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing 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. From-SVN: r128126
2007-09-05 12:49:01 +02:00
#define TODO_df_finish (1 << 17)
/* Call df_verify at the end of the pass if checking is enabled. */
regrename.c (pass_regrename, [...]): Add RTL sharing verifier. * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing 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. From-SVN: r128126
2007-09-05 12:49:01 +02:00
#define TODO_df_verify (1 << 18)
tree-vrp.c (finalize_jump_threads): Do not care about dominance info. * tree-vrp.c (finalize_jump_threads): Do not care about dominance info. (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. From-SVN: r124786
2007-05-17 10:10:24 +02:00
/* Internally used for the first instance of a pass. */
regrename.c (pass_regrename, [...]): Add RTL sharing verifier. * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing 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. From-SVN: r128126
2007-09-05 12:49:01 +02:00
#define TODO_mark_first_instance (1 << 19)
tree-vrp.c (finalize_jump_threads): Do not care about dominance info. * tree-vrp.c (finalize_jump_threads): Do not care about dominance info. (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. From-SVN: r124786
2007-05-17 10:10:24 +02:00
/* Rebuild aliasing info. */
re PR middle-end/13146 (inheritance for nonoverlapping_component_refs_p) 2009-04-03 Richard Guenther <rguenther@suse.de> PR middle-end/13146 PR tree-optimization/23940 PR tree-optimization/33237 PR middle-end/33974 PR middle-end/34093 PR tree-optimization/36201 PR tree-optimization/36230 PR tree-optimization/38049 PR tree-optimization/38207 PR tree-optimization/38230 PR tree-optimization/38301 PR tree-optimization/38585 PR middle-end/38895 PR tree-optimization/38985 PR tree-optimization/39299 * tree-ssa-structalias.h: Remove. * tree-ssa-operands.h (NULL_USE_OPERAND_P): Make of type use_operand_p. (NULL_DEF_OPERAND_P): Make of type def_operand_p. (struct vuse_element_d): Remove. (struct vuse_vec_d): Likewise. (VUSE_VECT_NUM_ELEM, VUSE_VECT_ELEMENT_NC, VUSE_ELEMENT_PTR_NC, VUSE_ELEMENT_VAR_NC, VUSE_VECT_ELEMENT, VUSE_ELEMENT_PTR, SET_VUSE_VECT_ELEMENT, SET_VUSE_ELEMENT_VAR, SET_VUSE_ELEMENT_PTR, VUSE_ELEMENT_VAR): Likewise. (struct voptype_d): Likewise. (NUM_VOP_FREE_BUCKETS): Likewise. (struct ssa_operands): Remove vop_free_buckets and mpt_table fields. (struct stmt_operands_d): Remove. (VUSE_OP_PTR, VUSE_OP, SET_VUSE_OP, VUSE_NUM, VUSE_VECT, VDEF_RESULT_PTR, VDEF_RESULT, VDEF_OP_PTR, VDEF_OP, SET_VDEF_OP, VDEF_NUM, VDEF_VECT): Likewise. (copy_virtual_operands): Remove. (operand_build_cmp): Likewise. (create_ssa_artificial_load_stmt): Likewise. (enum ssa_op_iter_type): Remove ssa_op_iter_vdef. (struct ssa_operand_iterator_d): Remove vuses, vdefs, mayusesm vuse_index and mayuse_index members. Pack and move done and iter_type members to the front. (SSA_OP_VMAYUSE): Remove. (SSA_OP_VIRTUAL_USES): Adjust. (FOR_EACH_SSA_VDEF_OPERAND): Remove. (unlink_stmt_vdef): Declare. (add_to_addressable_set): Remove. * tree-vrp.c (stmt_interesting_for_vrp): Adjust. (vrp_visit_stmt): Likewise. * doc/tree-ssa.texi (Alias analysis): Update. * doc/invoke.texi (max-aliased-vops): Remove docs. (avg-aliased-vops): Likewise. * tree-into-ssa.c (syms_to_rename): Remove. (need_to_update_vops_p): Likewise. (need_to_initialize_update_ssa_p): Rename to ... (update_ssa_initialized_fn): ... this. Track function we are initialized for. (symbol_marked_for_renaming): Simplify. (add_new_name_mapping): Do not set need_to_update_vops_p. (dump_currdefs): Use SYMS_TO_RENAME. (rewrite_update_stmt): Always walk all uses/defs. (dump_update_ssa): Adjust. (init_update_ssa): Take function argument. Track what we are initialized for. (delete_update_ssa): Reset SYMS_TO_RENAME and update_ssa_initialized_fn. (create_new_def_for): Initialize for cfun, assert we are initialized for cfun. (mark_sym_for_renaming): Simplify. (mark_set_for_renaming): Do not initialize update-ssa. (need_ssa_update_p): Simplify. Take function argument. (name_mappings_registered_p): Assert we ask for the correct function. (name_registered_for_update_p): Likewise. (ssa_names_to_replace): Likewise. (release_ssa_name_after_update_ssa): Likewise. (update_ssa): Likewise. Use SYMS_TO_RENAME. (dump_decl_set): Do not print a newline. (debug_decl_set): Do it here. (dump_update_ssa): And here. * tree-ssa-loop-im.c (move_computations): Adjust. (movement_possibility): Likewise. (determine_max_movement): Likewise. (gather_mem_refs_stmt): Likewise. * tree-dump.c (dequeue_and_dump): Do not handle SYMBOL_MEMORY_TAG or NAME_MEMORY_TAG. * tree-complex.c (update_all_vops): Remove. (expand_complex_move): Adjust. * tree-ssa-loop-niter.c (chain_of_csts_start): Use NULL_TREE. Simplify test for memory referencing statement. Exclude non-invariant ADDR_EXPRs. * tree-pretty-print.c (dump_generic_node): Do not handle memory tags. * tree-loop-distribution.c (generate_memset_zero): Adjust. (rdg_flag_uses): Likewise. * tree-tailcall.c (suitable_for_tail_opt_p): Remove memory-tag related code. (tree_optimize_tail_calls_1): Also split the edge from the entry block if we have degenerate PHI nodes in the first basic block. * tree.c (init_ttree): Remove memory-tag related code. (tree_code_size): Likewise. (tree_node_structure): Likewise. (build7_stat): Re-write to be build6_stat. * tree.h (MTAG_P, TREE_MEMORY_TAG_CHECK, TMR_TAG): Remove. (SSA_VAR_P): Adjust. (struct tree_memory_tag): Remove. (struct tree_memory_partition_tag): Likewise. (union tree_node): Adjust. (build7): Re-write to be build6. * tree-pass.h (pass_reset_cc_flags): Remove. (TODO_update_address_taken): New flag. (pass_simple_dse): Remove. * ipa-cp.c (ipcp_update_callgraph): Update SSA form. * params.h (MAX_ALIASED_VOPS): Remove. (AVG_ALIASED_VOPS): Likewise. * omp-low.c (expand_omp_taskreg): Update SSA form. * tree-ssa-dse.c (dse_optimize_stmt): Properly query if the rhs aliases the lhs in a copy stmt. * tree-ssa-dse.c (struct address_walk_data): Remove. (memory_ssa_name_same): Likewise. (memory_address_same): Likewise. (get_kill_of_stmt_lhs): Likewise. (dse_possible_dead_store_p): Simplify, use the oracle. Handle unused stores. Look through PHI nodes into post-dominated regions. (dse_optimize_stmt): Simplify. Properly remove stores. (tree_ssa_dse): Compute dominators. (execute_simple_dse): Remove. (pass_simple_dse): Likewise. * ipa-reference.c (scan_stmt_for_static_refs): Open-code gimple_loaded_syms and gimple_stored_syms computation. * toplev.c (dump_memory_report): Dump alias and pta stats. * tree-ssa-sccvn.c (vn_reference_compute_hash): Simplify. (vn_reference_eq): Likewise. (vuses_to_vec, copy_vuses_from_stmt, vdefs_to_vec, copy_vdefs_from_stmt, shared_lookup_vops, shared_vuses_from_stmt, valueize_vuses): Remove. (get_def_ref_stmt_vuses): Simplify. Rename to ... (get_def_ref_stmt_vuse): ... this. (vn_reference_lookup_2): New function. (vn_reference_lookup_pieces): Use walk_non_aliased_vuses for walking equivalent vuses. Simplify. (vn_reference_lookup): Likewise. (vn_reference_insert): Likewise. (vn_reference_insert_pieces): Likewise. (visit_reference_op_call): Simplify. (visit_reference_op_load): Likewise. (visit_reference_op_store): Likewise. (init_scc_vn): Remove shared_lookup_vuses initialization. (free_scc_vn): Remove shared_lookup_vuses freeing. (sort_vuses, sort_vuses_heap): Remove. (get_ref_from_reference_ops): Export. * tree-ssa-sccvn.h (struct vn_reference_s): Replace vuses vector with single vuse pointer. (vn_reference_lookup_pieces, vn_reference_lookup, vn_reference_insert, vn_reference_insert_pieces): Adjust prototypes. (shared_vuses_from_stmt): Remove. (get_ref_from_reference_ops): Declare. * tree-ssa-loop-manip.c (slpeel_can_duplicate_loop_p): Adjust. * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Remove memory-tag related code. * tree-ssa-ccp.c (get_symbol_constant_value): Remove memory-tag code. (likely_value): Add comment, skip static-chain of call statements. (surely_varying_stmt_p): Adjust. (gimplify_and_update_call_from_tree): Likewise. (execute_fold_all_builtins): Do not rebuild alias info. (gimplify_and_update_call_from_tree): Properly update VOPs. * tree-ssa-loop-ivopts.c (get_ref_tag): Remove. (copy_ref_info): Remove memory-tag related code. * tree-call-cdce.c (tree_call_cdce): Rename the VOP. * ipa-pure-const.c (check_decl): Remove memory-tag related code. (check_stmt): Open-code gimple_loaded_syms and gimple_stored_syms computation. * tree-ssa-dom.c (gimple_p): Remove typedef. (eliminate_redundant_computations): Adjust. (record_equivalences_from_stmt): Likewise. (avail_expr_hash): Likewise. (avail_expr_eq): Likewise. * tree-ssa-propagate.c (update_call_from_tree): Properly update VOPs. (stmt_makes_single_load): Likewise. (stmt_makes_single_store): Likewise. * tree-ssa-alias.c: Rewrite completely. (debug_memory_partitions, dump_mem_ref_stats, debug_mem_ref_stats, debug_mem_sym_stats, dump_mem_sym_stats_for_var, debug_all_mem_sym_stats, debug_mp_info, update_mem_sym_stats_from_stmt, delete_mem_ref_stats, create_tag_raw, dump_points_to_info, dump_may_aliases_for, debug_may_aliases_for, new_type_alias): Remove public functions. (pass_reset_cc_flags): Remove. (pass_build_alias): Move ... * tree-ssa-structalias.c (pass_build_alias): ... here. * tree-ssa-alias.c (may_be_aliased): Move ... * tree-flow-inline.h (may_be_aliased): ... here. tree-ssa-alias.c (struct count_ptr_d, count_ptr_derefs, count_uses_and_derefs): Move ... * gimple.c: ... here. * gimple.h (count_uses_and_derefs): Declare. * tree-ssa-alias.c (dump_alias_stats, ptr_deref_may_alias_global_p, ptr_deref_may_alias_decl_p, ptr_derefs_may_alias_p, same_type_for_tbaa, nonaliasing_component_refs_p, decl_refs_may_alias_p, indirect_ref_may_alias_decl_p, indirect_refs_may_alias_p, ref_maybe_used_by_call_p, ref_maybe_used_by_stmt_p, call_may_clobber_ref_p, stmt_may_clobber_ref_p, maybe_skip_until, get_continuation_for_phi, walk_non_aliased_vuses, walk_aliased_vdefs): New functions. * tree-dfa.c (refs_may_alias_p): Move ... * tree-ssa-alias.c (refs_may_alias_p): ... here. Extend. * tree-ssa-alias.h: New file. * tree-ssa-sink.c (is_hidden_global_store): Adjust. (statement_sink_location): Likewise. * opts.c (decode_options): Do not adjust max-aliased-vops or avg-aliased-vops values. * timevar.def (TV_TREE_MAY_ALIAS): Remove. (TV_CALL_CLOBBER): Likewise. (TV_FLOW_SENSITIVE): Likewise. (TV_FLOW_INSENSITIVE): Likewise. (TV_MEMORY_PARTITIONING): Likewise. (TV_ALIAS_STMT_WALK): New timevar. * tree-ssa-loop-ivcanon.c (empty_loop_p): Adjust. * tree-ssa-address.c (create_mem_ref_raw): Use build6. (get_address_description): Remove memory-tag related code. * tree-ssa-ifcombine.c (bb_no_side_effects_p): Adjust. * treestruct.def (TS_MEMORY_TAG, TS_MEMORY_PARTITION_TAG): Remove. * tree-eh.c (cleanup_empty_eh): Do not leave stale SSA_NAMEs and immediate uses in statements. Document. * gimple-pretty-print.c (dump_gimple_mem_ops): Adjust. (dump_symbols): Remove. (dump_gimple_mem_ops): Do not dump loaded or stored syms. * alias.c (get_deref_alias_set): New function split out from ... (get_alias_set): ... here. * alias.h (get_deref_alias_set): Declare. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Remove unused type parameter. Remove restrict pointer handling. Create a ref-all pointer in case type-based alias sets do not conflict. (vect_analyze_data_refs): Remove SMT related code. * tree-vect-stmts.c (vectorizable_store): Re-instantiate TBAA assert. (vectorizable_load): Likewise. * tree-data-ref.h (struct dr_alias): Remove symbol_tag field. (DR_SYMBOL_TAG, DR_VOPS): Remove. * tree-data-ref.c (dr_may_alias_p): Use the alias-oracle. Ignore vops and SMTs. (dr_analyze_alias): Likewise.. (free_data_ref): Likewise. (create_data_ref): Likewise. (analyze_all_data_dependences): Likewise. (get_references_in_stmt): Adjust. * tree-flow-inline.h (gimple_aliases_computed_p, gimple_addressable_vars, gimple_call_clobbered_vars, gimple_call_used_vars, gimple_global_var, may_aliases, memory_partition, factoring_name_p, mark_call_clobbered, clear_call_clobbered, compare_ssa_operands_equal, symbol_mem_tag, set_symbol_mem_tag, gimple_mem_ref_stats): Remove. (gimple_vop): New function. (op_iter_next_use): Remove vuses and mayuses cases. (op_iter_next_def): Remove vdefs case. (op_iter_next_tree): Remove vuses, mayuses and vdefs cases. (clear_and_done_ssa_iter): Do not set removed fields. (op_iter_init): Likewise. Skip vuse and/or vdef if requested. Assert we are not iterating over vuses or vdefs if not also iterating over uses or defs. (op_iter_init_use): Likewise. (op_iter_init_def): Likewise. (op_iter_next_vdef): Remove. (op_iter_next_mustdef): Likewise. (op_iter_init_vdef): Likewise. (compare_ssa_operands_equal): Likewise. (link_use_stmts_after): Handle vuse operand. (is_call_used): Use is_call_clobbered. (is_call_clobbered): Global variables are always call clobbered, query the call-clobbers bitmap. (mark_call_clobbered): Ignore global variables. (clear_call_clobbered): Likewise. * tree-ssa-coalesce.c (create_outofssa_var_map): Adjust virtual operands sanity check. * tree.def (NAME_MEMORY_TAG, SYMBOL_MEMORY_TAG, MEMORY_PARTITION_TAG): Remove. (TARGET_MEM_REF): Remove TMR_TAG operand. * tree-dfa.c (add_referenced_var): Initialize call-clobber state. Remove call-clobber related code. (remove_referenced_var): Likewise. Do not clear mpt or symbol_mem_tag. (dump_variable): Do not dump SMTs, memory stats, may-aliases or partitions or escape reason. (get_single_def_stmt, get_single_def_stmt_from_phi, get_single_def_stmt_with_phi): Remove. (dump_referenced_vars): Tidy. (get_ref_base_and_extent): Allow bare decls. (collect_dfa_stats): Adjust. * graphite.c (rename_variables_in_stmt): Adjust. (graphite_copy_stmts_from_block): Likewise. (translate_clast): Likewise. * tree-ssa-pre.c (struct bb_bitmap_sets): Add expr_dies bitmap. (EXPR_DIES): New. (translate_vuse_through_block): Use the oracle. (phi_translate_1): Adjust. (value_dies_in_block_x): Use the oracle. Cache the outcome in EXPR_DIES. (valid_in_sets): Check if the VUSE for a REFERENCE is available. (eliminate): Do not remove stmts during elimination, instead queue and remove them afterwards. (do_pre): Do not rebuild alias info. (pass_pre): Run TODO_rebuild_alias before PRE. * tree-ssa-live.c (remove_unused_locals): Remove memory-tag code. * tree-sra.c (sra_walk_function): Use gimple_references_memory_p. (mark_all_v_defs_stmt): Remove. (mark_all_v_defs_seq): Adjust. (sra_replace): Likewise. (scalarize_use): Likewise. (scalarize_copy): Likewise. (scalarize_init): Likewise. (scalarize_ldst): Likewise. (todoflags): Remove. (tree_sra): Do not rebuild alias info. (tree_sra_early): Adjust. (pass_sra): Run TODO_update_address_taken before SRA. * tree-predcom.c (set_alias_info): Remove. (prepare_initializers_chain): Do not call it. (mark_virtual_ops_for_renaming): Adjust. (mark_virtual_ops_for_renaming_list): Remove. (initialize_root_vars): Adjust. (initialize_root_vars_lm): Likewise. (prepare_initializers_chain): Likewise. * tree-ssa-copy.c (may_propagate_copy): Remove memory-tag related code. (may_propagate_copy_into_stmt): Likewise. (merge_alias_info): Do nothing for now. (propagate_tree_value_into_stmt): Adjust. (stmt_may_generate_copy): Likewise. * tree-ssa-forwprop.c (tidy_after_forward_propagate_addr): Do not mark symbols for renaming. (forward_propagate_addr_expr): Match up push/pop_stmt_changes with the same statement, make sure to update the new pointed-to one. * tree-ssa-dce.c (eliminate_unnecessary_stmts): Do not copy call statements, do not mark symbols for renaming. (mark_operand_necessary): Dump something. (ref_may_be_aliased): New function. (mark_aliased_reaching_defs_necessary_1): New helper function. (mark_aliased_reaching_defs_necessary): Likewise. (mark_all_reaching_defs_necessary_1): Likewise. (mark_all_reaching_defs_necessary): Likewise. (propagate_necessity): Do not process virtual PHIs. For non-aliased loads mark all reaching definitions as necessary. For aliased loads and stores mark the immediate dominating aliased clobbers as necessary. (visited): New global static. (perform_tree_ssa_dce): Free visited bitmap after propagating necessity. (remove_dead_phis): Perform simple dead virtual PHI removal. (remove_dead_stmt): Properly unlink virtual operands when removing stores. (eliminate_unnecessary_stmts): Schedule PHI removal after stmt removal. * tree-ssa-ter.c (is_replaceable_p): Adjust. (process_replaceable): Likewise. (find_replaceable_in_bb): Likewise. * tree-ssa.c (verify_ssa_name): Verify all VOPs are based on the single gimple vop. (verify_flow_insensitive_alias_info): Remove. (verify_flow_sensitive_alias_info): Likewise. (verify_call_clobbering): Likewise. (verify_memory_partitions): Likewise. (verify_alias_info): Likewise. (verify_ssa): Adjust.. (execute_update_addresses_taken): Export. Update SSA manually. Optimize only when optimizing. Use a local bitmap. (pass_update_address_taken): Remove TODO_update_ssa, add TODO_dump_func. (pass_update_address_taken): Just use TODO_update_address_taken. (init_tree_ssa): Do not initialize addressable_vars. (verify_ssa): Verify new VUSE / VDEF properties. Verify that all stmts definitions have the stmt as SSA_NAME_DEF_STMT. Do not call verify_alias_info. (delete_tree_ssa): Clear the VUSE, VDEF operands. Do not free the loaded and stored syms bitmaps. Reset the escaped and callused solutions. Do not free addressable_vars. Remove memory-tag related code. (warn_uninitialized_var): Aliases are always available. * tree-ssa-loop-prefetch.c (gather_memory_references): Adjust. * lambda-code.c (can_put_in_inner_loop): Adjust. (can_put_after_inner_loop): Likewise. (perfect_nestify): Likewise. * tree-vect-stmts.c (vect_stmt_relevant_p): Adjust. (vect_gen_widened_results_half): Remove CALL_EXPR handling. (vectorizable_conversion): Do not mark symbols for renaming. * tree-inline.c (remap_gimple_stmt): Clear VUSE/VDEF. (expand_call_inline): Unlink the calls virtual operands before replacing it. (tree_function_versioning): Do not call update_ssa if we are not updating clones. Simplify. * tree-ssa-phiprop.c (phivn_valid_p): Adjust. (propagate_with_phi): Likewise.. * tree-outof-ssa.c (create_temp): Remove memory tag and call clobber code. Assert we are not aliased or global. * tree-flow.h: Include tree-ssa-alias.h (enum escape_type): Remove. (struct mem_sym_stats_d): Likewise. (struct mem_ref_stats_d): Likewise. (struct gimple_df): Add vop member. Remove global_var, call_clobbered_vars, call_used_vars, addressable_vars, aliases_compted_p and mem_ref_stats members. Add syms_to_rename, escaped and callused members. (struct ptr_info_def): Remove all members, add points-to solution member pt. (struct var_ann_d): Remove in_vuse_list, in_vdef_list, call_clobbered, escape_mask, mpt and symbol_mem_tag members. * Makefile.in (TREE_FLOW_H): Add tree-ssa-alias.h. (tree-ssa-structalias.o): Remove tree-ssa-structalias.h. (tree-ssa-alias.o): Likewise. (toplev.o): Add tree-ssa-alias.h (GTFILES): Remove tree-ssa-structalias.h, add tree-ssa-alias.h. * gimple.c (gimple_set_bb): Fix off-by-one error. (is_gimple_reg): Do not handle memory tags. (gimple_copy): Also copy virtual operands. Delay updating the statement. Do not reset loaded and stored syms. (gimple_set_stored_syms): Remove. (gimple_set_loaded_syms): Likewise. (gimple_call_copy_skip_args): Copy the virtual operands and mark the new statement modified. * tree-ssa-structalias.c (may_alias_p): Remove. (set_uids_in_ptset): Take the alias set to prune with as parameter. Fold in the alias test of may_alias_p. (compute_points_to_sets): Compute whether a ptr is dereferenced in a local sbitmap. (process_constraint): Deal with &ANYTHING on the lhs, reject all other ADDRESSOF constraints on the lhs. (get_constraint_for_component_ref): Assert that we don't get ADDRESSOF constraints from the base of the reference. Properly generate UNKNOWN_OFFSET for DEREF if needed. (struct variable_info): Remove collapsed_to member. (get_varinfo_fc): Remove. (new_var_info): Do not set collapsed_to. (dump_constraint): Do not follow cycles. (dump_constraint_graph): Likewise. (build_pred_graph): Likewise. (build_succ_graph): Likewise. (rewrite_constraints): Likewise. (do_simple_structure_copy): Remove. (do_rhs_deref_structure_copy): Remove. (do_lhs_deref_structure_copy): Remove. (collapse_rest_of_var): Remove. (do_structure_copy): Re-implement. (pta_stats): New global variable. (dump_pta_stats): New function. (struct constraint_expr): Make offset signed. (UNKNOWN_OFFSET): Define special value. (dump_constraint): Dump UNKNOWN_OFFSET as UNKNOWN. (solution_set_expand): New helper function split out from ... (do_sd_constraint): ... here. (solution_set_add): Handle UNKNOWN_OFFSET. Handle negative offsets. (do_ds_constraint): Likewise. (do_sd_constraint): Likewise. Do not special-case ESCAPED = *ESCAPED and CALLUSED = *CALLUSED. (set_union_with_increment): Make inc argument signed. (type_safe): Remove. (get_constraint_for_ptr_offset): Handle unknown and negative constant offsets. (first_vi_for_offset): Handle offsets before start. Bail out early for offsets beyond the variable extent. (first_or_preceding_vi_for_offset): New function. (init_base_vars): Add ESCAPED = ESCAPED + UNKNOWN_OFFSET constraint. Together with ESCAPED = *ESCAPED this properly computes reachability. (find_what_var_points_to): New function. (find_what_p_points_to): Implement in terms of find_what_var_points_to. (pt_solution_reset, pt_solution_empty_p, pt_solution_includes_global, pt_solution_includes_1, pt_solution_includes, pt_solutions_intersect_1, pt_solutions_intersect): New functions. (compute_call_used_vars): Remove. (compute_may_aliases): New main entry into PTA computation. * gimple.h (gimple_p): New typedef. (struct gimple_statement_base): Remove references_memory_p. (struct gimple_statement_with_memory_ops_base): Remove vdef_ops, vuse_ops, stores and loads members. Add vdef and vuse members. (gimple_vuse_ops, gimple_set_vuse_ops, gimple_vdef_ops, gimple_set_vdef_ops, gimple_loaded_syms, gimple_stored_syms, gimple_set_references_memory): Remove. (gimple_vuse_op, gimple_vdef_op, gimple_vuse, gimple_vdef, gimple_vuse_ptr, gimple_vdef_ptri, gimple_set_vuse, gimple_set_vdef): New functions. * tree-cfg.c (move_block_to_fn): Fix off-by-one error. (verify_expr): Allow RESULT_DECL. (gimple_duplicate_bb): Do not copy virtual operands. (gimple_duplicate_sese_region): Adjust. (gimple_duplicate_sese_tail): Likewise. (mark_virtual_ops_in_region): Remove. (move_sese_region_to_fn): Do not call it. * passes.c (init_optimization_passes): Remove pass_reset_cc_flags and pass_simple_dse. (execute_function_todo): Handle TODO_update_address_taken, call execute_update_addresses_taken for TODO_rebuild_alias. (execute_todo): Adjust. (execute_one_pass): Init dump files early. * ipa-struct-reorg.c (finalize_var_creation): Do not mark vars call-clobbered. (create_general_new_stmt): Clear vops. * tree-ssa-reassoc.c (get_rank): Adjust. * tree-vect-slp.c (vect_create_mask_and_perm): Do not mark symbols for renaming. * params.def (PARAM_MAX_ALIASED_VOPS): Remove. (PARAM_AVG_ALIASED_VOPS): Likewise. * tree-ssanames.c (init_ssanames): Allocate SYMS_TO_RENAME. (duplicate_ssa_name_ptr_info): No need to copy the shared bitmaps. * tree-ssa-operands.c: Simplify for new virtual operand representation. (operand_build_cmp, copy_virtual_operands, create_ssa_artificial_load_stmt, add_to_addressable_set, gimple_add_to_addresses_taken): Remove public functions. (unlink_stmt_vdef): New function. * gcc.dg/pr19633-1.c: Adjust. * gcc.dg/torture/pta-callused-1.c: Likewise. * gcc.dg/torture/pr39074-2.c: Likewise. * gcc.dg/torture/pr39074.c: Likewise. * gcc.dg/torture/pta-ptrarith-3.c: New testcase. * gcc.dg/torture/pr30375.c: Adjust. * gcc.dg/torture/pr33563.c: Likewise. * gcc.dg/torture/pr33870.c: Likewise. * gcc.dg/torture/pr33560.c: Likewise. * gcc.dg/torture/pta-structcopy-1.c: New testcase. * gcc.dg/torture/ssa-pta-fn-1.c: Likewise. * gcc.dg/tree-ssa/alias-15.c: Remove. * gcc.dg/tree-ssa/ssa-dce-4.c: New testcase. * gcc.dg/tree-ssa/pr26421.c: Adjust. * gcc.dg/tree-ssa/ssa-fre-10.c: XFAIL. * gcc.dg/tree-ssa/ssa-dce-5.c: New testcase. * gcc.dg/tree-ssa/pr23382.c: Adjust. * gcc.dg/tree-ssa/ssa-fre-20.c: New testcase. * gcc.dg/tree-ssa/alias-16.c: Adjust. * gcc.dg/tree-ssa/ssa-fre-13.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-14.c: Likewise. * gcc.dg/tree-ssa/alias-18.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-15.c: Likewise. * gcc.dg/tree-ssa/ssa-lim-3.c: Likewise. * gcc.dg/tree-ssa/alias-19.c: Likewise. * gcc.dg/tree-ssa/pta-ptrarith-1.c: New testcase. * gcc.dg/tree-ssa/pr13146.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-23.c: Likewise. * gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-18.c: Likewise. * gcc.dg/tree-ssa/ssa-pre-24.c: New XFAILed testcase. * gcc.dg/tree-ssa/ssa-fre-19.c: New testcase. * gcc.dg/tree-ssa/alias-20.c: Likewise. * gcc.dg/tree-ssa/ssa-dse-12.c: Likewise. * gcc.dg/tree-ssa/pr38895.c: Likewise. * gcc.dg/uninit-B.c: XFAIL. * gcc.dg/vect/no-vfa-vect-43.c: Adjust. * gcc.dg/uninit-pr19430.c: XFAIL. * g++.dg/tree-ssa/pr13146.C: New testcase. * g++.dg/opt/pr36187.C: Adjust. * g++.dg/torture/20090329-1.C: New testcase. From-SVN: r145494
2009-04-03 12:24:28 +02:00
#define TODO_rebuild_alias (1 << 20)
/* Rebuild the addressable-vars bitmap and do register promotion. */
#define TODO_update_address_taken (1 << 21)
/* Internally used in execute_function_todo(). */
backport: copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. Merge from tree-cleanup-branch: VRP, store CCP, store copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. From-SVN: r97884
2005-04-09 03:37:54 +02:00
#define TODO_update_ssa_any \
(TODO_update_ssa \
| TODO_update_ssa_no_phi \
| TODO_update_ssa_full_phi \
| TODO_update_ssa_only_virtuals)
#define TODO_verify_all \
(TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts)
/* Register pass info. */
enum pass_positioning_ops
{
PASS_POS_INSERT_AFTER, /* Insert after the reference pass. */
PASS_POS_INSERT_BEFORE, /* Insert before the reference pass. */
PASS_POS_REPLACE /* Replace the reference pass. */
};
struct register_pass_info
{
struct opt_pass *pass; /* New pass to register. */
const char *reference_pass_name; /* Name of the reference pass for hooking
up the new pass. */
int ref_pass_instance_number; /* Insert the pass at the specified
instance number of the reference pass.
Do it for every instance if it is 0. */
enum pass_positioning_ops pos_op; /* how to insert the new pass. */
};
cgraph.h (cgraph_node): Add 'lowered' state. * cgraph.h (cgraph_node): Add 'lowered' state. (cgraph_lower_function): Declare. * cgraphunit.c (cgraph_finalize_function): Initialize lowered flag. (cgraph_lower_function): New function. (cgraph_create_edges): Deal with lowered function bodies. (verify_cgraph_node): Likewise. (cgraph_analyze_function): Do lowering job. (cgraph_build_static_cdtor): Likewise. * function.h (struct function): Add saved_eh and saved_cfg. * integrate.c (copy_decl_for_inlining): Kill LABEL_DECL_UID field. * tree-cfg.c (fold_cond_expr_cond): Export. * tree-flow.h (fold_cond_expr_cond): Declare. * tree-inline.c: Include basic-block, ggc, tree-flow, except.h and pointer-set. (struct_inline_data): Kill fnd, first_inlined_fn, ret_label, in_target_cleanup_p, tree_pruner, tsi; add callee, caller and callee_cfun, block, eh_region, eh_region_offset. (inlining_p): New predicate. (remap_decl): Update for new inline_data; declare newly created inline vars in low gimple way. (copy_body_r): Update for new datastructure, simplify some of handling when we are in gimple; remap LABEL_DECLs for EH; copy TREE_BLOCK; deal with RESX_EXPRs. (copy_bb): New. (copy_edges_for_bb): Likewise. (remap_decl_1): New. (copy_cfg_body): New. (copy_generic_body): Rewrite to work on low gimple. (copy_body): Turn into simple wrapper around copy_cfg_body. (setup_one_parameter): Insert new statements into given basic block. (initialize_initialized_parameters): Likewise, reorganize way things are gimplified. (declare_return_variable): Update for new inline data datastructure. (inline_forbidden_p): Work on low gimple. (estimate_num_insns): Likewise. (expand_call_inline): Work on CFG. (push_cfun, pop_cfun): New functions. (cfun_stack): New stack. (add_lexical_block): New function. (gimple_expand_calls_inline): Work on basic block. (optimize_inline_calls): Likewise. (clone_body, save_body, unsave_ewpr_now): Update for new datastructures. (declare_inline_vars): Work on block instead of bind_expr. (inlining_p): New predicate. * tree-inline.h (push_cfun, pop_cfun): Declare. * tree-optimize.c: Include except.h (all_lowering_passes): New variable. (execute_fixup_cfg, pass_fixup_cfg): New pass. (init_tree_optimization_passes): Move some to all_lowering_passes. (tree_lowering_passes): New function. (tree_rest_of_compilation): Register cfg hooks; save/unsave eh. Co-Authored-By: Dale Johannesen <dalej@apple.com> Co-Authored-By: Jan Hubicka <jh@suse.cz> Co-Authored-By: Stuart Hastings <stuart@apple.com> From-SVN: r99840
2005-05-17 18:56:32 +02:00
extern void tree_lowering_passes (tree decl);
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_mudflap_1;
extern struct gimple_opt_pass pass_mudflap_2;
extern struct gimple_opt_pass pass_lower_cf;
extern struct gimple_opt_pass pass_refactor_eh;
extern struct gimple_opt_pass pass_lower_eh;
extern struct gimple_opt_pass pass_lower_eh_dispatch;
extern struct gimple_opt_pass pass_lower_resx;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_build_cfg;
extern struct gimple_opt_pass pass_early_tree_profile;
extern struct gimple_opt_pass pass_referenced_vars;
extern struct gimple_opt_pass pass_cleanup_eh;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_sra;
extern struct gimple_opt_pass pass_sra_early;
common.opt (fipa-sra): New switch. 2009-09-17 Martin Jambor <mjambor@suse.cz> * common.opt (fipa-sra): New switch. * opts.c (decode_options): Turn flag_ipa_sra on for opt2. * timevar.def (TV_IPA_SRA): New timevar. * params.def (ipa-sra-ptr-growth-factor): New parameter. * doc/invoke.texi: Document -fipa-sra and ipa-sra-ptr-growth-factor. * tree-sra.c: Include cgraph.c. (enum sra_mode): Added SRA_MODE_EARLY_IPA. (struct access): Added fields stmt, grp_maybe_modified, grp_scalar_ptr and grp_not_necessarilly_dereferenced. (func_param_count): New variable. (encountered_apply_args): New variable. (bb_dereferences): New variable. (final_bbs): New variable. (no_accesses_representant): New variable. (no_accesses_p): New function. (dump_access): Dump the new fields. (sra_initialize): Set encountered_apply_args to false. (get_ssa_base_param): New function. (mark_parm_dereference): New function. (create_access): Caring for INIDRECT_REFs and different handling of varialble length accesses in early IPA SRA. Store the stmt - a new parameter - to the new access. (build_access_from_expr_1): New parameter stmt, passed to create_access. Handle INDIRECT_REFs. (build_access_from_expr): Pass the current statement to build_access_from_expr_1. (disqualify_ops_if_throwing_stmt): Trigger only in intraprocedural passes. (build_accesses_from_assign): Pass the current statement to build_access_from_expr_1. Do not create assign links in IPA-SRA. (scan_function): Call handle_ssa_defs on phi nodes. Set bits in final_bbs when necessary. Check for calls to __builtin_apply_args. Fixup EH info if anythng was changed. (is_unused_scalar_param): New function. (ptr_parm_has_direct_uses): New function. (find_param_candidates): New function. (mark_maybe_modified): New function. (analyze_modified_params): New function. (propagate_dereference_distances): New function. (dump_dereferences_table): New function. (analyze_caller_dereference_legality): New function. (unmodified_by_ref_scalar_representative): New function. (splice_param_accesses): New function. (decide_one_param_reduction): New function. (enum ipa_splicing_result): New type. (splice_all_param_accesses): New function. (get_param_index): New function. (turn_representatives_into_adjustments): New function. (analyze_all_param_acesses): New function. (get_replaced_param_substitute): New function. (get_adjustment_for_base): New function. (replace_removed_params_ssa_names): New function. (sra_ipa_reset_debug_stmts): New function. (sra_ipa_modify_expr): New function. (sra_ipa_modify_assign): New function. (convert_callers): New function. (modify_function): New function. (ipa_sra_preliminary_function_checks): New function. (ipa_early_sra): New function. (ipa_early_sra_gate): New function. (pass_early_ipa_sra): New variable. * Makefile.in (tree-sra.o): Add cgraph.h to dependencies. Testsuite: * gcc.dg/struct/wo_prof_escape_arg_to_local.c: Do not run IPA-SRA. * gcc.dg/ipa/ipa-sra-1.c: New test. * gcc.dg/ipa/ipa-sra-2.c: New test. * gcc.dg/ipa/ipa-sra-3.c: New test. * gcc.dg/ipa/ipa-sra-4.c: New test. * gcc.dg/ipa/ipa-sra-5.c: New test. * gcc.c-torture/execute/ipa-sra-1.c: New test. * gcc.c-torture/execute/ipa-sra-2.c: New test. From-SVN: r151800
2009-09-17 13:35:38 +02:00
extern struct gimple_opt_pass pass_early_ipa_sra;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_tail_recursion;
extern struct gimple_opt_pass pass_tail_calls;
extern struct gimple_opt_pass pass_tree_loop;
extern struct gimple_opt_pass pass_tree_loop_init;
extern struct gimple_opt_pass pass_lim;
extern struct gimple_opt_pass pass_tree_unswitch;
extern struct gimple_opt_pass pass_predcom;
extern struct gimple_opt_pass pass_iv_canon;
extern struct gimple_opt_pass pass_scev_cprop;
extern struct gimple_opt_pass pass_empty_loop;
extern struct gimple_opt_pass pass_record_bounds;
extern struct gimple_opt_pass pass_graphite;
backport: configure: Regenerate. 2008-09-02 Sebastian Pop <sebastian.pop@amd.com> Tobias Grosser <grosser@fim.uni-passau.de> Jan Sjodin <jan.sjodin@amd.com> Harsha Jagasia <harsha.jagasia@amd.com> Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> Konrad Trifunovic <konrad.trifunovic@inria.fr> Adrien Eliche <aeliche@isty.uvsq.fr> Merge from graphite branch. * configure: Regenerate. * Makefile.in: Regenerate. * configure.ac (host_libs): Add ppl and cloog. Add checks for PPL and CLooG. * Makefile.def (ppl, cloog): Added modules and dependences. * Makefile.tpl (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): New. (HOST_PPLLIBS, HOST_PPLINC, HOST_CLOOGLIBS, HOST_CLOOGINC): New. gcc/ * graphite.c: New. * graphite.h: New. * tree-loop-linear.c (perfect_loop_nest_depth): Export. * doc/invoke.texi (-floop-block, -floop-interchange, -floop-strip-mine): Document new flags. * tree-into-ssa.c (gimple_vec): Moved... * tree-loop-distribution.c (rdg_component): Moved... * cfgloopmanip.c: Include tree-flow.h. (update_dominators_in_loop): New. (create_empty_if_region_on_edge): New. (create_empty_loop_on_edge): New. (loopify): Use update_dominators_in_loop. * tree-pass.h (pass_graphite_transforms): Declared. * configure: Regenerate. * tree-phinodes.c (make_phi_node): Export. (add_phi_node_to_bb): New, split from create_phi_node. * tree-chrec.c (for_each_scev_op): New. * tree-chrec.h (for_each_scev_op): Declared. * tree-ssa-loop-ivopts.c (get_phi_with_result): New. (remove_statement): Call get_phi_with_result. * config.in (HAVE_cloog): Undef. * gdbinit.in (pgg): New. * timevar.def (TV_GRAPHITE_TRANSFORMS): New. * tree-ssa-loop.c (graphite_transforms): New. (gate_graphite_transforms): New. (pass_graphite_transforms): New. * configure.ac (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC, HAVE_cloog): Defined. * tree-vectorizer.c (rename_variables_in_bb): Export. * tree-data-ref.c (dr_may_alias_p): Export. (stmt_simple_memref_p): New. (find_data_references_in_stmt): Export. (find_data_references_in_loop): Export. (create_rdg_edge_for_ddr): Initialize RDGE_RELATION. (create_rdg_edges_for_scalar): Initialize RDGE_RELATION. (create_rdg_vertices): Export. (build_empty_rdg): New. (build_rdg): Call build_empty_rdg. Free dependence_relations. * tree-data-ref.h (rdg_component): ... here. (scop_p): New. (struct data_reference): Add a field scop. (DR_SCOP): New. (find_data_references_in_loop): Declared. (find_data_references_in_stmt): Declared. (create_rdg_vertices): Declared. (dr_may_alias_p): Declared. (stmt_simple_memref_p): Declared. (struct rdg_edge): Add a field ddr_p relation. (build_empty_rdg): Declared. * lambda.h (lambda_matrix): Declare a VEC of. (find_induction_var_from_exit_cond): Declared. (lambda_vector_compare): New. * common.opt (fgraphite, floop-strip-mine, floop-interchange, floop-block): New flags. * lambda-code.c (find_induction_var_from_exit_cond): Export. * cfgloop.c (is_loop_exit): New. * cfgloop.h (is_loop_exit): Declared. (create_empty_if_region_on_edge): Declared. (create_empty_loop_on_edge): Declared. * tree-flow.h (add_phi_node_to_bb): Declared. (make_phi_node): Declared. (rename_variables_in_bb): Declared. (perfect_loop_nest_depth): Declared. (graphite_transform_loops): Declared. * Makefile.in (cfgloopmanip.o): Depend on TREE_FLOW_H. (graphite.o-warn): Add -Wno-error. (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): Declared. (LIBS): Add GMPLIBS, CLOOGLIBS, PPLLIBS. (INCLUDES): Add PPLINC, CLOOGINC. (OBJS-common): Add graphite.o. (graphite.o): Add rule. * gimple.h (gimple_vec): ... here. * tree-cfg.c (print_loops): Start printing at ENTRY_BLOCK_PTR. * passes.c (init_optimization_passes): Schedule pass_graphite_transforms. testsuite/ * gcc.dg/graphite/scop-{0,1,2,3,4,5,6,7,8,9, 10,11,12,13,14,15,16,17,18}.c: New. * gcc.dg/graphite/graphite.exp: New. * gcc.dg/graphite/scop-matmult.c: New. * gcc.dg/graphite/block-0.c: New. * lib/target-supports.exp (check_effective_target_fgraphite): New. * gfortran.dg/graphite/block-1.f90: New. * gfortran.dg/graphite/scop-{1,2}.f: New. * gfortran.dg/graphite/block-{1,3,4}.f90: New. * gfortran.dg/graphite/graphite.exp: New. Co-Authored-By: Adrien Eliche <aeliche@isty.uvsq.fr> Co-Authored-By: Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> Co-Authored-By: Harsha Jagasia <harsha.jagasia@amd.com> Co-Authored-By: Jan Sjodin <jan.sjodin@amd.com> Co-Authored-By: Konrad Trifunovic <konrad.trifunovic@inria.fr> Co-Authored-By: Tobias Grosser <grosser@fim.uni-passau.de> From-SVN: r139893
2008-09-02 18:31:04 +02:00
extern struct gimple_opt_pass pass_graphite_transforms;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_if_conversion;
extern struct gimple_opt_pass pass_loop_distribution;
extern struct gimple_opt_pass pass_vectorize;
passes.texi (Tree-SSA passes): Document SLP pass. * doc/passes.texi (Tree-SSA passes): Document SLP pass. * tree-pass.h (pass_slp_vectorize): New pass. * params.h (SLP_MAX_INSNS_IN_BB): Define. * timevar.def (TV_TREE_SLP_VECTORIZATION): Define. * tree-vectorizer.c (timevar.h): Include. (user_vect_verbosity_level): Declare. (vect_location): Fix comment. (vect_set_verbosity_level): Update user_vect_verbosity_level instead of vect_verbosity_level. (vect_set_dump_settings): Add an argument. Ignore user defined verbosity if dump flags require higher level of verbosity. Print to stderr only for loop vectorization. (vectorize_loops): Update call to vect_set_dump_settings. (execute_vect_slp): New function. (gate_vect_slp): Likewise. (struct gimple_opt_pass pass_slp_vectorize): New. * tree-vectorizer.h (struct _bb_vec_info): Define along macros to access its members. (vec_info_for_bb): New function. (struct _stmt_vec_info): Add bb_vinfo and a macro for its access. (VECTORIZATION_ENABLED): New macro. (SLP_ENABLED, SLP_DISABLED): Likewise. (vect_is_simple_use): Add bb_vec_info argument. (new_stmt_vec_info, vect_analyze_data_ref_dependences, vect_analyze_data_refs_alignment, vect_verify_datarefs_alignment, vect_analyze_data_ref_accesses, vect_analyze_data_refs, vect_schedule_slp, vect_analyze_slp): Likewise. (vect_analyze_stmt): Add slp_tree argument. (find_bb_location): Declare. (vect_slp_analyze_bb, vect_slp_transform_bb): Likewise. * tree-vect-loop.c (new_loop_vec_info): Adjust function calls. (vect_analyze_loop_operations, vect_analyze_loop, get_initial_def_for_induction, vect_create_epilog_for_reduction, vect_finalize_reduction, vectorizable_reduction, vectorizable_live_operation, vect_transform_loop): Likewise. * tree-data-ref.c (dr_analyze_innermost): Update comment, skip evolution analysis if analyzing a basic block. (dr_analyze_indices): Likewise. (initialize_data_dependence_relation): Skip the test whether the object is invariant for basic blocks. (compute_all_dependences): Skip dependence analysis for data references in basic blocks. (find_data_references_in_stmt): Don't fail in case of invariant access in basic block. (find_data_references_in_bb): New function. (find_data_references_in_loop): Move code to find_data_references_in_bb and add a call to it. (compute_data_dependences_for_bb): New function. * tree-data-ref.h (compute_data_dependences_for_bb): Declare. * tree-vect-data-refs.c (vect_check_interleaving): Adjust to the case that STEP is 0. (vect_analyze_data_ref_dependence): Check for interleaving in case of unknown dependence in basic block and fail in case of dependence in basic block. (vect_analyze_data_ref_dependences): Add bb_vinfo argument, get data dependence instances from either loop or basic block vectorization info. (vect_compute_data_ref_alignment): Check if it is loop vectorization before calling nested_in_vect_loop_p. (vect_compute_data_refs_alignment): Add bb_vinfo argument, get data dependence instances from either loop or basic block vectorization info. (vect_verify_datarefs_alignment): Likewise. (vect_enhance_data_refs_alignment): Adjust function calls. (vect_analyze_data_refs_alignment): Likewise. (vect_analyze_group_access): Fix printing. Skip different checks if DR_STEP is 0. Keep strided stores either in loop or basic block vectorization data structure. Fix indentation. (vect_analyze_data_ref_access): Fix comments, allow zero step in basic blocks. (vect_analyze_data_ref_accesses): Add bb_vinfo argument, get data dependence instances from either loop or basic block vectorization info. (vect_analyze_data_refs): Update comment. Call compute_data_dependences_for_bb to analyze basic blocks. (vect_create_addr_base_for_vector_ref): Check for outer loop only in case of loop vectorization. In case of basic block vectorization use data-ref itself as a base. (vect_create_data_ref_ptr): In case of basic block vectorization: don't advance the pointer, add new statements before the current statement. Adjust function calls. (vect_supportable_dr_alignment): Support only aligned accesses in basic block vectorization. * common.opt (ftree-slp-vectorize): New flag. * tree-vect-patterns.c (widened_name_p): Adjust function calls. (vect_pattern_recog_1): Likewise. * tree-vect-stmts.c (process_use): Likewise. (vect_init_vector): Add new statements in the beginning of the basic block in case of basic block SLP. (vect_get_vec_def_for_operand): Adjust function calls. (vect_finish_stmt_generation): Likewise. (vectorizable_call): Add assert that it is loop vectorization, adjust function calls. (vectorizable_conversion, vectorizable_assignment): Likewise. (vectorizable_operation): In case of basic block SLP, take vectorization factor from statement's type and skip the relevance check. Adjust function calls. (vectorizable_type_demotion): Add assert that it is loop vectorization, adjust function calls. (vectorizable_type_promotion): Likewise. (vectorizable_store): Check for outer loop only in case of loop vectorization. Adjust function calls. For basic blocks, skip the relevance check and don't advance pointers. (vectorizable_load): Likewise. (vectorizable_condition): Add assert that it is loop vectorization, adjust function calls. (vect_analyze_stmt): Add argument. In case of basic block SLP, check that it is not reduction, get vector type, call only supported functions, skip loop specific parts. (vect_transform_stmt): Check for outer loop only in case of loop vectorization. (new_stmt_vec_info): Add new argument and initialize bb_vinfo. (vect_is_simple_use): Fix comment, add new argument, fix conditions for external definition. * passes.c (pass_slp_vectorize): New pass. * tree-vect-slp.c (find_bb_location): New function. (vect_get_and_check_slp_defs): Add argument, adjust function calls, check for patterns only in loops. (vect_build_slp_tree): Add argument, adjust function calls, fail in case of multiple types in basic block SLP. (vect_mark_slp_stmts_relevant): New function. (vect_supported_load_permutation_p): Fix comment. (vect_analyze_slp_instance): Add argument. In case of basic block SLP, take vectorization factor from statement's type, check that unrolling factor is 1. Adjust function call. Save SLP instance in either loop or basic block vectorization structure. Return FALSE, if SLP failed. (vect_analyze_slp): Add argument. Get strided stores groups from either loop or basic block vectorization structure. Return FALSE if basic block SLP failed. (new_bb_vec_info): New function. (destroy_bb_vec_info, vect_slp_analyze_node_operations, vect_slp_analyze_operations, vect_slp_analyze_bb): Likewise. (vect_schedule_slp): Add argument. Get SLP instances from either loop or basic block vectorization structure. Set vectorization factor to be 1 for basic block SLP. (vect_slp_transform_bb): New function. * params.def (PARAM_SLP_MAX_INSNS_IN_BB): Define. From-SVN: r147829
2009-05-24 10:44:56 +02:00
extern struct gimple_opt_pass pass_slp_vectorize;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_complete_unroll;
re PR tree-optimization/18754 (unrolling happens too late/SRA does not happen late enough) 2008-04-27 Richard Guenther <rguenther@suse.de> 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. From-SVN: r134730
2008-04-27 18:27:08 +02:00
extern struct gimple_opt_pass pass_complete_unrolli;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_parallelize_loops;
extern struct gimple_opt_pass pass_loop_prefetch;
extern struct gimple_opt_pass pass_iv_optimize;
extern struct gimple_opt_pass pass_tree_loop_done;
extern struct gimple_opt_pass pass_ch;
extern struct gimple_opt_pass pass_ccp;
extern struct gimple_opt_pass pass_phi_only_cprop;
extern struct gimple_opt_pass pass_build_ssa;
extern struct gimple_opt_pass pass_build_alias;
extern struct gimple_opt_pass pass_build_ealias;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_dominator;
extern struct gimple_opt_pass pass_dce;
extern struct gimple_opt_pass pass_dce_loop;
extern struct gimple_opt_pass pass_cd_dce;
extern struct gimple_opt_pass pass_call_cdce;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_merge_phi;
extern struct gimple_opt_pass pass_split_crit_edges;
extern struct gimple_opt_pass pass_pre;
extern struct gimple_opt_pass pass_profile;
extern struct gimple_opt_pass pass_strip_predict_hints;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_lower_complex_O0;
extern struct gimple_opt_pass pass_lower_complex;
extern struct gimple_opt_pass pass_lower_vector;
extern struct gimple_opt_pass pass_lower_vector_ssa;
extern struct gimple_opt_pass pass_lower_omp;
re PR c/40401 (ICE: verify_gimple failed) 2009-07-17 Richard Guenther <rguenther@suse.de> PR c/40401 * tree-pass.h (pass_diagnose_omp_blocks): Declare. (pass_warn_unused_result): Likewise. (TODO_set_props): Remove. * omp-low.c (diagnose_omp_structured_block_errors): Change to run as a pass. (pass_diagnose_omp_blocks): Define. * c-decl.c (pop_file_scope): Do not finalize the CU here. (c_gimple_diagnostics_recursively): Remove. (finish_function): Do not call it. (c_write_global_declarations): Continue after errors. Finalize the CU here. * c-gimplify.c (c_genericize): Do not gimplify here. * c-common.c (c_warn_unused_result): Move ... * tree-cfg.c (do_warn_unused_result): ... here. (run_warn_unused_result): New function. (gate_warn_unused_result): New function. (pass_warn_unused_result): New pass. * c-common.h (c_warn_unused_result): Remove. * flags.h (flag_warn_unused_result): Declare. * c-opts.c (c_common_init_options): Enable flag_warn_unused_result. * opts.c (flag_warn_unused_result): Initialize to false. * toplev.c (compile_file): Add comment. * omp-low.c (create_omp_child_function): Do not register the function with the frontend. (diagnose_omp_structured_block_errors): Prepare to be called as optimization pass. (gate_diagnose_omp_blocks): New function. (pass_diagnose_omp_blocks): New pass. * cgraph.h (cgraph_optimize): Remove. (cgraph_analyze_function): Likewise. * cgraph.c (cgraph_add_new_function): Gimplify C++ thunks. * cgraphunit.c (cgraph_lower_function): Lower nested functions before their parents here. (cgraph_finalize_function): Not here. (cgraph_analyze_function): Gimplify functions here. (cgraph_finalize_compilation_unit): Continue after errors. Optimize the callgraph from here. (cgraph_optimize): Make static. * langhooks.c (write_global_declarations): Finalize the CU. * gimplify.c (gimplify_asm_expr): Do not emit ASMs with errors. (gimplify_function_tree): Assert we gimplify only once. Set PROP_gimple_any property. * tree-nested.c (gimplify_all_functions): New function. (lower_nested_functions): Gimplify all nested functions. * gimple.h (diagnose_omp_structured_block_errors): Remove. * passes.c (init_optimization_passes): Add pass_warn_unused_result and pass_diagnose_omp_blocks after gimplification. Do not set TODO_set_props on all_lowering_passes. (execute_one_pass): Do not handle TODO_set_props. * Makefile.in (cgraphunit.o): Add $(TREE_DUMP_H) dependency. (gimplify.o): Add tree-pass.h dependency. * tree-inline.c (copy_statement_list): Properly copy STATEMENT_LIST. (copy_tree_body_r): Properly handle TARGET_EXPR like SAVE_EXPR. (unsave_r): Likewise. * c-omp.c (c_finish_omp_atomic): Set DECL_CONTEXT on the temporary variable. cp/ * decl.c (finish_function): Do not emit unused result warnings from here. * cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use c_warn_unused_result_pass. * semantics.c (expand_or_defer_fn): Adjust assertion about IL status. * optimize.c (clone_body): Clone in GENERIC. (maybe_clone_body): Do not clear DECL_SAVED_TREE. * decl2.c (cp_write_global_declarations): Fix body test. Do not call cgraph_optimize. * Make-lang.in (optimize.o): Add tree-iterator.h dependency. * method.c (use_thunk): Register thunk with cgraph_finalize_function. * error.c (function_category): Guard access of DECL_LANG_SPECIFIC. java/ * java-gimplify.c (java_genericize): Do not gimplify here. But replace all local references. (java_gimplify_expr): Do not replace local references here. (java_gimplify_modify_expr): Likewise. * jcf-parse.c (java_parse_file): Do not finalize the CU or optimize the cgraph here. * decl.c (java_replace_reference): Make static. (java_replace_references): New function. (end_java_method): Clear base_decl_map. * java-tree.h (java_replace_references): Declare. (java_replace_reference): Remove. ada/ * utils.c (end_subprog_body): Revert to pre-tuples state. Remove unused parameter. (gnat_gimplify_function): Do not gimplify here. Fold into its only caller and remove. (gnat_builtin_function): Adjust for end_subprog_body signature change. (gnat_write_global_declarations): Also finalize the CU. * misc.c (gnat_parse_file): Do not finalize the CU here. * trans.c (gigi): Revert to pre-tuples state. (Subprogram_Body_to_gnu): Adjust for end_subprog_body signature change. * gigi.h (end_subprog_body): Remove unused parameter. fortran/ * f95-lang.c (gfc_be_parse_file): Do not finalize the CU here. * trans-decl.c (gfc_gimplify_function): Remove. (build_entry_thunks): Do not gimplify here. (create_main_function): Likewise. (gfc_generate_function_code): Likewise. * g++.dg/rtti/crash4.C: New testcase. * g++.dg/torture/20090706-1.C: Likewise. * gcc.dg/redecl-17.c: Likewise. * gfortran.dg/missing_optional_dummy_5.f90: Adjust pattern. * gcc.dg/declspec-9.c: Expect extra error. * gcc.dg/declspec-10.c: Likewise. * gcc.dg/declspec-11.c: Likewise. * gcc.dg/redecl-10.c: Expect extra warnings. * gcc.target/i386/pr39082-1.c: Adjust diagnostic location. * gcc.target/i386/pr39545-1.c: Likewise. * g++.dg/ext/asm3.C: Expect more errors. * g++.dg/gomp/block-1.C: Likewise. * g++.dg/gomp/block-2.C: Likewise. * g++.dg/gomp/block-3.C: Likewise. * g++.dg/gomp/block-5.C: Likewise. * g++.old-deja/g++.jason/report.C: Expect extra warnings. * g++.dg/warn/unused-result1.C: XFAIL. From-SVN: r149750
2009-07-17 17:49:34 +02:00
extern struct gimple_opt_pass pass_diagnose_omp_blocks;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_expand_omp;
extern struct gimple_opt_pass pass_expand_omp_ssa;
extern struct gimple_opt_pass pass_object_sizes;
extern struct gimple_opt_pass pass_fold_builtins;
extern struct gimple_opt_pass pass_stdarg;
extern struct gimple_opt_pass pass_early_warn_uninitialized;
extern struct gimple_opt_pass pass_late_warn_uninitialized;
extern struct gimple_opt_pass pass_cse_reciprocals;
extern struct gimple_opt_pass pass_cse_sincos;
extern struct gimple_opt_pass pass_optimize_bswap;
extern struct gimple_opt_pass pass_optimize_widening_mul;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_warn_function_return;
extern struct gimple_opt_pass pass_warn_function_noreturn;
extern struct gimple_opt_pass pass_cselim;
extern struct gimple_opt_pass pass_phiopt;
extern struct gimple_opt_pass pass_forwprop;
extern struct gimple_opt_pass pass_phiprop;
extern struct gimple_opt_pass pass_tree_ifcombine;
extern struct gimple_opt_pass pass_dse;
extern struct gimple_opt_pass pass_nrv;
extern struct gimple_opt_pass pass_rename_ssa_copies;
extern struct gimple_opt_pass pass_rest_of_compilation;
extern struct gimple_opt_pass pass_sink_code;
extern struct gimple_opt_pass pass_fre;
extern struct gimple_opt_pass pass_linear_transform;
extern struct gimple_opt_pass pass_check_data_deps;
extern struct gimple_opt_pass pass_copy_prop;
extern struct gimple_opt_pass pass_vrp;
extern struct gimple_opt_pass pass_uncprop;
extern struct gimple_opt_pass pass_return_slot;
extern struct gimple_opt_pass pass_reassoc;
extern struct gimple_opt_pass pass_rebuild_cgraph_edges;
extern struct gimple_opt_pass pass_remove_cgraph_callee_edges;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_build_cgraph_edges;
attr-noinline.c: Avoid pure-const optimization. * gcc.dg/attr-noinline.c: Avoid pure-const optimization. * gcc.dg/pr33826.c: Update dump files. * gcc.dg/ipa/ipa-3.c: Avoid pure-const optimization. * gcc.dg/ipa/ipa-5.c: Avoid pure-const optimization. Merge from pretty-ipa: 2009-03-27 Jan Hubicka <jh@suse.cz> * cgraph.c (dump_cgraph_node): Add replace output flag by process. * tree-pass.h (function_called_by_processed_nodes_p): Declare. * passes.c (function_called_by_processed_nodes_p): New. * ipa-pure-const.c (check_call): Fix handling of operands. (analyze_function): Dump debug output for skipped bodies. (local_pure_const): Use function_called_by_processed_nodes_p. * dwarf2out.c (reference_to_unused): Use output. * passes.c (do_per_function_toporder): Likewise. 2008-11-12 Jan Hubicka <jh@suse.cz> * tree-pass.h (pass_fixup_cfg, pass_local_pure_const): Declare. * ipa-pure-const.c (funct_state_d): Add can throw field; make state_set_in_source enum (check_decl): Ignore memory tags; do not set fake looping flags; dump diagnostics. (check_operand, check_tree, check_rhs_var, check_lhs_var, get_asm_expr_operands, scan_function_op, scan_function_stmt): Remove. (check_call, analyze_function): Rewrite. (check_stmt): New. (add_new_function): Update call of analyze_function. (generate_summary): Add call of analyze_function. (propagate): Propagate can_throw; handle state_set_in_source correctly. (local_pure_const): New function. (pass_local_pure_const): New pass. * ipa-inline.c (inline_transform): Set after_inlining. * tree-eh.c (stmt_can_throw_external): New. * tree-optimize.c (execute_fixup_cfg): Do not set after_inlining; work with aliasing built. * tree-flow.h (stmt_can_throw_external): New. * passes.c (init_optimization_passes): Schedule fixup_cfg pass early; and local pure/const pass in early and late optimization queue. From-SVN: r145204
2009-03-28 20:29:35 +01:00
extern struct gimple_opt_pass pass_local_pure_const;
dbgcnt.def (cprop1, [...]): Remove * dbgcnt.def (cprop1, cprop2, gcse, jump_bypass): Remove (cprop, hoist, pre, store_motion): New debug counters. * tree-pass.h (pass_tracer): Move to list of gimple passes, it is not an RTL pass anymore. (pass_profiling): Remove extern decl for pass removed in 2005. (pass_gcse, pass_jump_bypass): Remove. * final.c (rest_of_clean_state): Set flag_rerun_cse_after_global_opts to 0 for clean state. * toplev.h (flag_rerun_cse_after_global_opts): Add extern declaration. * cse.c (gate_handle_cse_after_global_opts, rest_of_handle_cse_after_global_opts): New functions. (pass_cse_after_global_opts): New pass, does local CSE. * timevar.def (TV_GCSE, TV_CPROP1, TV_CPROP2, TV_BYPASS): Remove. (TV_CPROP): New timevar. * gcse.c (flag_rerun_cse_after_global_opts): New global variable. (run_jump_opt_after_gcse, max_gcse_regno): Remove global vars. (gcse_main, recompute_all_luids): Remove. (compute_hash_table_work): Call max_reg_num instead of reading max_gcse_regno. (cprop_jump): Don't set run_jump_opt_after_gcse. (constprop_register): Always allow to alter jumps. (cprop_insn): Likewise. (do_local_cprop): Likewise. (local_cprop_pass): Likewise. Return non-zero if something changed. (cprop): Remove function, fold interesting bits into one_cprop_pass. (find_implicit_sets): Add note about missed optimization opportunity. (one_cprop_pass): Rewrite to be "the" CPROP pass, called from the pass_rtl_cprop execute function. Don't bother tracking the pass number, each pass gets its own dumpfile now anyway. Always allow to alter jumpsand bypass jumps. (bypass_block): Don't ignore regno >= max_gcse_regno, find_bypass_set will just find no suitable set. (pre_edge_insert): Fix dumping, this function is for PRE only. (one_pre_gcse_pass): Rewrite to be "the" PRE pass, called from the pass_rtl_pre execute function. (hoist_code): Return non-zero if something changed. Keep track of substitutions and insertions for statistics gathering similar to PRE. (one_code_hoisting_pass): Rewrite to be "the" code hoisting pass, called from the pass_rtl_hoist execute function. Show pass statistics. (compute_store_table): Use max_reg_num directly instead of using the formerly global max_gcse_regno. (build_store_vectors): Likewise. (replace_store_insn): Fix dumping. (store_motion): Rename to ... (one_store_motion_pass): ... this. Rewrite to be "the" STORE_MOTION pass, called from the pass_rtl_store_motion execute function. Keep track of substitutions and insertions for statistics gathering similar to PRE. (bypass_jumps): Remove, fold interesting bits into ... (one_cprop_pass): ... this. Rewrite to be "the" CPROP pass, called from the pass_rtl_cprop execute function. (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass): Remove. (gate_handle_gcse, rest_of_handle_gcse): Remove. (gate_rtl_cprop, execute_rtl_cprop, pass_rtl_cprop): New. (gate_rtl_pre, execute_rtl_pre, pass_rtl_pre): New. (gate_rtl_hoist, execute_rtl_hoist, pass_rtl_hoist): New. (gate_rtl_store_motion, execute_rtl_store_motion, pass_rtl_store_motion): New. * common.opt: Remove flag_cse_skip_blocks, adjust documentation to make it clear that -fcse-skip-blocks is a no-op for backward compat. * passes.c (init_optimization_passes): Remove pass_gcse and pass_jump_bypass. Schedule cprop, pre, hoist, cprop, store_motion, and cse_after_global_opts in place of pass_gcse. Schedule cprop instead of pass_jump_bypass. From-SVN: r146848
2009-04-27 19:21:27 +02:00
extern struct gimple_opt_pass pass_tracer;
re PR c/40401 (ICE: verify_gimple failed) 2009-07-17 Richard Guenther <rguenther@suse.de> PR c/40401 * tree-pass.h (pass_diagnose_omp_blocks): Declare. (pass_warn_unused_result): Likewise. (TODO_set_props): Remove. * omp-low.c (diagnose_omp_structured_block_errors): Change to run as a pass. (pass_diagnose_omp_blocks): Define. * c-decl.c (pop_file_scope): Do not finalize the CU here. (c_gimple_diagnostics_recursively): Remove. (finish_function): Do not call it. (c_write_global_declarations): Continue after errors. Finalize the CU here. * c-gimplify.c (c_genericize): Do not gimplify here. * c-common.c (c_warn_unused_result): Move ... * tree-cfg.c (do_warn_unused_result): ... here. (run_warn_unused_result): New function. (gate_warn_unused_result): New function. (pass_warn_unused_result): New pass. * c-common.h (c_warn_unused_result): Remove. * flags.h (flag_warn_unused_result): Declare. * c-opts.c (c_common_init_options): Enable flag_warn_unused_result. * opts.c (flag_warn_unused_result): Initialize to false. * toplev.c (compile_file): Add comment. * omp-low.c (create_omp_child_function): Do not register the function with the frontend. (diagnose_omp_structured_block_errors): Prepare to be called as optimization pass. (gate_diagnose_omp_blocks): New function. (pass_diagnose_omp_blocks): New pass. * cgraph.h (cgraph_optimize): Remove. (cgraph_analyze_function): Likewise. * cgraph.c (cgraph_add_new_function): Gimplify C++ thunks. * cgraphunit.c (cgraph_lower_function): Lower nested functions before their parents here. (cgraph_finalize_function): Not here. (cgraph_analyze_function): Gimplify functions here. (cgraph_finalize_compilation_unit): Continue after errors. Optimize the callgraph from here. (cgraph_optimize): Make static. * langhooks.c (write_global_declarations): Finalize the CU. * gimplify.c (gimplify_asm_expr): Do not emit ASMs with errors. (gimplify_function_tree): Assert we gimplify only once. Set PROP_gimple_any property. * tree-nested.c (gimplify_all_functions): New function. (lower_nested_functions): Gimplify all nested functions. * gimple.h (diagnose_omp_structured_block_errors): Remove. * passes.c (init_optimization_passes): Add pass_warn_unused_result and pass_diagnose_omp_blocks after gimplification. Do not set TODO_set_props on all_lowering_passes. (execute_one_pass): Do not handle TODO_set_props. * Makefile.in (cgraphunit.o): Add $(TREE_DUMP_H) dependency. (gimplify.o): Add tree-pass.h dependency. * tree-inline.c (copy_statement_list): Properly copy STATEMENT_LIST. (copy_tree_body_r): Properly handle TARGET_EXPR like SAVE_EXPR. (unsave_r): Likewise. * c-omp.c (c_finish_omp_atomic): Set DECL_CONTEXT on the temporary variable. cp/ * decl.c (finish_function): Do not emit unused result warnings from here. * cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use c_warn_unused_result_pass. * semantics.c (expand_or_defer_fn): Adjust assertion about IL status. * optimize.c (clone_body): Clone in GENERIC. (maybe_clone_body): Do not clear DECL_SAVED_TREE. * decl2.c (cp_write_global_declarations): Fix body test. Do not call cgraph_optimize. * Make-lang.in (optimize.o): Add tree-iterator.h dependency. * method.c (use_thunk): Register thunk with cgraph_finalize_function. * error.c (function_category): Guard access of DECL_LANG_SPECIFIC. java/ * java-gimplify.c (java_genericize): Do not gimplify here. But replace all local references. (java_gimplify_expr): Do not replace local references here. (java_gimplify_modify_expr): Likewise. * jcf-parse.c (java_parse_file): Do not finalize the CU or optimize the cgraph here. * decl.c (java_replace_reference): Make static. (java_replace_references): New function. (end_java_method): Clear base_decl_map. * java-tree.h (java_replace_references): Declare. (java_replace_reference): Remove. ada/ * utils.c (end_subprog_body): Revert to pre-tuples state. Remove unused parameter. (gnat_gimplify_function): Do not gimplify here. Fold into its only caller and remove. (gnat_builtin_function): Adjust for end_subprog_body signature change. (gnat_write_global_declarations): Also finalize the CU. * misc.c (gnat_parse_file): Do not finalize the CU here. * trans.c (gigi): Revert to pre-tuples state. (Subprogram_Body_to_gnu): Adjust for end_subprog_body signature change. * gigi.h (end_subprog_body): Remove unused parameter. fortran/ * f95-lang.c (gfc_be_parse_file): Do not finalize the CU here. * trans-decl.c (gfc_gimplify_function): Remove. (build_entry_thunks): Do not gimplify here. (create_main_function): Likewise. (gfc_generate_function_code): Likewise. * g++.dg/rtti/crash4.C: New testcase. * g++.dg/torture/20090706-1.C: Likewise. * gcc.dg/redecl-17.c: Likewise. * gfortran.dg/missing_optional_dummy_5.f90: Adjust pattern. * gcc.dg/declspec-9.c: Expect extra error. * gcc.dg/declspec-10.c: Likewise. * gcc.dg/declspec-11.c: Likewise. * gcc.dg/redecl-10.c: Expect extra warnings. * gcc.target/i386/pr39082-1.c: Adjust diagnostic location. * gcc.target/i386/pr39545-1.c: Likewise. * g++.dg/ext/asm3.C: Expect more errors. * g++.dg/gomp/block-1.C: Likewise. * g++.dg/gomp/block-2.C: Likewise. * g++.dg/gomp/block-3.C: Likewise. * g++.dg/gomp/block-5.C: Likewise. * g++.old-deja/g++.jason/report.C: Expect extra warnings. * g++.dg/warn/unused-result1.C: XFAIL. From-SVN: r149750
2009-07-17 17:49:34 +02:00
extern struct gimple_opt_pass pass_warn_unused_result;
extern struct gimple_opt_pass pass_split_functions;
/* IPA Passes */
extern struct simple_ipa_opt_pass pass_ipa_lower_emutls;
extern struct simple_ipa_opt_pass pass_ipa_function_and_variable_visibility;
value-prof.c (gimple_divmod_fixed_value): Work on SSA form. 2010-10-05 Richard Guenther <rguenther@suse.de> * value-prof.c (gimple_divmod_fixed_value): Work on SSA form. (gimple_mod_pow2): Likewise. (gimple_mod_subtract): Likewise. (gimple_ic): Likewise. (gimple_stringop_fixed_value): Likewise. * tree-profile.c (tree_init_edge_profiler): Mark profile functions nothrow and leaf. (add_abnormal_goto_call_edges): Remove. (tree_gen_edge_profiler): Work on SSA form. (tree_gen_ic_profiler): Likewise. Simplify. (do_tree_profiling): Update SSA form. (pass_tree_profile): Remove. (do_tree_profiling): Likewise. (gate_tree_profile_ipa): New function. (pass_ipa_tree_profile): New. (tree_profiling): Re-write as IPA pass. Properly drop const/pure state of instrumented functions. * passes.c (init_optimization_passes): Remove early non-SSA inlining. Move profiling after early optimizations. * ipa-inline.c (cgraph_gate_ipa_early_inlining): Remove. (pass_ipa_early_inline): Likewise. * tree-pass.h (pass_ipa_early_inline): Remove. (pass_tree_profile): Likewise. (pass_ipa_tree_profile): Declare. * gcc.dg/tree-prof/val-prof-1.c: Adjust. * gcc.dg/tree-prof/val-prof-2.c: Likewise. * gcc.dg/tree-prof/val-prof-3.c: Likewise. * gcc.dg/tree-prof/val-prof-4.c: Likewise. * gcc.dg/tree-prof/val-prof-5.c: Likewise. * gcc.dg/tree-prof/val-prof-7.c: Likewise. * gcc.dg/tree-prof/stringop-1.c: Likewise. * gcc.dg/tree-prof/stringop-2.c: Likewise. * gcc.dg/tree-prof/ic-misattribution-1.c: Likewise. * gcc.dg/tree-prof/indir-call-prof.c: Likewise. * gcc.dg/tree-prof/update-loopch.c: Likewise. * g++.dg/tree-prof/indir-call-prof.C: Likewise. * g++.dg/tree-prof/inline_mismatch_args.C: Likewise. * gcc.dg/tree-prof/tracer-1.c: Likewise. * gcc.dg/tree-ssa/inline-4.c: Likewise. * gcc.dg/tree-ssa/inline-3.c: Likewise. * gcc.dg/tree-ssa/20080530.c: Likewise. * g++.dg/tree-ssa/inline-3.C: Likewise. * g++.dg/tree-ssa/inline-1.C: Likewise. * g++.dg/tree-ssa/inline-2.C: Likewise. * gcc.dg/profile-dir-1.c: Likewise. * gcc.dg/profile-dir-2.c: Likewise. * gcc.dg/profile-dir-3.c: Likewise. From-SVN: r164986
2010-10-05 12:42:24 +02:00
extern struct simple_ipa_opt_pass pass_ipa_tree_profile;
extern struct simple_ipa_opt_pass pass_early_local_passes;
lto-symtab.c (lto_cgraph_replace_node): Assert that inline clones has no address taken. * lto-symtab.c (lto_cgraph_replace_node): Assert that inline clones has no address taken. * cgraph.c (cgraph_mark_needed_node): Assert that inline clones are never needed. (cgraph_clone_node): Clear externally_visible flag for clones. * cgraph.h (cgraph_only_called_directly_p, cgraph_can_remove_if_no_direct_calls_p): New predicates. * tree-pass.h (pass_ipa_whole_program_visibility): Declare. * ipa-cp.c (ipcp_cloning_candidate_p): Use new predicate. (ipcp_initialize_node_lattices, ipcp_estimate_growth, ipcp_insert_stage): Likwise. * cgraphunit.c (cgraph_decide_is_function_needed): Do not compute externally_visible flag. (verify_cgraph_node): Verify that inline clones look right. (process_function_and_variable_attributes): Do not set externally_visible flags. (ipa_passes): Avoid executing small_ipa_passes at LTO stage; they've been already run. * lto-cgraph.c (lto_output_node): Assert that inline clones are not boundaries. * ipa-inline.c (cgraph_clone_inlined_nodes): Use new predicates; clear externally_visible when turning into inline clones (cgraph_mark_inline_edge): Use new predicates. (cgraph_estimate_growth): Likewise. (cgraph_decide_inlining): Likewise. * ipa.c (cgraph_postorder): Likewise. (cgraph_remove_unreachable_nodes): Likewise; sanity check that inline clones are not needed. (cgraph_externally_visible_p): New predicate. (function_and_variable_visibility): Add whole_program parameter; always set externally_visible flag; handle COMDAT function privatization. (local_function_and_variable_visibility): New function. (gate_whole_program_function_and_variable_visibility): New function. (whole_program_function_and_variable_visibility): New function. (pass_ipa_whole_program_visibility): New function. * passes.c (init_optimization_passes): Add whole program visibility pass. (do_per_function_toporder, function_called_by_processed_nodes_p): Do not care about needed/reachable flags. * varpool.c: Include flags.h (decide_is_variable_needed): When doing LTO assume whole-program mode. (varpool_finalize_decl): When we are in LTO read-back, all variables are analyzed. (varpool_analyze_pending_decls): Skip analyzis of analyzed vars. * lto/lto.c (read_cgraph_and_symbols): Mark functions neccesary only at ltrans stage; explain why this is needed and should not. From-SVN: r152520
2009-10-07 11:01:16 +02:00
extern struct ipa_opt_pass_d pass_ipa_whole_program_visibility;
extern struct ipa_opt_pass_d pass_ipa_lto_gimple_out;
extern struct simple_ipa_opt_pass pass_ipa_increase_alignment;
extern struct simple_ipa_opt_pass pass_ipa_matrix_reorg;
alias.c (struct alias_set_entry_d): Rename from struct alias_set_entry. gcc/ChangeLog: * alias.c (struct alias_set_entry_d): Rename from struct alias_set_entry. Change all uses. * except.c (struct call_site_record_d): Rename from struct call_site_record. Change all uses. * except.h (struct eh_region_d): Rename from struct eh_region. Change all uses. * gcse.c (struct hash_table_d): Rename from struct hash_table. Change all uses. * graphite.c (struct ivtype_map_elt_d): Rename fromstruct ivtype_map_elt. Change all uses. (struct rename_map_elt_d): Rename fromstruct rename_map_elt. Change all uses. (struct ifsese_d): Rename fromstruct ifsese. Change all uses. * graphite.h (struct name_tree_d): Rename from struct name_tree. Change all uses. (struct sese_d): Rename from struct sese. Change all uses. * omega.h (struct eqn_d): Rename from struct eqn. Change all uses. (struct omega_pb_d): Rename from struct omega_pb. Change all uses. * optabs.h (struct optab_d): Rename from struct optab. Change all uses. (struct convert_optab_d): Rename from struct convert_optab. Change all uses. * tree-pass.h (struct ipa_opt_pass_d): Rename fromstruct ipa_opt_pass. Change all uses. * tree-predcom.c (struct dref_d): Rename from struct dref. Change all uses. * c-decl.c (pushtag): If -Wc++-compat, warn if the tag is already defined as a typedef. (grokdeclarator): If -Wc++-compat, warn if a typedef is already defined as a tag. gcc/cp/ChangeLog: * cp-tree.h (enum cp_lvalue_kind_flags): Rename from cp_lvalue_kind. Change all uses. (enum base_access_flags): Rename from enum base_access. Change all uses. * parser.c (enum cp_parser_flags): Remove enum tag. gcc/testsuite/ChangeLog: * gcc.dg/Wcxx-compat-10.c: New testcase. libcpp/ChangeLog: * include/cpplib.h (enum cpp_builtin_type): Rename from enum builtin_type. Change all uses. From-SVN: r147605
2009-05-16 08:54:11 +02:00
extern struct ipa_opt_pass_d pass_ipa_inline;
[multiple changes] 2009-09-01 Diego Novillo <dnovillo@google.com> * c-lang.c (lang_hooks): Remove const qualifier. java/ChangeLog * lang.c (lang_hooks): Remove const qualifier. objc/ChangeLog * objc-lang.c (lang_hooks): Remove const qualifier. objcp/ChangeLog * objcp-lang.c (lang_hooks): Remove const qualifier. ada/ChangeLog * gcc-interface/misc.c (lang_hooks): Remove const qualifier. fortran/ChangeLog * f95-lang.c (lang_hooks): Remove const qualifier. cp/ChangeLog * cp-lang.c (lang_hooks): Remove const qualifier. 2009-09-01 Diego Novillo <dnovillo@google.com> * cgraph.c (cgraph_node_for_decl): New. * cgraph.h (cgraph_node_for_decl): Declare. * tree.c (host_integerp): Return 0 if T is NULL. 2009-09-01 Diego Novillo <dnovillo@google.com> * tree.h (struct alias_pair): Move from varasm.c. (alias_pairs): Likewise. (TYPE_MAXVAL): Define. (TYPE_MINVAL): Define. (iterative_hash_host_wide_int): Declare. (remove_unreachable_alias_pairs): Declare. * tree-pass.h (pass_ipa_free_lang_data): Declare. * diagnostic.c (default_diagnostic_starter): Make extern. (default_diagnostic_finalizer): Make extern. * diagnostic.h (default_diagnostic_starter): Declare. (default_diagnostic_finalizer): Declare. (default_tree_printer): Declare. * toplev.c (default_tree_printer): Make extern. 2009-09-01 Richard Guenther <rguenther@suse.de> Diego Novillo <dnovillo@google.com> * cgraph.c (cgraph_add_new_function): Remove gimplification. * cgraphunit.c (cgraph_expand_function): Do not emit associated thunks from here. (cgraph_emit_thunks): New. (cgraph_optimize): Call it. Return if any IPA pass finds an error. * varasm.c (finish_aliases_1): Ignore errorneous aliases used by thunks. 2009-09-01 Simon Baldwin <simonb@google.com> Rafael Espindola <espindola@google.com> Richard Guenther <rguenther@suse.de> Doug Kwan <dougkwan@google.com> Diego Novillo <dnovillo@google.com> * tree.c: Include tree-pass.h, langhooks-def.h, diagnostic.h, cgraph.h, timevar.h, except.h and debug.h. (free_lang_data_in_type): New. (need_assembler_name_p): New. (free_lang_data_in_block): New. (free_lang_data_in_decl): New. (struct free_lang_data_d): New. (add_tree_to_fld_list): New. (find_decls_types_r): New. (get_eh_types_for_runtime): New. (find_decls_types_in_eh_region): New. (find_decls_types_in_node): New. (find_decls_types_in_var): New. (free_lang_data_in_cgraph): New. (free_lang_data): New. (gate_free_lang_data): New. (pass_ipa_free_lang_data): New. 2009-09-01 Diego Novillo <dnovillo@google.com> * timevar.def (TV_IPA_FREE_LANG_DATA): Define. * langhooks.h (struct lang_hooks): Add field free_lang_data. (lang_hooks): Remove const qualifier. * ipa.c (cgraph_remove_unreachable_nodes): Call remove_unreachable_alias_pairs. * except.c (add_type_for_runtime): Check if TYPE has already been converted. (lookup_type_for_runtime): Likewise. (check_handled): Handle converted types. * varasm.c (remove_unreachable_alias_pairs): New. * gimple.c: Include demangle.h. (gimple_decl_printable_name): New. (gimple_fold_obj_type_ref): New. * gimple.h (gimple_decl_printable_name): Declare. (gimple_fold_obj_type_ref): Declare. * passes.c (init_optimization_passes): Add pass pass_ipa_free_lang_data. * langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA. testsuite/ChangeLog 2009-09-01 Diego Novillo <dnovillo@google.com> * gcc.dg/gomp/combined-1.c: Adjust expected pattern. * g++.dg/tree-prof/inline_mismatch_args.C: Likewise. * g++.dg/warn/unit-1.C: Likewise. * g++.dg/ipa/iinline-1.C: Likewise. * g++.dg/template/cond2.C: Adjust expected line location for the error. * g++.dg/template/pr35240.C: Likewise. cp/ChangeLog 2009-09-01 Doug Kwan <dougkwan@google.com> * tree.c (cp_fix_function_decl_p): New. (cp_free_lang_data): New. 2009-09-01 Diego Novillo <dnovillo@google.com> * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H). * decl2.c: Include pointer-set.h. (collect_candidates_for_java_method_aliases): New. (cp_write_global_declarations): Call it. Add local variable CANDIDATES. If set, call build_java_method_aliases. (build_java_method_aliases): Add argument CANDIDATES. Use it to determine if FNDECL should get a hidden alias. * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define. * cp-tree.h (cp_free_lang_data): Declare. 2009-09-03 Richard Guenther <rguenther@suse.de> * method.c (use_thunk): Use cgraph_finalize_function to hand off thunks to the cgraph. * semantics.c (emit_associated_thunks): Do not emit thunks for really extern functions. From-SVN: r151360
2009-09-03 06:07:12 +02:00
extern struct simple_ipa_opt_pass pass_ipa_free_lang_data;
alias.c (struct alias_set_entry_d): Rename from struct alias_set_entry. gcc/ChangeLog: * alias.c (struct alias_set_entry_d): Rename from struct alias_set_entry. Change all uses. * except.c (struct call_site_record_d): Rename from struct call_site_record. Change all uses. * except.h (struct eh_region_d): Rename from struct eh_region. Change all uses. * gcse.c (struct hash_table_d): Rename from struct hash_table. Change all uses. * graphite.c (struct ivtype_map_elt_d): Rename fromstruct ivtype_map_elt. Change all uses. (struct rename_map_elt_d): Rename fromstruct rename_map_elt. Change all uses. (struct ifsese_d): Rename fromstruct ifsese. Change all uses. * graphite.h (struct name_tree_d): Rename from struct name_tree. Change all uses. (struct sese_d): Rename from struct sese. Change all uses. * omega.h (struct eqn_d): Rename from struct eqn. Change all uses. (struct omega_pb_d): Rename from struct omega_pb. Change all uses. * optabs.h (struct optab_d): Rename from struct optab. Change all uses. (struct convert_optab_d): Rename from struct convert_optab. Change all uses. * tree-pass.h (struct ipa_opt_pass_d): Rename fromstruct ipa_opt_pass. Change all uses. * tree-predcom.c (struct dref_d): Rename from struct dref. Change all uses. * c-decl.c (pushtag): If -Wc++-compat, warn if the tag is already defined as a typedef. (grokdeclarator): If -Wc++-compat, warn if a typedef is already defined as a tag. gcc/cp/ChangeLog: * cp-tree.h (enum cp_lvalue_kind_flags): Rename from cp_lvalue_kind. Change all uses. (enum base_access_flags): Rename from enum base_access. Change all uses. * parser.c (enum cp_parser_flags): Remove enum tag. gcc/testsuite/ChangeLog: * gcc.dg/Wcxx-compat-10.c: New testcase. libcpp/ChangeLog: * include/cpplib.h (enum cpp_builtin_type): Rename from enum builtin_type. Change all uses. From-SVN: r147605
2009-05-16 08:54:11 +02:00
extern struct ipa_opt_pass_d pass_ipa_cp;
extern struct ipa_opt_pass_d pass_ipa_reference;
extern struct ipa_opt_pass_d pass_ipa_pure_const;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct simple_ipa_opt_pass pass_ipa_type_escape;
extern struct simple_ipa_opt_pass pass_ipa_pta;
extern struct simple_ipa_opt_pass pass_ipa_struct_reorg;
extern struct ipa_opt_pass_d pass_ipa_lto_wpa_fixup;
extern struct ipa_opt_pass_d pass_ipa_lto_finish_out;
extern struct ipa_opt_pass_d pass_ipa_profile;
extern struct ipa_opt_pass_d pass_ipa_cdtor_merge;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct gimple_opt_pass pass_all_optimizations;
extern struct gimple_opt_pass pass_cleanup_cfg_post_optimizing;
extern struct gimple_opt_pass pass_init_datastructures;
extern struct gimple_opt_pass pass_fixup_cfg;
re PR testsuite/35843 (-fdump-rtl-expand does not exist anymore) PR testsuite/35843 * 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. From-SVN: r134682
2008-04-26 01:14:40 +02:00
extern struct rtl_opt_pass pass_expand;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct rtl_opt_pass pass_init_function;
extern struct rtl_opt_pass pass_jump;
extern struct rtl_opt_pass pass_rtl_eh;
extern struct rtl_opt_pass pass_initial_value_sets;
extern struct rtl_opt_pass pass_unshare_all_rtl;
extern struct rtl_opt_pass pass_instantiate_virtual_regs;
extern struct rtl_opt_pass pass_rtl_fwprop;
extern struct rtl_opt_pass pass_rtl_fwprop_addr;
extern struct rtl_opt_pass pass_jump2;
extern struct rtl_opt_pass pass_lower_subreg;
extern struct rtl_opt_pass pass_cse;
extern struct rtl_opt_pass pass_fast_rtl_dce;
extern struct rtl_opt_pass pass_ud_rtl_dce;
extern struct rtl_opt_pass pass_rtl_dce;
extern struct rtl_opt_pass pass_rtl_dse1;
extern struct rtl_opt_pass pass_rtl_dse2;
extern struct rtl_opt_pass pass_rtl_dse3;
dbgcnt.def (cprop1, [...]): Remove * dbgcnt.def (cprop1, cprop2, gcse, jump_bypass): Remove (cprop, hoist, pre, store_motion): New debug counters. * tree-pass.h (pass_tracer): Move to list of gimple passes, it is not an RTL pass anymore. (pass_profiling): Remove extern decl for pass removed in 2005. (pass_gcse, pass_jump_bypass): Remove. * final.c (rest_of_clean_state): Set flag_rerun_cse_after_global_opts to 0 for clean state. * toplev.h (flag_rerun_cse_after_global_opts): Add extern declaration. * cse.c (gate_handle_cse_after_global_opts, rest_of_handle_cse_after_global_opts): New functions. (pass_cse_after_global_opts): New pass, does local CSE. * timevar.def (TV_GCSE, TV_CPROP1, TV_CPROP2, TV_BYPASS): Remove. (TV_CPROP): New timevar. * gcse.c (flag_rerun_cse_after_global_opts): New global variable. (run_jump_opt_after_gcse, max_gcse_regno): Remove global vars. (gcse_main, recompute_all_luids): Remove. (compute_hash_table_work): Call max_reg_num instead of reading max_gcse_regno. (cprop_jump): Don't set run_jump_opt_after_gcse. (constprop_register): Always allow to alter jumps. (cprop_insn): Likewise. (do_local_cprop): Likewise. (local_cprop_pass): Likewise. Return non-zero if something changed. (cprop): Remove function, fold interesting bits into one_cprop_pass. (find_implicit_sets): Add note about missed optimization opportunity. (one_cprop_pass): Rewrite to be "the" CPROP pass, called from the pass_rtl_cprop execute function. Don't bother tracking the pass number, each pass gets its own dumpfile now anyway. Always allow to alter jumpsand bypass jumps. (bypass_block): Don't ignore regno >= max_gcse_regno, find_bypass_set will just find no suitable set. (pre_edge_insert): Fix dumping, this function is for PRE only. (one_pre_gcse_pass): Rewrite to be "the" PRE pass, called from the pass_rtl_pre execute function. (hoist_code): Return non-zero if something changed. Keep track of substitutions and insertions for statistics gathering similar to PRE. (one_code_hoisting_pass): Rewrite to be "the" code hoisting pass, called from the pass_rtl_hoist execute function. Show pass statistics. (compute_store_table): Use max_reg_num directly instead of using the formerly global max_gcse_regno. (build_store_vectors): Likewise. (replace_store_insn): Fix dumping. (store_motion): Rename to ... (one_store_motion_pass): ... this. Rewrite to be "the" STORE_MOTION pass, called from the pass_rtl_store_motion execute function. Keep track of substitutions and insertions for statistics gathering similar to PRE. (bypass_jumps): Remove, fold interesting bits into ... (one_cprop_pass): ... this. Rewrite to be "the" CPROP pass, called from the pass_rtl_cprop execute function. (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass): Remove. (gate_handle_gcse, rest_of_handle_gcse): Remove. (gate_rtl_cprop, execute_rtl_cprop, pass_rtl_cprop): New. (gate_rtl_pre, execute_rtl_pre, pass_rtl_pre): New. (gate_rtl_hoist, execute_rtl_hoist, pass_rtl_hoist): New. (gate_rtl_store_motion, execute_rtl_store_motion, pass_rtl_store_motion): New. * common.opt: Remove flag_cse_skip_blocks, adjust documentation to make it clear that -fcse-skip-blocks is a no-op for backward compat. * passes.c (init_optimization_passes): Remove pass_gcse and pass_jump_bypass. Schedule cprop, pre, hoist, cprop, store_motion, and cse_after_global_opts in place of pass_gcse. Schedule cprop instead of pass_jump_bypass. From-SVN: r146848
2009-04-27 19:21:27 +02:00
extern struct rtl_opt_pass pass_rtl_cprop;
extern struct rtl_opt_pass pass_rtl_pre;
extern struct rtl_opt_pass pass_rtl_hoist;
extern struct rtl_opt_pass pass_rtl_store_motion;
extern struct rtl_opt_pass pass_cse_after_global_opts;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct rtl_opt_pass pass_rtl_ifcvt;
extern struct rtl_opt_pass pass_into_cfg_layout_mode;
extern struct rtl_opt_pass pass_outof_cfg_layout_mode;
extern struct rtl_opt_pass pass_loop2;
extern struct rtl_opt_pass pass_rtl_loop_init;
extern struct rtl_opt_pass pass_rtl_move_loop_invariants;
extern struct rtl_opt_pass pass_rtl_unswitch;
extern struct rtl_opt_pass pass_rtl_unroll_and_peel_loops;
extern struct rtl_opt_pass pass_rtl_doloop;
extern struct rtl_opt_pass pass_rtl_loop_done;
extern struct rtl_opt_pass pass_web;
extern struct rtl_opt_pass pass_cse2;
extern struct rtl_opt_pass pass_df_initialize_opt;
extern struct rtl_opt_pass pass_df_initialize_no_opt;
tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. 2008-01-29 Vladimir Makarov <vmakarov@redhat.com> * doc/tm.texi (TARGET_IRA_COVER_CLASSES): Modify description. * doc/passes.texi: Remove entries about regclass, local-alloc, and global. Modify entries about regmove and IRA. * ra-conflict.c: Remove the file. * reload.c (push_reload, find_dummy_reload): Remove flag_ira. * tree-pass.h (pass_local_alloc, pass_global_alloc): Remove. (pass_regclass_init): Rename to pass_reginfo_init. * cfgloopanal.c (estimate_reg_pressure_cost): Remove flag_ira. * toplev.h (flag_ira): Remove. * caller-save.c (setup_save_areas): Remove flag_ira. * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot): Ditto. * global.c: Remove the file. * opts.c: (decode_options): Remove flag_ira. * hard-reg-set.h (losing_caller_save_reg_set): Remove. * regmove.c: Modify file description. (find_use_as_address, try_auto_increment): Define them only if AUTO_INC_DEC is defined. (replacement_quality, replace_in_call_usage, fixup_match_1, stable_and_no_regs_but_for_p): Remove. (reg_set_in_bb): Make it static. (regmove_optimize): Remove flag_ira and code which worked for !flag_ira. * local-alloc.c: Remove the file. * common.opt (fira): Remove. * ira.c: Include except.h. (eliminable_regset): Move from global.c. (mark_elimination): Ditto. Remove flag_ira. (reg_renumber, struct equivalence, reg_equiv, equiv_mem, equiv_mem_modified, validate_equiv_mem_from_store, validate_equiv_mem, equiv_init_varies_p, equiv_init_movable_p, contains_replace_regs, memref_referenced_p, memref_used_between_p, no_equiv, recorded_label_ref): Move from local-alloc.c. (update_equiv_regs): Ditto. Make it static. (print_insn_chain, print_insn_chains): Move it from global.c. pseudo_for_reload_consideration_p): Ditto. Remove flag_ira. (build_insn_chain): Ditto. Make it static. (ra_init_live_subregs): Move from ra-conflict.c. Make it static. Rename to init_live_subregs. (gate_ira): Remove flag_ira. * regclass.c: Rename reginfo.c. Change file description. (FORBIDDEN_INC_DEC_CLASSES): Remove. (reg_class_superclasses, forbidden_inc_dec_class, in_inc_dec): Remove. (init_reg_sets_1): Remove code for evaluation of reg_class_superclasses and losing_caller_save_reg_set. (init_regs): Remove init_reg_autoinc. (struct costs, costs, init_cost, ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): Remove. (regclass_init): Rename to reginfo_init. Don't initialize init_cost. (pass_regclass_init): Rename to pass_reginfo_init. Modify corresponding entries. (dump_regclass, record_operand_costs, scan_one_insn, init_reg_autoinc, regclass, record_reg_classes, copy_cost, record_address_regs, auto_inc_dec_reg_p): Remove. (gt-regclass.h): Rename to gt-reginfo.h. * rtl.h (dump_global_regs, retry_global_alloc, build_insn_chain, dump_local_alloc, update_equiv_regs): Remove. * Makefile.in (RA_H): Remove. (OBJS-common): Remove global.o, local-alloc.o, and ra-conflict.o. Rename regclass.o to reginfo.o. (regclass.o): Rename to reginfo.o. Rename gt-regclass.h to gt-reginfo.h. (global.o, local-alloc.o, ra-conflict.o): Remove entries. (GTFILES): Rename regclass.c to reginfo.c. * passes.c (init_optimization_passes): Remove pass_local_alloc and pass_global_alloc. Rename pass_regclass_init to pass_reginfo_init. * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, delete_output_reload): Remove flag_ira. (finish_spills): Ditto. Remove code for !flga_ira. From-SVN: r143757
2009-01-29 15:51:46 +01:00
extern struct rtl_opt_pass pass_reginfo_init;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct rtl_opt_pass pass_inc_dec;
extern struct rtl_opt_pass pass_stack_ptr_mod;
extern struct rtl_opt_pass pass_initialize_regs;
extern struct rtl_opt_pass pass_combine;
extern struct rtl_opt_pass pass_if_after_combine;
extern struct rtl_opt_pass pass_implicit_zee;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct rtl_opt_pass pass_partition_blocks;
extern struct rtl_opt_pass pass_match_asm_constraints;
extern struct rtl_opt_pass pass_regmove;
extern struct rtl_opt_pass pass_split_all_insns;
dbgcnt.def (ra_byte_scan): Added. 2008-04-24 Richard Sandiford <rsandifo@nildram.co.uk> 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. Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com> From-SVN: r134523
2008-04-21 20:55:13 +02:00
extern struct rtl_opt_pass pass_fast_rtl_byte_dce;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct rtl_opt_pass pass_lower_subreg2;
extern struct rtl_opt_pass pass_mode_switching;
extern struct rtl_opt_pass pass_sms;
extern struct rtl_opt_pass pass_sched;
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
extern struct rtl_opt_pass pass_ira;
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern struct rtl_opt_pass pass_postreload;
extern struct rtl_opt_pass pass_clean_state;
extern struct rtl_opt_pass pass_branch_prob;
extern struct rtl_opt_pass pass_value_profile_transformations;
extern struct rtl_opt_pass pass_postreload_cse;
extern struct rtl_opt_pass pass_gcse2;
extern struct rtl_opt_pass pass_split_after_reload;
extern struct rtl_opt_pass pass_branch_target_load_optimize1;
extern struct rtl_opt_pass pass_thread_prologue_and_epilogue;
extern struct rtl_opt_pass pass_stack_adjustments;
extern struct rtl_opt_pass pass_peephole2;
extern struct rtl_opt_pass pass_if_after_reload;
extern struct rtl_opt_pass pass_regrename;
extern struct rtl_opt_pass pass_cprop_hardreg;
extern struct rtl_opt_pass pass_reorder_blocks;
extern struct rtl_opt_pass pass_branch_target_load_optimize2;
extern struct rtl_opt_pass pass_leaf_regs;
extern struct rtl_opt_pass pass_split_before_sched2;
extern struct rtl_opt_pass pass_sched2;
extern struct rtl_opt_pass pass_stack_regs;
extern struct rtl_opt_pass pass_stack_regs_run;
extern struct rtl_opt_pass pass_df_finish;
extern struct rtl_opt_pass pass_compute_alignments;
extern struct rtl_opt_pass pass_duplicate_computed_gotos;
extern struct rtl_opt_pass pass_variable_tracking;
extern struct rtl_opt_pass pass_free_cfg;
extern struct rtl_opt_pass pass_machine_reorg;
extern struct rtl_opt_pass pass_cleanup_barriers;
extern struct rtl_opt_pass pass_delay_slots;
extern struct rtl_opt_pass pass_split_for_shorten_branches;
extern struct rtl_opt_pass pass_split_before_regstack;
extern struct rtl_opt_pass pass_convert_to_eh_region_ranges;
extern struct rtl_opt_pass pass_shorten_branches;
extern struct rtl_opt_pass pass_set_nothrow_function_flags;
extern struct rtl_opt_pass pass_final;
extern struct rtl_opt_pass pass_rtl_seqabstr;
extern struct gimple_opt_pass pass_release_ssa_names;
extern struct gimple_opt_pass pass_early_inline;
extern struct gimple_opt_pass pass_inline_parameters;
extern struct gimple_opt_pass pass_all_early_optimizations;
extern struct gimple_opt_pass pass_update_address_taken;
extern struct gimple_opt_pass pass_convert_switch;
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
/* The root of the compilation pass tree, once constructed. */
extern struct opt_pass *all_passes, *all_small_ipa_passes, *all_lowering_passes,
*all_regular_ipa_passes, *all_lto_gen_passes;
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
/* Define a list of pass lists so that both passes.c and plugins can easily
find all the pass lists. */
#define GCC_PASS_LISTS \
DEF_PASS_LIST (all_lowering_passes) \
DEF_PASS_LIST (all_small_ipa_passes) \
DEF_PASS_LIST (all_regular_ipa_passes) \
DEF_PASS_LIST (all_lto_gen_passes) \
DEF_PASS_LIST (all_passes)
#define DEF_PASS_LIST(LIST) PASS_LIST_NO_##LIST,
enum
{
GCC_PASS_LISTS
PASS_LIST_NUM
};
#undef DEF_PASS_LIST
/* This is used by plugins, and should also be used in
passes.c:register_pass. */
extern struct opt_pass **gcc_pass_lists[];
/* Current optimization pass. */
extern struct opt_pass *current_pass;
extern struct opt_pass * get_pass_for_id (int);
cgraphunit.c (plugin.h): Include. 2009-12-01 Grigori Fursin <grigori.fursin@inria.fr> Joern Rennecke <amylaar@spamcop.net> * cgraphunit.c (plugin.h): Include. (ipa_passes): Invoke PLUGIN_ALL_IPA_PASSES_START / PLUGIN_ALL_IPA_PASSES_END at start / end of processing. * gcc-plugin.h (highlev-plugin-common.h, hashtab.h): Include. (enum plugin_event): Define by including plugin.def. Last enumerator is now called PLUGIN_EVENT_FIRST_DYNAMIC. (plugin_event_name): Change type to const char **. (get_event_last, get_named_event_id, unregister_callback): Declare. (register_callback): Change type of event argument to int. (highlev-plugin-common.h): New file. * Makefile.in (GCC_PLUGIN_H): Add highlev-plugin-common.h and $(HASHTAB_H) (tree-optimize.o passes.o): Depend on $(PLUGIN_H). (PLUGIN_HEADERS): Add opts.h, $(PARAMS_H) and plugin.def. (s-header-vars): New rule. (install-plugin): Depend on s-header-vars. Install b-header-vars. * params.c (get_num_compiler_params): New function. * params.h (get_num_compiler_params): Declare. * passes.c (plugin.h): Include. (make_pass_instance): Invoke PLUGIN_NEW_PASS. (do_per_function_toporder, pass_init_dump_file): No longer static. (pass_fini_dump_file): Likewise. (execute_one_pass): Likewise. Invoke PLUGIN_OVERRIDE_GATE and PLUGIN_PASS_EXECUTION. (execute_ipa_pass_list): Invoke PLUGIN_EARLY_GIMPLE_PASSES_START and PLUGIN_EARLY_GIMPLE_PASSES_END. * plugin.c (plugin_event_name_init): New array, defined by including plugin.def. (FMT_FOR_PLUGIN_EVENT): Update. (plugin_event_name): Change type to const char ** and initialize to plugin_event_name_init. (event_tab, event_last, event_horizon): New variable. (get_event_last): New function. (plugin_callbacks_init): New array. (plugin_callbacks: Change type to struct callback_info **. Initialize to plugin_callbacks_init. (htab_event_eq, get_named_event_id, unregister_callback): New function. (invoke_plugin_va_callbacks): Likewise. (register_callback): Change type of event argument to int. Handle new events. Allow dynamic events. (invoke_plugin_callbacks): Likewise. Return success status. (plugins_active_p): Allow dynamic callbacks. * plugin.def: New file. * plugin.h (invoke_plugin_callbacks): Update prototype. (invoke_plugin_va_callbacks): Declare. * tree-optimize.c (plugin.h): Include. (tree_rest_of_compilation): Invoke PLUGIN_ALL_PASSES_START and PLUGIN_ALL_PASSES_END. * tree-pass.h (execute_one_pass, pass_init_dump_file): Declare. (pass_fini_dump_file, do_per_function_toporder): Likewise. * doc/plugin.texi: Document new event types. Co-Authored-By: Joern Rennecke <amylaar@spamcop.net> From-SVN: r154877
2009-12-01 20:12:29 +01:00
extern bool execute_one_pass (struct opt_pass *);
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * 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. From-SVN: r133342
2008-03-19 12:22:40 +01:00
extern void execute_pass_list (struct opt_pass *);
extern void execute_ipa_pass_list (struct opt_pass *);
extern void execute_ipa_summary_passes (struct ipa_opt_pass_d *);
extern void execute_all_ipa_transforms (void);
extern void execute_all_ipa_stmt_fixups (struct cgraph_node *, gimple *);
cgraphunit.c (plugin.h): Include. 2009-12-01 Grigori Fursin <grigori.fursin@inria.fr> Joern Rennecke <amylaar@spamcop.net> * cgraphunit.c (plugin.h): Include. (ipa_passes): Invoke PLUGIN_ALL_IPA_PASSES_START / PLUGIN_ALL_IPA_PASSES_END at start / end of processing. * gcc-plugin.h (highlev-plugin-common.h, hashtab.h): Include. (enum plugin_event): Define by including plugin.def. Last enumerator is now called PLUGIN_EVENT_FIRST_DYNAMIC. (plugin_event_name): Change type to const char **. (get_event_last, get_named_event_id, unregister_callback): Declare. (register_callback): Change type of event argument to int. (highlev-plugin-common.h): New file. * Makefile.in (GCC_PLUGIN_H): Add highlev-plugin-common.h and $(HASHTAB_H) (tree-optimize.o passes.o): Depend on $(PLUGIN_H). (PLUGIN_HEADERS): Add opts.h, $(PARAMS_H) and plugin.def. (s-header-vars): New rule. (install-plugin): Depend on s-header-vars. Install b-header-vars. * params.c (get_num_compiler_params): New function. * params.h (get_num_compiler_params): Declare. * passes.c (plugin.h): Include. (make_pass_instance): Invoke PLUGIN_NEW_PASS. (do_per_function_toporder, pass_init_dump_file): No longer static. (pass_fini_dump_file): Likewise. (execute_one_pass): Likewise. Invoke PLUGIN_OVERRIDE_GATE and PLUGIN_PASS_EXECUTION. (execute_ipa_pass_list): Invoke PLUGIN_EARLY_GIMPLE_PASSES_START and PLUGIN_EARLY_GIMPLE_PASSES_END. * plugin.c (plugin_event_name_init): New array, defined by including plugin.def. (FMT_FOR_PLUGIN_EVENT): Update. (plugin_event_name): Change type to const char ** and initialize to plugin_event_name_init. (event_tab, event_last, event_horizon): New variable. (get_event_last): New function. (plugin_callbacks_init): New array. (plugin_callbacks: Change type to struct callback_info **. Initialize to plugin_callbacks_init. (htab_event_eq, get_named_event_id, unregister_callback): New function. (invoke_plugin_va_callbacks): Likewise. (register_callback): Change type of event argument to int. Handle new events. Allow dynamic events. (invoke_plugin_callbacks): Likewise. Return success status. (plugins_active_p): Allow dynamic callbacks. * plugin.def: New file. * plugin.h (invoke_plugin_callbacks): Update prototype. (invoke_plugin_va_callbacks): Declare. * tree-optimize.c (plugin.h): Include. (tree_rest_of_compilation): Invoke PLUGIN_ALL_PASSES_START and PLUGIN_ALL_PASSES_END. * tree-pass.h (execute_one_pass, pass_init_dump_file): Declare. (pass_fini_dump_file, do_per_function_toporder): Likewise. * doc/plugin.texi: Document new event types. Co-Authored-By: Joern Rennecke <amylaar@spamcop.net> From-SVN: r154877
2009-12-01 20:12:29 +01:00
extern bool pass_init_dump_file (struct opt_pass *);
extern void pass_fini_dump_file (struct opt_pass *);
cgraphunit.c (plugin.h): Include. 2009-12-01 Grigori Fursin <grigori.fursin@inria.fr> Joern Rennecke <amylaar@spamcop.net> * cgraphunit.c (plugin.h): Include. (ipa_passes): Invoke PLUGIN_ALL_IPA_PASSES_START / PLUGIN_ALL_IPA_PASSES_END at start / end of processing. * gcc-plugin.h (highlev-plugin-common.h, hashtab.h): Include. (enum plugin_event): Define by including plugin.def. Last enumerator is now called PLUGIN_EVENT_FIRST_DYNAMIC. (plugin_event_name): Change type to const char **. (get_event_last, get_named_event_id, unregister_callback): Declare. (register_callback): Change type of event argument to int. (highlev-plugin-common.h): New file. * Makefile.in (GCC_PLUGIN_H): Add highlev-plugin-common.h and $(HASHTAB_H) (tree-optimize.o passes.o): Depend on $(PLUGIN_H). (PLUGIN_HEADERS): Add opts.h, $(PARAMS_H) and plugin.def. (s-header-vars): New rule. (install-plugin): Depend on s-header-vars. Install b-header-vars. * params.c (get_num_compiler_params): New function. * params.h (get_num_compiler_params): Declare. * passes.c (plugin.h): Include. (make_pass_instance): Invoke PLUGIN_NEW_PASS. (do_per_function_toporder, pass_init_dump_file): No longer static. (pass_fini_dump_file): Likewise. (execute_one_pass): Likewise. Invoke PLUGIN_OVERRIDE_GATE and PLUGIN_PASS_EXECUTION. (execute_ipa_pass_list): Invoke PLUGIN_EARLY_GIMPLE_PASSES_START and PLUGIN_EARLY_GIMPLE_PASSES_END. * plugin.c (plugin_event_name_init): New array, defined by including plugin.def. (FMT_FOR_PLUGIN_EVENT): Update. (plugin_event_name): Change type to const char ** and initialize to plugin_event_name_init. (event_tab, event_last, event_horizon): New variable. (get_event_last): New function. (plugin_callbacks_init): New array. (plugin_callbacks: Change type to struct callback_info **. Initialize to plugin_callbacks_init. (htab_event_eq, get_named_event_id, unregister_callback): New function. (invoke_plugin_va_callbacks): Likewise. (register_callback): Change type of event argument to int. Handle new events. Allow dynamic events. (invoke_plugin_callbacks): Likewise. Return success status. (plugins_active_p): Allow dynamic callbacks. * plugin.def: New file. * plugin.h (invoke_plugin_callbacks): Update prototype. (invoke_plugin_va_callbacks): Declare. * tree-optimize.c (plugin.h): Include. (tree_rest_of_compilation): Invoke PLUGIN_ALL_PASSES_START and PLUGIN_ALL_PASSES_END. * tree-pass.h (execute_one_pass, pass_init_dump_file): Declare. (pass_fini_dump_file, do_per_function_toporder): Likewise. * doc/plugin.texi: Document new event types. Co-Authored-By: Joern Rennecke <amylaar@spamcop.net> From-SVN: r154877
2009-12-01 20:12:29 +01:00
extern const char *get_current_pass_name (void);
extern void print_current_pass (FILE *);
extern void debug_pass (void);
extern void ipa_write_summaries (void);
* lto-symtab.c (lto_symtab_entry_def) Add vnode. (lto_varpool_replace_node): New. (lto_symtab_resolve_symbols): Resolve varpool nodes. (lto_symtab_merge_decls_1): Prefer decls with varpool node. (lto_symtab_merge_cgraph_nodes_1): Merge varpools. * cgraph.h (varpool_node_ptr): New type. (varpool_node_ptr): New vector. (varpool_node_set_def): New structure. (varpool_node_set): New type. (varpool_node_set): New vector. (varpool_node_set_element_def): New structure. (varpool_node_set_element, const_varpool_node_set_element): New types. (varpool_node_set_iterator): New type. (varpool_node): Add prev pointers, add used_from_other_partition, in_other_partition. (varpool_node_set_new, varpool_node_set_find, varpool_node_set_add, varpool_node_set_remove, dump_varpool_node_set, debug_varpool_node_set, varpool_get_node, varpool_remove_node): Declare. (vsi_end_p, vsi_next, vsi_node, vsi_start, varpool_node_in_set_p, varpool_node_set_size): New inlines. * cgraph.c (dump_cgraph_node): Dump asm names of aliases. * tree-pass.h (varpool_node_set_def): Forward declare. (ipa_opt_pass_d): Summary writting takes vnode sets too. (ipa_write_optimization_summaries): Update prototype. * ipa-cp.c (ipcp_write_summary): Update. * ipa-reference.c (ipa_reference_write_summary): Update. * lto-cgraph.c (lto_output_varpool_node): New static function. (output_varpool): New function. (input_varpool_node): New static function. (input_varpool_1): New function. (input_cgraph): Input varpool. * ipa-pure-const.c (pure_const_write_summary): Update. * lto-streamer-out.c (lto_output): Update, output varpool too. (write_global_stream): Kill WPA hack. (produce_asm_for_decls): Update. (output_alias_pair_p): Handle variables. (output_unreferenced_globals): Output only needed partition of varpool. * ipa-inline.c (inline_write_summary): Update. * lto-streamer-in.c (lto_input_tree_ref, lto_input_tree): Do not build cgraph. * lto-section-in.c (lto_section_name): Add varpool and jump funcs. * ipa.c (hash_varpool_node_set_element, eq_varpool_node_set_element, varpool_node_set_new, varpool_node_set_add, varpool_node_set_remove, varpool_node_set_find, dump_varpool_node_set, debug_varpool_node_set): New functions. * passes.c (rest_of_decl_compilation): when in LTO do not finalize. (execute_one_pass): Process new decls too. (ipa_write_summaries_2): Pass around vsets. (ipa_write_summaries_1): Likewise. (ipa_write_summaries): Build vset; be more selective about cgraph nodes to add. (ipa_write_optimization_summaries_1): Pass around vsets. (ipa_write_optimization_summaries): Likewise. * varpool.c (varpool_get_node): New. (varpool_node): Update doubly linked lists. (varpool_remove_node): New. (dump_varpool_node): More dumping. (varpool_enqueue_needed_node): Update doubly linked lists. (decide_is_variable_needed): Kill ltrans hack. (varpool_finalize_decl): Kill lto hack. (varpool_assemble_decl): Skip decls in other partitions. (varpool_assemble_pending_decls): Update doubly linkes lists. (varpool_empty_needed_queue): Likewise. (varpool_extra_name_alias): Likewise. * lto-streamer.c (lto_get_section_name): Add vars section. * lto-streamer.h (lto_section_type): Update. (output_varpool, input_varpool): Declare. * lto.c (lto_varpool_node_sets): New. (lto_1_to_1_map): Partition varpool too. (globalize_context_t, globalize_cross_file_statics, lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node, lto_scan_statics_in_remaining_global_vars): Remove. (lto_promote_cross_file_statics): Rewrite. (get_filename_for_set): Take vset argument. (lto_wpa_write_files): Pass around vsets. From-SVN: r158854
2010-04-29 09:10:38 +02:00
extern void ipa_write_optimization_summaries (struct cgraph_node_set_def *,
struct varpool_node_set_def *);
extern void ipa_read_summaries (void);
extern void ipa_read_optimization_summaries (void);
[multiple changes] 2009-04-14 Diego Novillo <dnovillo@google.com> Le-Chun Wu <lcwu@google.com> * configure.ac: Add --enable-plugin support. Define ENABLE_PLUGIN and PLUGINLIBS when specified. * Makefile.in (PLUGIN_H): Define. Export ENABLE_PLUGIN and GMPINC to site.exp. Add PLUGINLIBS to link command. Add/modify dependencies for plugin.o and files including plugin.h. (plugin.o): New. * config.in: Regenerate. * opts.c (common_handle_option): Handle OPT_fplugin_ and OPT_fplugin_arg_. 2009-04-14 Le-Chun Wu <lcwu@google.com> * tree-pass.h (register_one_dump_file): Add a prototype for register_one_dump_file. * toplev.c (compile_file): Call initialize_plugins. (do_compile): Call invoke_plugin_callbacks. (toplev_main): Call invoke_plugin_callbacks. * common.opt: Add -fplugin= and -fplugin-arg-. * gcc-plugin.h: New public header file for plugins to include. * plugin.c: New source file. * plugin.h: New internal header file. * passes.c (register_one_dump_file): Make it external. * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks. 2009-04-14 Diego Novillo <dnovillo@google.com> * doc/plugins.texi: New. * doc/gccint.texi: Add reference to Plugins chapter. * doc/invoke.texi: Document -fplugin and -fplugin-arg * diagnostic.c (diagnostic_report_diagnostic): Warn about loaded plugins, if any. * timevar.def (TV_PLUGIN_INIT): Define. (TV_PLUGIN_RUN): Define. * plugin.c: Include timevar.h (plugins_active_p): New. (dump_active_plugins): New. (debug_active_plugins): New. cp/ChangeLog 2009-04-14 Le-Chun Wu <lcwu@google.com> * Make-lang.in: Modify dependencies of files including plugin.h. * decl.c (finish_function): Call invoke_plugin_callbacks. * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks. From-SVN: r146059
2009-04-14 22:18:49 +02:00
extern void register_one_dump_file (struct opt_pass *);
attr-noinline.c: Avoid pure-const optimization. * gcc.dg/attr-noinline.c: Avoid pure-const optimization. * gcc.dg/pr33826.c: Update dump files. * gcc.dg/ipa/ipa-3.c: Avoid pure-const optimization. * gcc.dg/ipa/ipa-5.c: Avoid pure-const optimization. Merge from pretty-ipa: 2009-03-27 Jan Hubicka <jh@suse.cz> * cgraph.c (dump_cgraph_node): Add replace output flag by process. * tree-pass.h (function_called_by_processed_nodes_p): Declare. * passes.c (function_called_by_processed_nodes_p): New. * ipa-pure-const.c (check_call): Fix handling of operands. (analyze_function): Dump debug output for skipped bodies. (local_pure_const): Use function_called_by_processed_nodes_p. * dwarf2out.c (reference_to_unused): Use output. * passes.c (do_per_function_toporder): Likewise. 2008-11-12 Jan Hubicka <jh@suse.cz> * tree-pass.h (pass_fixup_cfg, pass_local_pure_const): Declare. * ipa-pure-const.c (funct_state_d): Add can throw field; make state_set_in_source enum (check_decl): Ignore memory tags; do not set fake looping flags; dump diagnostics. (check_operand, check_tree, check_rhs_var, check_lhs_var, get_asm_expr_operands, scan_function_op, scan_function_stmt): Remove. (check_call, analyze_function): Rewrite. (check_stmt): New. (add_new_function): Update call of analyze_function. (generate_summary): Add call of analyze_function. (propagate): Propagate can_throw; handle state_set_in_source correctly. (local_pure_const): New function. (pass_local_pure_const): New pass. * ipa-inline.c (inline_transform): Set after_inlining. * tree-eh.c (stmt_can_throw_external): New. * tree-optimize.c (execute_fixup_cfg): Do not set after_inlining; work with aliasing built. * tree-flow.h (stmt_can_throw_external): New. * passes.c (init_optimization_passes): Schedule fixup_cfg pass early; and local pure/const pass in early and late optimization queue. From-SVN: r145204
2009-03-28 20:29:35 +01:00
extern bool function_called_by_processed_nodes_p (void);
extern void register_pass (struct register_pass_info *);
tree-vrp.c (finalize_jump_threads): Do not care about dominance info. * tree-vrp.c (finalize_jump_threads): Do not care about dominance info. (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. From-SVN: r124786
2007-05-17 10:10:24 +02:00
/* Set to true if the pass is called the first time during compilation of the
current function. Note that using this information in the optimization
passes is considered not to be clean, and it should be avoided if possible.
This flag is currently used to prevent loops from being peeled repeatedly
in jump threading; it will be removed once we preserve loop structures
throughout the compilation -- we will be able to mark the affected loops
directly in jump threading, and avoid peeling them next time. */
extern bool first_pass_instance;
cgraphunit.c (plugin.h): Include. 2009-12-01 Grigori Fursin <grigori.fursin@inria.fr> Joern Rennecke <amylaar@spamcop.net> * cgraphunit.c (plugin.h): Include. (ipa_passes): Invoke PLUGIN_ALL_IPA_PASSES_START / PLUGIN_ALL_IPA_PASSES_END at start / end of processing. * gcc-plugin.h (highlev-plugin-common.h, hashtab.h): Include. (enum plugin_event): Define by including plugin.def. Last enumerator is now called PLUGIN_EVENT_FIRST_DYNAMIC. (plugin_event_name): Change type to const char **. (get_event_last, get_named_event_id, unregister_callback): Declare. (register_callback): Change type of event argument to int. (highlev-plugin-common.h): New file. * Makefile.in (GCC_PLUGIN_H): Add highlev-plugin-common.h and $(HASHTAB_H) (tree-optimize.o passes.o): Depend on $(PLUGIN_H). (PLUGIN_HEADERS): Add opts.h, $(PARAMS_H) and plugin.def. (s-header-vars): New rule. (install-plugin): Depend on s-header-vars. Install b-header-vars. * params.c (get_num_compiler_params): New function. * params.h (get_num_compiler_params): Declare. * passes.c (plugin.h): Include. (make_pass_instance): Invoke PLUGIN_NEW_PASS. (do_per_function_toporder, pass_init_dump_file): No longer static. (pass_fini_dump_file): Likewise. (execute_one_pass): Likewise. Invoke PLUGIN_OVERRIDE_GATE and PLUGIN_PASS_EXECUTION. (execute_ipa_pass_list): Invoke PLUGIN_EARLY_GIMPLE_PASSES_START and PLUGIN_EARLY_GIMPLE_PASSES_END. * plugin.c (plugin_event_name_init): New array, defined by including plugin.def. (FMT_FOR_PLUGIN_EVENT): Update. (plugin_event_name): Change type to const char ** and initialize to plugin_event_name_init. (event_tab, event_last, event_horizon): New variable. (get_event_last): New function. (plugin_callbacks_init): New array. (plugin_callbacks: Change type to struct callback_info **. Initialize to plugin_callbacks_init. (htab_event_eq, get_named_event_id, unregister_callback): New function. (invoke_plugin_va_callbacks): Likewise. (register_callback): Change type of event argument to int. Handle new events. Allow dynamic events. (invoke_plugin_callbacks): Likewise. Return success status. (plugins_active_p): Allow dynamic callbacks. * plugin.def: New file. * plugin.h (invoke_plugin_callbacks): Update prototype. (invoke_plugin_va_callbacks): Declare. * tree-optimize.c (plugin.h): Include. (tree_rest_of_compilation): Invoke PLUGIN_ALL_PASSES_START and PLUGIN_ALL_PASSES_END. * tree-pass.h (execute_one_pass, pass_init_dump_file): Declare. (pass_fini_dump_file, do_per_function_toporder): Likewise. * doc/plugin.texi: Document new event types. Co-Authored-By: Joern Rennecke <amylaar@spamcop.net> From-SVN: r154877
2009-12-01 20:12:29 +01:00
/* Declare for plugins. */
extern void do_per_function_toporder (void (*) (void *), void *);
#endif /* GCC_TREE_PASS_H */