Commit Graph

492 Commits

Author SHA1 Message Date
Maxim Kuvyrkov e2f6ff946a sched-int.h (struct _dep): Rename field 'kind' to 'type'.
* sched-int.h (struct _dep): Rename field 'kind' to 'type'.
	(DEP_KIND): Rename to DEP_TYPE.  Update all uses.
	(dep_def): New typedef.
	(init_dep_1, sd_debug_dep): Declare functions.
	(DEP_LINK_KIND): Rename to DEP_LINK_TYPE.
	(debug_dep_links): Remove.
	(struct _deps_list): New field 'n_links'.
	(DEPS_LIST_N_LINKS): New macro.
	(FOR_EACH_DEP_LINK): Remove.
	(create_deps_list, free_deps_list, delete_deps_list): Remove
	declaration.
	(deps_list_empty_p, debug_deps_list, add_back_dep_to_deps_list): Ditto.
	(find_link_by_pro_in_deps_list, find_link_by_con_in_deps_list): Ditto.
	(copy_deps_list_change_con, move_dep_link): Ditto.
	(struct haifa_insn_data): Split field 'back_deps' into 'hard_back_deps'
	and 'spec_back_deps'.  New field 'resolved_forw_deps'.  Remove field
	'dep_count'.
	(INSN_BACK_DEPS): Remove.
	(INSN_HARD_BACK_DEPS, INSN_SPEC_BACK_DEPS, INSN_RESOLVED_FORW_DEPS):
	New macros.
	(INSN_DEP_COUNT): Remove.
	(enum DEPS_ADJUST_RESULT): Add new constant DEP_NODEP.  Fix comments.
	(spec_info, haifa_recovery_block_was_added_during_scheduling_p):
	Declare global variables.
	(deps_pools_are_empty_p, sched_free_deps): Declare functions.
	(add_forw_dep, compute_forward_dependences): Remove declarations.
	(add_or_update_back_dep, add_or_update_back_forw_dep): Ditto.
	(add_back_forw_dep, delete_back_forw_dep): Ditto.
	(debug_ds, sched_insn_is_legitimate_for_speculation_p): Declare
	functions.
	(SD_LIST_NONE, SD_LIST_HARD_BACK, SD_LIST_SPEC_BACK, SD_LIST_FORW): New
	constants.
	(SD_LIST_RES_BACK, SD_LIST_RES_FORW, SD_LIST_BACK): Ditto.
	(sd_list_types_def): New typedef.
	(sd_next_list): Declare function.
	(struct _sd_iterator): New type.
	(sd_iterator_def): New typedef.
	(sd_iterator_start, sd_iterator_cond, sd_iterator_next): New inline
	functions.
	(FOR_EACH_DEP): New cycle wrapper.
	(sd_lists_size, sd_lists_empty_p, sd_init_insn, sd_finish_insn):
	Declare functions.
	(sd_find_dep_between, sd_add_dep, sd_add_or_update_dep): Ditto.
	(sd_resolve_dep, sd_copy_back_deps, sd_delete_dep, sd_debug_lists):
	Ditto.

	* sched-deps.c (init_dep_1): Make global.
	(DUMP_DEP_PRO, DUMP_DEP_CON, DUMP_DEP_STATUS, DUMP_DEP_ALL): New
	constants.
	(dump_dep): New static function.
	(dump_dep_flags): New static variable.
	(sd_debug_dep): New function.
	(add_to_deps_list, remove_from_deps_list): Update 'n_links' field of
	the list.
	(move_dep_link): Use remove_from_deps_list (), instead of
	detach_dep_link ().
	(dep_links_consistent_p, dump_dep_links, debug_dep_links): Remove.
	(dep_link_is_detached_p): New static function.
	(deps_obstack, dl_obstack, dn_obstack): Remove.  Use dn_pool, dl_pool
	instead.
	(dn_pool, dl_pool): New alloc_pools.
	(dn_pool_diff, dl_pool_diff): New static variables.
	(create_dep_node, delete_dep_node): New static function.
	(create_deps_list): Make it static.  Use alloc_pool 'dl_pool'.
	(deps_list_empty_p): Make it static.  Use 'n_links' field.
	(deps_pools_are_empty_p): New static function.
	(alloc_deps_list, delete_deps_list): Remove.
	(dump_deps_list, debug_deps_list, add_back_dep_to_deps_list): Remove.
	(find_link_by_pro_in_deps_list, find_link_by_con_in_deps_list): Ditto.
	(copy_deps_list_change_con): Remove.  Use sd_copy_back_deps () instead.
	(forward_dependency_cache): Remove.
	(maybe_add_or_update_back_dep_1, add_or_update_back_dep_1): Remove
	'back' from the names.  Change signature to use dep_t instead of
	equivalent quad.
	(add_back_dep): Ditto.  Make global.
	(check_dep_status): Rename to check_dep ().
	(sd_next_list, sd_lists_size, sd_lists_empty_p, sd_init_insn):
	New functions.
	(sd_finish_insn): Ditto.
	(sd_find_dep_between_no_cache): New static function.
	(sd_find_dep_between): New function.
	(ask_dependency_caches, set_dependency_caches): New static functions.
	(update_dependency_caches, change_spec_dep_to_hard, update_dep): Ditto.
	(add_or_update_dep_1): Separate pieces of functionality into
	ask_dependency_caches (), update_dependency_caches (),
	change_spec_dep_to_hard (), update_dep ().
	(get_back_and_forw_lists): New static function.
	(sd_add_dep): Separate setting of dependency caches into
	set_dependency_caches ().
	(sd_add_or_update_dep, sd_resolve_dep, sd_copy_back_deps):
	New functions.
	(sd_delete_dep): Ditto.
	(DUMP_LISTS_SIZE, DUMP_LISTS_DEPS, DUMP_LISTS_ALL): New constants.
	(dump_lists): New static function.
	(sd_debug_lists): New debug function.
	(delete_all_dependences, fixup_sched_groups): Update to use
	sd_* infrastructure.
	(sched_analyze_2): Create data-speculative dependency only if
	data-speculation is enabled.
	(sched_analyze_insn): If insn cannot be speculative, make all its
	dependencies non-speculative.
	(sched_analyze): Use sd_init_insn ().
	(add_forw_dep, compute_forward_dependencies): Remove.
	(delete_dep_nodes_in_back_deps): New static function.
	(sched_free_deps): New function.
	(init_dependency_caches): Init alloc_pools.
	(extend_depedency_caches): Update after removing of
	forward_dependency_cache.
	(free_dependency_caches): Ditto.  Free alloc_pools.
	(adjust_add_sorted_back_dep, adjust_back_add_forw_dep): Remove.
	(delete_forw_dep, add_or_update_back_dep, add_or_update_back_forw_dep):
	Ditto.
	(add_back_forw_dep, delete_back_forw_dep): Ditto.
	(add_dependence): Use init_dep ().
	(get_dep_weak_1): New static function.
	(get_dep_weak): Move logic to get_dep_weak_1 ().
	(dump_ds): New static function moved from haifa-sched.c:
	debug_spec_status ().
	(debug_ds): New debug function.
	(check_dep_status): Rename to check_dep ().  Update to check whole
	dependencies.

	* haifa-sched.c (spec_info): Make global.
	(added_recovery_block_p): Rename to
	'haifa_recovery_block_was_added_during_current_schedule_block_p'.
	(haifa_recovery_block_was_added_during_scheduling_p): New variable.
	(dep_cost, priority, rank_for_schedule, schedule_insn): Update
	to use new interfaces.
	(ok_for_early_queue_removal): Ditto.
	(schedule_block): Initialize logical uids of insns emitted by the
	target.
	(sched_init): Initialize new variable.
	(fix_inter_tick, try_ready, fix_tick_ready): Update to use new
	interfaces.
	(extend_global): Initialize insn data.
	(init_h_i_d): Remove code that is now handled in sd_init_insn ().
	(process_insn_forw_deps_be_in_spec): Change signature.  Update to use
	new interfaces.
	(add_to_speculative_block): Update to use new interfaces.
	(create_recovery_block): Set new variables.
	(create_check_block_twin, fix_recovery_deps): Update to use new
	interfaces.
	(sched_insn_is_legitimate_for_speculation_p): New function.
	(speculate_insn): Move checking logic to
	sched_insn_is_legitimate_for_speculation_p ().
	(sched_remove_insn): Finalize sched-deps information of instruction.
	(clear_priorities, add_jump_dependencies): Update to use new
	interfaces.
	(debug_spec_status): Rename to dump_ds () and move to sched-deps.c.
	
	* sched-rgn.c (set_spec_fed, find_conditional_protection): Update
	to use new interfaces.
	(is_conditionally_protected, is_pfree, is_prisky) Ditto.
	(new_ready): Try to use control speculation only if it is available.
	(add_branch_dependences): Update to use new interfaces.
	(compute_block_backward_dependences): Rename to
	compute_block_dependences ().  Call
	targetm.sched.dependencies_evaluation_hook ().
	(free_block_dependencies): New static function.
	(debug_dependencies): Update to use new interfaces.
	(schedule_region): Remove separate computation of forward dependencies.
	Move call of targetm.sched.dependencies_evaluation_hook () to
	compute_block_dependences ().  Free dependencies at the end of
	scheduling the region.

	* sched-ebb.c (earliest_block_with_similiar_load): Update to use
	new interfaces.
	(add_deps_for_risky_insns): Ditto.
	(schedule_ebb): Remove separate computation of forward dependencies.
	Free dependencies at the end of	scheduling the ebb.

	* ddg.c (create_ddg_dependence): Update to use new interfaces.
	(build_intra_loop_deps): Ditto.  Remove separate computation of forward
	dependencies.  Free sched-deps dependencies.

	* config/ia64/ia64.c (ia64_dependencies_evaluation_hook): Update
	to use new interfaces.
	(ia64_dfa_new_cycle, ia64_gen_check): Ditto.

	* config/rs6000/rs6000.c (rs6000_is_costly_dependence): Update to use
	new interfaces.
	(is_costly_group): Ditto.

From-SVN: r127405
2007-08-14 06:40:34 +00:00
Steve Ellcey a31fa2e0d3 ia64.c (ia64_c_mode_for_suffix): New.
* config/ia64/ia64.c (ia64_c_mode_for_suffix): New.
	(TARGET_C_MODE_FOR_SUFFIX): New.

From-SVN: r127247
2007-08-06 18:04:33 +00:00
Paolo Bonzini 0d475361a5 configure.ac: Remove --enable-checking=df from default settings.
2008-08-05  Paolo Bonzini  <bonzini@gnu.org>

        * configure.ac: Remove --enable-checking=df from default settings.
        * tree-pass.h (TODO_df_verify): New.  Shift TODO_mark_first_instance.
        * df-core.c (df_finish_pass) [ENABLE_CHECKING]: Schedule verification
        if the parameter is true.
        (df_analyze) [!ENABLE_DF_CHECKING]: Also do verification if the
        DF_VERIFY_SCHEDULED flag is true.
        * df.h (enum df_changeable_flags): Add DF_VERIFY_SCHEDULED.
        (df_finish_pass): Adjust prototype.
        * passes.c (execute_todo): Schedule verification if TODO_df_verify is
        true.

        * see.c (pass_see): Add TODO_df_verify.
        * loop-init.c (pass_rtl_move_loop_invariants): Add TODO_df_verify.
        * global.c (rest_of_handle_global_alloc): Schedule verification
        after the pass.
        * local-alloc.c (rest_of_handle_local_alloc): Schedule verification
        before the pass.
        * function.c (pass_thread_prologue_and_epilogue): Add TODO_df_verify.
        * gcse.c (rest_of_handle_gcse): Adjust call to df_finish_pass.
        * loop-iv.c (iv_analysis_done): Schedule verification after the pass.

        * config/sh/sh.c (sh_output_mi_thunk): Remove dead code.
        * config/ia64/ia64.c (ia64_reorg): Adjust call to df_finish_pass.
        * config/bfin/bfin.c (bfin_reorg): Adjust call to df_finish_pass.

From-SVN: r127225
2007-08-05 16:04:12 +00:00
Nick Clifton 2f83c7d6b5 host-hpux.c: Change copyright header to refer to version 3 of the GNU General Public License...
* config/host-hpux.c: Change copyright header to refer to version 3 of the GNU
  General Public License and to point readers at the COPYING3 file and the FSF's
  license web page.
* config/alpha/predicates.md, config/alpha/vms-ld.c,
config/alpha/linux.h, config/alpha/alpha.opt,
config/alpha/linux-elf.h, config/alpha/vms.h, config/alpha/elf.h,
config/alpha/vms-unwind.h, config/alpha/ev4.md,
config/alpha/ev6.md, config/alpha/alpha.c, config/alpha/vms-cc.c,
config/alpha/alpha.h, config/alpha/sync.md,
config/alpha/openbsd.h, config/alpha/alpha.md,
config/alpha/alpha-modes.def, config/alpha/ev5.md,
config/alpha/alpha-protos.h, config/alpha/freebsd.h,
config/alpha/osf5.h, config/alpha/netbsd.h, config/alpha/vms64.h,
config/alpha/constraints.md, config/alpha/osf.h,
config/alpha/xm-vms.h, config/alpha/unicosmk.h, config/linux.h,
config/frv/predicates.md, config/frv/frv.h, config/frv/linux.h,
config/frv/frv.md, config/frv/frv.opt, config/frv/frv-modes.def,
config/frv/frv-asm.h, config/frv/frv-protos.h,
config/frv/frv-abi.h, config/frv/frv.c, config/s390/tpf.h,
config/s390/s390.c, config/s390/predicates.md, config/s390/s390.h,
config/s390/linux.h, config/s390/tpf.md, config/s390/tpf.opt,
config/s390/2064.md, config/s390/2084.md, config/s390/s390.md,
config/s390/s390.opt, config/s390/s390-modes.def,
config/s390/fixdfdi.h, config/s390/constraints.md,
config/s390/s390-protos.h, config/s390/s390x.h, config/elfos.h,
config/dbxcoff.h, config/m32c/predicates.md, config/m32c/cond.md,
config/m32c/m32c.c, config/m32c/minmax.md, config/m32c/blkmov.md,
config/m32c/m32c-pragma.c, config/m32c/m32c.h,
config/m32c/prologue.md, config/m32c/m32c.abi,
config/m32c/muldiv.md, config/m32c/bitops.md, config/m32c/mov.md,
config/m32c/addsub.md, config/m32c/m32c.md, config/m32c/m32c.opt,
config/m32c/t-m32c, config/m32c/m32c-modes.def,
config/m32c/jump.md, config/m32c/shift.md,
config/m32c/m32c-protos.h, config/libgloss.h,
config/spu/spu-protos.h, config/spu/predicates.md,
config/spu/spu-builtins.h, config/spu/spu.c,
config/spu/spu-builtins.def, config/spu/spu-builtins.md,
config/spu/spu.h, config/spu/spu-elf.h, config/spu/constraints.md,
config/spu/spu.md, config/spu/spu-c.c, config/spu/spu.opt,
config/spu/spu-modes.def, config/spu/t-spu-elf, config/interix.h,
config/sparc/hypersparc.md, config/sparc/predicates.md,
config/sparc/linux.h, config/sparc/sp64-elf.h,
config/sparc/supersparc.md, config/sparc/cypress.md,
config/sparc/openbsd1-64.h, config/sparc/openbsd64.h,
config/sparc/niagara.md, config/sparc/sparc.md,
config/sparc/long-double-switch.opt, config/sparc/ultra3.md,
config/sparc/sparc.opt, config/sparc/sync.md,
config/sparc/sp-elf.h, config/sparc/sparc-protos.h,
config/sparc/ultra1_2.md, config/sparc/biarch64.h,
config/sparc/sparc.c, config/sparc/little-endian.opt,
config/sparc/sysv4-only.h, config/sparc/sparc.h,
config/sparc/linux64.h, config/sparc/freebsd.h,
config/sparc/sol2.h, config/sparc/rtemself.h,
config/sparc/netbsd-elf.h, config/sparc/vxworks.h,
config/sparc/sparc-modes.def, config/sparc/sparclet.md,
config/sparc/sysv4.h, config/vx-common.h, config/netbsd-aout.h,
config/flat.h, config/m32r/m32r.md, config/m32r/predicates.md,
config/m32r/little.h, config/m32r/m32r.c, config/m32r/m32r.opt,
config/m32r/linux.h, config/m32r/constraints.md,
config/m32r/m32r.h, config/m32r/m32r-protos.h, config/vxworks.opt,
config/darwin-c.c, config/darwin.opt, config/i386/i386.h,
config/i386/cygming.h, config/i386/linux.h, config/i386/cygwin.h,
config/i386/i386.md, config/i386/netware-crt0.c,
config/i386/sco5.h, config/i386/mmx.md, config/i386/vx-common.h,
config/i386/kaos-i386.h, config/i386/winnt-stubs.c,
config/i386/netbsd64.h, config/i386/djgpp.h, config/i386/gas.h,
config/i386/sol2.h, config/i386/constraints.md,
config/i386/netware-libgcc.c, config/i386/sysv5.h,
config/i386/predicates.md, config/i386/geode.md,
config/i386/x86-64.h, config/i386/kfreebsd-gnu.h,
config/i386/freebsd64.h, config/i386/vxworksae.h,
config/i386/pentium.md, config/i386/lynx.h, config/i386/i386elf.h,
config/i386/rtemself.h, config/i386/netbsd-elf.h,
config/i386/ppro.md, config/i386/k6.md, config/i386/netware.c,
config/i386/netware.h, config/i386/i386-modes.def,
config/i386/sysv4-cpp.h, config/i386/i386-interix.h,
config/i386/cygwin1.c, config/i386/djgpp.opt, config/i386/uwin.h,
config/i386/unix.h, config/i386/ptx4-i.h, config/i386/xm-djgpp.h,
config/i386/att.h, config/i386/winnt.c, config/i386/beos-elf.h,
config/i386/sol2-10.h, config/i386/darwin64.h, config/i386/sse.md,
config/i386/i386.opt, config/i386/bsd.h, config/i386/cygming.opt,
config/i386/xm-mingw32.h, config/i386/linux64.h,
config/i386/openbsdelf.h, config/i386/xm-cygwin.h,
config/i386/sco5.opt, config/i386/darwin.h, config/i386/mingw32.h,
config/i386/winnt-cxx.c, config/i386/i386-interix3.h,
config/i386/nwld.c, config/i386/nwld.h, config/i386/host-cygwin.c,
config/i386/cygwin2.c, config/i386/i386-protos.h,
config/i386/sync.md, config/i386/openbsd.h,
config/i386/host-mingw32.c, config/i386/i386-aout.h,
config/i386/nto.h, config/i386/biarch64.h,
config/i386/i386-coff.h, config/i386/freebsd.h,
config/i386/driver-i386.c, config/i386/knetbsd-gnu.h,
config/i386/host-i386-darwin.c, config/i386/vxworks.h,
config/i386/crtdll.h, config/i386/i386.c, config/i386/sysv4.h,
config/darwin-protos.h, config/linux.opt, config/sol2.c,
config/sol2.h, config/sh/symbian.c, config/sh/sh-protos.h,
config/sh/linux.h, config/sh/elf.h, config/sh/superh.h,
config/sh/sh4.md, config/sh/coff.h, config/sh/newlib.h,
config/sh/embed-elf.h, config/sh/symbian-pre.h, config/sh/rtems.h,
config/sh/kaos-sh.h, config/sh/sh4a.md, config/sh/constraints.md,
config/sh/sh64.h, config/sh/sh.opt, config/sh/symbian-post.h,
config/sh/sh-c.c, config/sh/predicates.md, config/sh/sh.c,
config/sh/sh.h, config/sh/shmedia.md, config/sh/sh-modes.def,
config/sh/little.h, config/sh/sh1.md, config/sh/sh4-300.md,
config/sh/superh64.h, config/sh/rtemself.h,
config/sh/netbsd-elf.h, config/sh/sh.md, config/sh/vxworks.h,
config/usegas.h, config/svr3.h, config/pdp11/pdp11-protos.h,
config/pdp11/2bsd.h, config/pdp11/pdp11.md, config/pdp11/pdp11.c,
config/pdp11/pdp11.opt, config/pdp11/pdp11-modes.def,
config/pdp11/pdp11.h, config/avr/rtems.h, config/avr/avr-protos.h,
config/avr/predicates.md, config/avr/constraints.md,
config/avr/avr.md, config/avr/avr.c, config/avr/avr.opt,
config/avr/avr.h, config/sol2-protos.h, config/dbxelf.h,
config/lynx.opt, config/crx/crx.h, config/crx/crx-protos.h,
config/crx/crx.md, config/crx/crx.c, config/crx/crx.opt,
config/c4x/c4x-c.c, config/c4x/c4x.c, config/c4x/c4x.opt,
config/c4x/c4x-modes.def, config/c4x/rtems.h,
config/c4x/predicates.md, config/c4x/c4x.h,
config/c4x/c4x-protos.h, config/c4x/c4x.md, config/kfreebsd-gnu.h,
config/xtensa/predicates.md, config/xtensa/xtensa.c,
config/xtensa/linux.h, config/xtensa/xtensa.h,
config/xtensa/elf.h, config/xtensa/xtensa.md,
config/xtensa/xtensa.opt, config/xtensa/constraints.md,
config/xtensa/xtensa-protos.h, config/dbx.h,
config/stormy16/predicates.md, config/stormy16/stormy16.md,
config/stormy16/stormy16.c, config/stormy16/stormy16.opt,
config/stormy16/stormy16.h, config/stormy16/stormy16-protos.h,
config/host-solaris.c, config/fr30/fr30.h,
config/fr30/predicates.md, config/fr30/fr30-protos.h,
config/fr30/fr30.md, config/fr30/fr30.c, config/fr30/fr30.opt,
config/vxworksae.h, config/sol2-c.c, config/lynx.h,
config/m68hc11/m68hc11-protos.h, config/m68hc11/predicates.md,
config/m68hc11/m68hc11.md, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.opt, config/m68hc11/m68hc11.h,
config/m68hc11/m68hc12.h, config/openbsd-oldgas.h,
config/host-linux.c, config/interix3.h, config/cris/cris.c,
config/cris/predicates.md, config/cris/linux.h,
config/cris/cris.h, config/cris/aout.h, config/cris/cris.md,
config/cris/linux.opt, config/cris/cris.opt, config/cris/elf.opt,
config/cris/aout.opt, config/cris/cris-protos.h,
config/vxworks-dummy.h, config/netbsd.h, config/netbsd-elf.h,
config/iq2000/iq2000.h, config/iq2000/predicates.md,
config/iq2000/iq2000-protos.h, config/iq2000/iq2000.md,
config/iq2000/iq2000.c, config/iq2000/iq2000.opt,
config/host-darwin.c, config/mt/mt.md, config/mt/mt.c,
config/mt/mt.opt, config/mt/t-mt, config/mt/mt.h,
config/mt/mt-protos.h, config/svr4.h, config/host-darwin.h,
config/chorus.h, config/mn10300/mn10300.c,
config/mn10300/mn10300.opt, config/mn10300/predicates.md,
config/mn10300/mn10300.h, config/mn10300/linux.h,
config/mn10300/constraints.md, config/mn10300/mn10300-protos.h,
config/mn10300/mn10300.md, config/ia64/predicates.md,
config/ia64/itanium1.md, config/ia64/unwind-ia64.h,
config/ia64/ia64-c.c, config/ia64/sync.md, config/ia64/ia64.c,
config/ia64/itanium2.md, config/ia64/ia64.h, config/ia64/vect.md,
config/ia64/freebsd.h, config/ia64/ia64.md,
config/ia64/ia64-modes.def, config/ia64/constraints.md,
config/ia64/hpux.h, config/ia64/ia64-protos.h, config/windiss.h,
config/gofast.h, config/rtems.h, config/sol2-10.h,
config/m68k/predicates.md, config/m68k/m68k.md,
config/m68k/linux.h, config/m68k/m68k-modes.def,
config/m68k/print-sysroot-suffix.sh, config/m68k/m68k-protos.h,
config/m68k/coff.h, config/m68k/m68k-none.h, config/m68k/ieee.opt,
config/m68k/openbsd.h, config/m68k/m68k-aout.h,
config/m68k/m68k.opt, config/m68k/m68020-elf.h,
config/m68k/m68kelf.h, config/m68k/m68k-devices.def,
config/m68k/uclinux-oldabi.h, config/m68k/m68k.c,
config/m68k/constraints.md, config/m68k/rtemself.h,
config/m68k/netbsd-elf.h, config/m68k/m68k.h,
config/m68k/uclinux.h, config/rs6000/power4.md,
config/rs6000/host-darwin.c, config/rs6000/6xx.md,
config/rs6000/linux.h, config/rs6000/eabi.h,
config/rs6000/aix41.opt, config/rs6000/xcoff.h,
config/rs6000/secureplt.h, config/rs6000/linuxspe.h,
config/rs6000/eabialtivec.h, config/rs6000/8540.md,
config/rs6000/darwin8.h, config/rs6000/kaos-ppc.h,
config/rs6000/windiss.h, config/rs6000/603.md,
config/rs6000/aix41.h, config/rs6000/cell.md,
config/rs6000/mpc.md, config/rs6000/aix43.h, config/rs6000/beos.h,
config/rs6000/gnu.h, config/rs6000/rtems.h, config/rs6000/aix.opt,
config/rs6000/darwin.md, config/rs6000/darwin64.h,
config/rs6000/default64.h, config/rs6000/7xx.md,
config/rs6000/darwin.opt, config/rs6000/spe.md,
config/rs6000/rs6000.opt, config/rs6000/rs6000-c.c,
config/rs6000/rios2.md, config/rs6000/linuxaltivec.h,
config/rs6000/7450.md, config/rs6000/linux64.h,
config/rs6000/constraints.md, config/rs6000/440.md,
config/rs6000/darwin.h, config/rs6000/host-ppc64-darwin.c,
config/rs6000/rs6000.c, config/rs6000/aix52.h,
config/rs6000/rs6000.h, config/rs6000/power6.md,
config/rs6000/predicates.md, config/rs6000/altivec.md,
config/rs6000/aix64.opt, config/rs6000/rios1.md,
config/rs6000/rs6000-modes.def, config/rs6000/rs64.md,
config/rs6000/eabisim.h, config/rs6000/sysv4le.h,
config/rs6000/darwin7.h, config/rs6000/dfp.md,
config/rs6000/linux64.opt, config/rs6000/sync.md,
config/rs6000/vxworksae.h, config/rs6000/power5.md,
config/rs6000/lynx.h, config/rs6000/biarch64.h,
config/rs6000/rs6000.md, config/rs6000/sysv4.opt,
config/rs6000/eabispe.h, config/rs6000/e500.h,
config/rs6000/freebsd.h, config/rs6000/rs6000-protos.h,
config/rs6000/netbsd.h, config/rs6000/e500-double.h,
config/rs6000/aix.h, config/rs6000/vxworks.h,
config/rs6000/40x.md, config/rs6000/aix51.h,
config/rs6000/sysv4.h, config/arc/arc-protos.h, config/arc/arc.md,
config/arc/arc.c, config/arc/arc.opt, config/arc/arc-modes.def,
config/arc/arc.h, config/mcore/mcore-elf.h,
config/mcore/mcore-protos.h, config/mcore/predicates.md,
config/mcore/mcore.md, config/mcore/mcore.c,
config/mcore/mcore.opt, config/mcore/mcore.h,
config/mcore/mcore-pe.h, config/darwin.c, config/freebsd-nthr.h,
config/score/predicates.md, config/score/score-version.h,
config/score/score-protos.h, config/score/misc.md,
config/score/elf.h, config/score/score.c, config/score/mac.md,
config/score/score7.md, config/score/score.h,
config/score/score-conv.h, config/score/score-mdaux.c,
config/score/score.md, config/score/score.opt,
config/score/score-modes.def, config/score/score-mdaux.h,
config/score/mul-div.S, config/arm/uclinux-elf.h,
config/arm/semi.h, config/arm/ecos-elf.h, config/arm/arm1020e.md,
config/arm/symbian.h, config/arm/linux-elf.h,
config/arm/arm1026ejs.md, config/arm/arm1136jfs.md,
config/arm/elf.h, config/arm/aout.h, config/arm/arm.c,
config/arm/thumb2.md, config/arm/vec-common.md, config/arm/coff.h,
config/arm/strongarm-pe.h, config/arm/arm.h,
config/arm/cortex-a8-neon.md, config/arm/semiaof.h,
config/arm/cortex-a8.md, config/arm/uclinux-eabi.h,
config/arm/arm-modes.def, config/arm/linux-eabi.h,
config/arm/rtems-elf.h, config/arm/neon-schedgen.ml,
config/arm/arm-cores.def, config/arm/arm-protos.h,
config/arm/vfp.md, config/arm/aof.h, config/arm/linux-gas.h,
config/arm/wince-pe.h, config/arm/neon.md,
config/arm/constraints.md, config/arm/neon.ml,
config/arm/xscale-elf.h, config/arm/strongarm-coff.h,
config/arm/arm.opt, config/arm/arm926ejs.md,
config/arm/predicates.md, config/arm/iwmmxt.md,
config/arm/arm_neon.h, config/arm/unknown-elf.h,
config/arm/kaos-arm.h, config/arm/bpabi.h, config/arm/pe.opt,
config/arm/neon-testgen.ml, config/arm/arm.md,
config/arm/xscale-coff.h, config/arm/pe.c,
config/arm/arm-generic.md, config/arm/pe.h,
config/arm/kaos-strongarm.h, config/arm/freebsd.h,
config/arm/neon-docgen.ml, config/arm/netbsd.h, config/arm/fpa.md,
config/arm/strongarm-elf.h, config/arm/cirrus.md,
config/arm/netbsd-elf.h, config/arm/vxworks.h,
config/arm/neon-gen.ml, config/kaos.h, config/darwin-driver.c,
config/pa/predicates.md, config/pa/pa64-hpux.h,
config/pa/pa-hpux.opt, config/pa/som.h, config/pa/pa-hpux1010.opt,
config/pa/pa-hpux1111.opt, config/pa/pa-pro-end.h,
config/pa/elf.h, config/pa/fptr.c, config/pa/pa64-linux.h,
config/pa/pa.md, config/pa/pa.opt, config/pa/pa-hpux.h,
config/pa/pa-hpux10.h, config/pa/pa-hpux11.h,
config/pa/pa-hpux1010.h, config/pa/pa-protos.h,
config/pa/pa-osf.h, config/pa/pa-hpux1111.h, config/pa/pa-64.h,
config/pa/milli64.S, config/pa/pa.c, config/pa/pa-linux.h,
config/pa/pa.h, config/pa/pa32-linux.h, config/pa/pa64-hpux.opt,
config/pa/pa64-regs.h, config/pa/pa-modes.def,
config/pa/constraints.md, config/darwin9.h, config/mips/4100.md,
config/mips/linux.h, config/mips/elfoabi.h, config/mips/elf.h,
config/mips/sdb.h, config/mips/windiss.h, config/mips/rtems.h,
config/mips/3000.md, config/mips/iris5.h, config/mips/5000.md,
config/mips/7000.md, config/mips/9000.md, config/mips/4600.md,
config/mips/linux64.h, config/mips/elforion.h,
config/mips/constraints.md, config/mips/generic.md,
config/mips/predicates.md, config/mips/4300.md,
config/mips/mips-ps-3d.md, config/mips/iris.h, config/mips/24k.md,
config/mips/mips.md, config/mips/mips.opt, config/mips/4k.md,
config/mips/5k.md, config/mips/vr4120-div.S,
config/mips/openbsd.h, config/mips/iris6.h, config/mips/4000.md,
config/mips/mips-protos.h, config/mips/6000.md,
config/mips/mips.c, config/mips/mips.h, config/mips/r3900.h,
config/mips/74k.md, config/mips/netbsd.h, config/mips/vxworks.h,
config/mips/mips-modes.def, config/mips/vr.h,
config/soft-fp/t-softfp, config/openbsd.h, config/ptx4.h,
config/freebsd-spec.h, config/vax/vax.c, config/vax/openbsd.h,
config/vax/vax.h, config/vax/elf.h, config/vax/vax.md,
config/vax/bsd.h, config/vax/vax.opt, config/vax/vax-modes.def,
config/vax/openbsd1.h, config/vax/netbsd.h,
config/vax/vax-protos.h, config/vax/netbsd-elf.h,
config/vax/vaxv.h, config/vax/ultrix.h, config/freebsd.h,
config/h8300/rtems.h, config/h8300/predicates.md,
config/h8300/h8300.c, config/h8300/h8300.h, config/h8300/elf.h,
config/h8300/h8300.md, config/h8300/h8300.opt,
config/h8300/coff.h, config/h8300/h8300-protos.h,
config/v850/v850.md, config/v850/predicates.md,
config/v850/v850-c.c, config/v850/v850.c, config/v850/v850.opt,
config/v850/v850.h, config/v850/v850-protos.h, config/vxworks.c,
config/knetbsd-gnu.h, config/sol2-6.h, config/vxworks.h,
config/mmix/mmix.h, config/mmix/predicates.md,
config/mmix/mmix-protos.h, config/mmix/mmix.md,
config/mmix/mmix.c, config/mmix/mmix.opt,
config/mmix/mmix-modes.def, config/bfin/bfin.opt,
config/bfin/rtems.h, config/bfin/bfin-modes.def,
config/bfin/predicates.md, config/bfin/bfin-protos.h,
config/bfin/bfin.c, config/bfin/bfin.h, config/bfin/bfin.md: Likewise.

From-SVN: r127157
2007-08-02 10:49:31 +00:00
Steve Ellcey 4883241c18 ia64.h (HARD_REGNO_NREGS): Handle RFmode.
* config/ia64/ia64.h (HARD_REGNO_NREGS): Handle RFmode.
	(HARD_REGNO_MODE_OK): Ditto.
	(MODES_TIEABLE_P): Ditto.
	(HARD_REGNO_CALLER_SAVE_MODE): Ditto.
	(CLASS_MAX_NREGS): Ditto.
	* config/ia64/ia64.c (ia64_print_operand_address): Add R format.
	* config/ia64/ia64.md (divsf3_internal_thr): Removed.
	(divdf3_internal_thr): Removed.
	* config/ia64/div.md: New file.
	* config/ia64/constraints.md: Add H constraint.

From-SVN: r126930
2007-07-25 20:09:07 +00:00
Julian Brown 608063c3e9 alpha.c (alpha_mangle_fundamental_type): Rename to...
gcc/
	* config/alpha/alpha.c (alpha_mangle_fundamental_type): Rename to...
	(alpha_mangle_type): This.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* config/arm/arm-protos.h (arm_mangle_type): Add prototype.
	* config/arm/arm.c (TARGET_MANGLE_TYPE): Define target hook.
	(arm_init_neon_builtins): Fix comment.
	(arm_mangle_map_entry): New.
	(arm_mangle_map): New.
	(arm_mangle_type): New.
	* config/i386/i386.c (ix86_mangle_fundamental_type): Rename to...
	(ix86_mangle_type): This. Use TYPE_MAIN_VARIANT and restrict
	mangled types to VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, REAL_TYPE.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* config/ia64/ia64.c (ia64_mangle_fundamental_type): Rename to...
	(ia64_mangle_type): This. Use TYPE_MAIN_VARIANT  and restrict
	mangled types to VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, REAL_TYPE.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* config/rs6000/rs6000.c (rs6000_mangle_fundamental_type): Rename
	to...
	(rs6000_mangle_type): This. Use TYPE_MAIN_VARIANT.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* config/s390/s390.c (s390_mangle_fundamental_type): Rename to...
	(s390_mangle_type): This.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* config/sparc/sparc.c (sparc_mangle_fundamental_type): Rename to...
	(sparc_mangle_type): This.
	(TARGET_MANGLE_FUNDAMENTAL_TYPE): Don't define.
	(TARGET_MANGLE_TYPE): Define this instead.
	* cp/mangle.c (write_type): Call mangle_type target hook on all
	types before mangling.  Use original type, not main variant, as
	argument.
	* target-def.h (TARGET_MANGLE_FUNDAMENTAL_TYPE): Rename hook to...
	(TARGET_MANGLE_TYPE): This.
	* target.h (gcc_target): Rename mangle_fundamental_type to
	mangle_type.
	* doc/tm.texi (TARGET_MANGLE_FUNDAMENTAL_TYPE): Rename section to...
	(TARGET_MANGLE_TYPE): This. Note slightly different semantics.


Co-Authored-By: Mark Shinwell <shinwell@codesourcery.com>

From-SVN: r126917
2007-07-25 15:43:04 +00:00
Ian Lance Taylor b3a134196f Replace no_new_pseudos in backends.
* rtl.h (can_create_pseudo_p): Define.
	* config/darwin.c (machopic_indirect_data_reference): Use
	can_create_pseudo_p () instead of no_new_pseudos.
	(machopic_indirect_data_reference): Likewise.
	(machopic_legitimize_pic_address): Likewise.
	* config/alpha/alpha.c (alpha_legitimize_address): Likewise.
	(alpha_emit_set_const_1): Likewise.
	(alpha_emit_set_const): Likewise.
	(alpha_emit_conditional_move): Likewise.
	(alpha_split_conditional_move): Likewise.
	* config/alpha/alpha.md (various splitters): Likewise.
	(movti): Likewise.
	* config/arm/arm.c (legitimize_pic_address): Likewise.
	(arm_load_pic_register): Likewise.
	* config/arm/arm.md (addsi3, subsi3, andsi3, iorsi3): Likewise.
	(movdi, movsi, movhi, movqi, movsf, movdf): Likewise.
	* config/bfin/bfin.c (legitimize_pic_address): Likewise.
	* config/cris/cris.c (cris_expand_pic_call_address): Likewise.
	* config/cris/cris.md (movsi): Likewise.
	* config/frv/frv.md (symGOT2reg_hilo): Likewise.
	(symGOTOFF2reg_hilo): Likewise.
	(symGPREL2reg, symGPREL2reg_hilo): Likewise.
	* config/h8300/h8300.md (insv, extzv): Likewise.
	* config/i386/i386.c (ix86_expand_move): Likewise.
	(ix86_expand_vector_move): Likewise.
	(ix86_prepare_fp_compare_args): Likewise.
	(ix86_expand_carry_flag_compare): Likewise.
	* config/i386/i386.md (tls_dynamic_gnu2_32): Likewise.
	(tls_dynamic_gnu2_combine_32): Likewise.
	(tls_dynamic_gnu2_64, tls_dynamic_gnu2_combine_64): Likewise.
	* config/ia64/ia64.c (ia64_expand_move): Likewise.
	(ia64_expand_movxf_movrf): Likewise.
	* config/m32c/m32c.c (m32c_prepare_move): Likewise.
	(m32c_split_move): Likewise.
	(m32c_expand_insv): Likewise.
	* config/m68k/m68k.md (movsi): Likewise.
	* config/mips/mips.c (mips_force_temporary): Likewise.
	(mips_split_symbol): Likewise.
	(mips_move_integer): Likewise.
	(mips_legitimize_const_move): Likewise.
	* config/mn10300/mn10300.md (movsi): Likewise.
	* config/pa/pa.c (emit_move_sequence): Likewise.
	* config/rs6000/rs6000.c (rs6000_emit_move): Likewise.
	(rs6000_got_register): Likewise.
	(create_TOC_reference): Likewise.
	(rs6000_machopic_legitimize_pic_address): Likewise.
	* config/rs6000/rs6000.md (add<mode>3): Likewise.
	(various splitters): Likewise.
	(iorsi3, xorsi3, iordi3, xordi3): Likewise.
	(movsi_got): Likewise.
	* config/s390/s390.c (emit_symbolic_move): Likewise.
	* config/s390/s390.md (movhi, movqi): Likewise.
	(load_multiple, store_multiple): Likewise.
	* config/score/score.c (score_force_temporary): Likewise.
	* config/sh/sh.c (prepare_move_operands): Likewise.
	(prepare_cbranch_operands): Likewise.
	(emit_fpu_switch): Likewise.
	(fpscr_set_from_mem): Likewise.
	* config/sh/sh.md (movdicc, movsicc, movsicc_umin): Likewise.
	(adddi3, subsi3): Likewise.
	(various splitters): Likewise.
	(divsi_inv_fp_combine): Likewise.
	(symGOT_load, symGOTOFF2reg, symDTPOFF2reg): Likewise.
	(seq, slt, sle, sgt, sge, sgtu, sltu, sleu, sgeu): Likewise.
	(sne): Likewise.
	* config/sh/predicates.md (xor_operand): Likewise.
	* config/sparc/sparc.c (legitimize_tls_address): Likewise.
	* config/sparc/sparc.md (movsi_pic_label_ref): Likewise.
	(movdi_pic_label_ref): Likewise.
	* config/spu/spu.c (spu_split_immediate): Likewise.
	* config/alpha/alpha.md (various splitters): Remove test
	!no_new_pseudos || reload_completed.
	* config/ia64/ia64.c (ia64_output_mi_thunk): Don't set
	no_new_pseudos.
	* config/m68k/m68k.c (m68k_output_mi_thunk): Likewise.
	* config/mips/mips.c (mips_output_mi_thunk): Likewise.
	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
	* config/score/score.c (th_output_mi_thunk): Likewise.
	* config/sh/sh.c (sh_output_mi_thunk): Likewise.
	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.

From-SVN: r126517
2007-07-10 17:23:11 +00:00
Andrew Pinski 5be014d5b7 [multiple changes]
2007-06-15  Andrew Pinski <andrew_pinski@playstation.sony.com>
            Zdenek Dvorak <dvorakz@suse.cz>
            Richard Guenther  <rguenther@suse.de>
            Kaz Kojima  <kkojima@gcc.gnu.org>

	* tree-vrp.c (compare_values_warnv): Convert val2 to
	the type of val1.
	(extract_range_from_assert): Create
	POINTER_PLUS_EXPR for pointer types.
	(extract_range_from_binary_expr): Handle
	only POINTER_PLUS_EXPR, MIN_EXPR, and MAX_EXPR
	for pointer types.
	* doc/c-tree.texi (POINTER_PLUS_EXPR): Document.
	* tree-ssa-loop-niter.c (split_to_var_and_offset): Handle
	POINTER_PLUS_EXPR as PLUS_EXPR.
	(number_of_iterations_lt_to_ne):
	For pointer types, use sizetype when
	creating MINUS_EXPR/PLUS_EXPRs.
	(assert_loop_rolls_lt): For pointer types, use sizetype when
	creating MINUS_EXPR/PLUS_EXPRs.
	(number_of_iterations_le): Likewise.
	(expand_simple_operations): POINTER_PLUS_EXPR are simple also.
	(derive_constant_upper_bound): Handle POINTER_PLUS_EXPR just
	like PLUS_EXPR and MINUS_EXPR.
	* tree-pretty-print.c (dump_generic_node): Handle
	POINTER_PLUS_EXPR.
	(op_prio): Likewise.
	(op_symbol_1): Likewise.
	* optabs.c (optab_for_tree_code): Likewise.
	* tree-ssa-loop-manip.c (create_iv): Handle pointer base
	specially.
	* tree-tailcall.c (process_assignment): Mention
	POINTER_PLUS_EXPR in a TODO comment.
	* tree.c (build2_stat): Assert when trying to use PLUS_EXPR or 
	MINUS_EXPR with a pointer. Also assert for POINTER_PLUS_EXPR
	not used with a pointer and an integer type.
	* tree-scalar-evolution.c (add_to_evolution_1): Convert the
	increment using chrec_convert_rhs instead of chrec_convert.
	(follow_ssa_edge_in_rhs): Handle POINTER_PLUS_EXPR like
	PLUS_EXPR except for the right hand side's type will be
	sizetype.
	(interpret_rhs_modify_stmt): Handle POINTER_PLUS_EXPR.
	(fold_used_pointer_cast): Kill.
	(pointer_offset_p): Kill.
	(fold_used_pointer): Kill.
	(pointer_used_p): Kill.
	(analyze_scalar_evolution_1 <case GIMPLE_MODIFY_STMT>): Don't
	call fold_used_pointer.
	(instantiate_parameters_1): Convert the increment
	using chrec_convert_rhs instead of chrec_convert.
	Handle POINTER_PLUS_EXPR as PLUS_EXPR.
	* builtins.c (get_pointer_alignment): Handle POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	(expand_builtin_strcat): Create a POINTER_PLUS_EXPR instead of
	PLUS_EXPR for pointers.
	(std_gimplify_va_arg_expr): Likewise.
	(fold_builtin_memory_op): Likewise.
	(fold_builtin_strstr): Likewise.
	(fold_builtin_strchr): Likewise.
	(fold_builtin_strrchr): Likewise.
	(fold_builtin_strpbrk): Likewise.
	(expand_builtin_memory_chk): Likewise.
	(fold_builtin_memory_chk): Likewise.
	(std_expand_builtin_va_start): Use
	sizetype for the call to make_tree and then convert
	to the pointer type.
	(fold_builtin_memchr): Use POINTER_PLUS_EXPR
	instead of PLUS_EXPR for adding to a pointer.
	(std_gimplify_va_arg_expr): Use fold_build2 for
	the creating of POINTER_PLUS_EXPR.  For the BIT_AND_EXPR, cast
	the operands to sizetype first and then cast the BIT_AND_EXPR
	back to the pointer type.
	* fold-const.c (build_range_check): Handle pointer types
	specially.
	(extract_array_ref): Look for POINTER_PLUS_EXPR instead
	of PLUS_EXPR's. Make sure the offset is converted to
	sizetype.
	(try_move_mult_to_index): Strip the NOPs from the offset.
	Remove code argument and replace all uses with PLUS_EXPR.
	(fold_to_nonsharp_ineq_using_bound): Handle pointer types
	specially. Don't use a pointer type for MINUS_EXPR.
	(fold_unary): Handle for (T1)(X op Y),
	only p+ as that is the only as that can be handled for
	binary operators now.
	(fold_binary <case POINTER_PLUS_EXPR>): Add folding of
	POINTER_PLUS_EXPR.
	<case PLUS_EXPR>: Add folding of PTR+INT into
	PTR p+ INT.
	Don't call try_move_mult_to_index.
	<case MINUS_EXPR>: Fold (PTR0 p+ A) - (PTR1 p+ B)
	into (PTR0 - PTR1) + (A - B). Fold (PTR0 p+ A) - PTR1 into
	(PTR0 - PTR1) + A iff (PTR0 - PTR1) simplifies.
	Don't call try_move_mult_to_index.
	(tree_expr_nonnegative_warnv_p): Handle POINTER_PLUS_EXPR.
	(tree_expr_nonzero_p): Likewise.
	(fold_indirect_ref_1): Look at POINTER_PLUS_EXPR instead
	of PLUS_EXPR for the complex expression folding.
	* tree-chrec.c (chrec_fold_plus_poly_poly): If the
	first chrec is a pointer type, then the second should
	be sizetype and not the first's type.
	For POINTER_PLUS_EXPR, use a different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	(chrec_fold_plus_1): For POINTER_PLUS_EXPR, use a
	different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	(chrec_fold_plus): For pointer types, use POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	When either operand is zero, convert the other operand.
	(chrec_apply): Use chrec_convert_rhs
	on the argument x instead of chrec_convert.
	(reset_evolution_in_loop): For pointer types, the new_evol
	should be sizetype.
	(convert_affine_scev): For POINTER_PLUS_EXPR, use a
	different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	(chrec_convert_rhs): New function.
	(chrec_convert_aggressive): For POINTER_PLUS_EXPR, use a
	different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	* tree-chrec.h (chrec_convert_rhs): New prototype.
	(build_polynomial_chrec): For pointer types, the right hand
	* tree-ssa-ccp.c (maybe_fold_stmt_indirect): Look for
	POINTER_PLUS_EXPR instead of PLUS_EXPR's.
	Remove subtraction case as it is always addition now.
	Make sure the offset is converted to sizetype.
	(fold_stmt_r): Don't handle PLUS_EXPR/MINUS_EXPR specially.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR was handled before.
	* tree-ssa-loop-ivopts.c (determine_base_object): Abort for 
	PLUS_EXPR in pointer type.
	Handle POINTER_PLUS_EXPR.
	(tree_to_aff_combination): Likewise.
	(force_expr_to_var_cost): Likewise.
	(force_expr_to_var_cost): Likewise. Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	* c-format.c (check_format_arg): Handle POINTER_PLUS_EXPR
	instead of PLUS_EXPR of pointer types.
	* tree-stdarg.c (va_list_counter_bump): Handle POINTER_PLUS_EXPR
	as PLUS_EXPR.
	(check_va_list_escapes): Likewise.
	(check_all_va_list_escapes): Likewise.
	* dwarf2out.c (loc_descriptor_from_tree_1):
	Handle POINT_PLUS_EXPR as a PLUS_EXPR.
	* expr.c (expand_expr_real_1): Handle POINTER_PLUS_EXPR.
	(string_constant): Likewise.
	* tree-ssa-address.c (tree_mem_ref_addr): When adding
	the offset to the base, use POINTER_PLUS_EXPR.
	(add_to_parts): Convert the index to sizetype.
	(create_mem_ref): Create A POINTER_PLUS_EXPR for the one case.
	* matrix-reorg.c (collect_data_for_malloc_call): Stmt
	will now only be either INDIRECT_REF and POINTER_PLUS_EXPR.
	Offset only holds something for PLUS_EXPR.
	(ssa_accessed_in_tree): Handle POINTER_PLUS_EXPR just as
	a PLUS_EXPR.
	(analyze_transpose): POINTER_PLUS_EXPR will only show up now
	and not PLUS_EXPR.
	(analyze_accesses_for_modify_stmt): Likewise.
	Remove comment about the type being integral type as it is
	wrong now.
	(can_calculate_expr_before_stmt): Handle POINTER_PLUS_EXPR as
	PLUS_EXPR.
	(transform_access_sites): POINTER_PLUS_EXPR will only show up now
	and not PLUS_EXPR.
	Correct the type which the artimentic is done in (is now
	sizetype).
	Reindent one loop.
	* tree-data-ref.c (split_constant_offset): Handle
	POINTER_PLUS_EXPR
	* tree-affine.c (tree_to_aff_combination): Likewise.
	* c-typeck.c (build_unary_op): For pointers create the increment
	as a sizetype. Create a POINTER_PLUS_EXPR instead of PLUS_EXPR
	for pointers.
	* gimplify.c (gimplify_self_mod_expr): Create a
	POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	(gimplify_omp_atomic_fetch_op): Handle POINTER_PLUS_EXPR.
	* tree.def (POINTER_PLUS_EXPR): New tree code.
	* tree-predcom.c (ref_at_iteration): If we have a pointer
	type do the multiplication in sizetype.
	* tree-mudflap.c (mf_xform_derefs_1): Create a
	POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	* tree-ssa-forwprop.c 
	(forward_propagate_addr_into_variable_array_index):
	Don't expect there to be a cast for the index as that
	does not exist anymore.
	(forward_propagate_addr_expr_1): Check for POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	Don't check for the first operand of the POINTER_PLUS_EXPR
	was the index as it cannot be.
	Call forward_propagate_addr_into_variable_array_index with
	the SSA_NAME instead of the statement.
	* varasm.c (const_hash_1): Handle POINTER_PLUS_EXPR.
	(compare_constant): Likewise.
	(copy_constant): Likewise.
	(compute_reloc_for_constant): Likewise.
	(output_addressed_constants): Likewise.
	(initializer_constant_valid_p): Likewise.
	* tree-ssa.c (tree_ssa_useless_type_conversion_1):
	Convert the MIN/MAX of the inner type to the outer
	type before comparing them.
	* tree-ssa-loop-prefetch.c (idx_analyze_ref):  Handle
	POINTER_PLUS_EXPR instead of PLUS_EXPR.
	(issue_prefetch_ref): Create a POINTER_PLUS_EXPR instead
	of PLUS_EXPR for pointers.
	* tree-inline.c (estimate_num_insns_1): Handle
	POINTER_PLUS_EXPR.
	* tree-vect-transform.c (vect_create_addr_base_for_vector_ref): 
	Create a POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	(bump_vector_ptr): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for the pointer increment statement.
	(vect_update_ivs_after_vectorizer): For pointer types, create
	POINTER_PLUS_EXPR instead of PLUS_EXPR and also create
	MULT_EXPR in sizetype.
	(vect_gen_niters_for_prolog_loop): Add a cast when creating
	byte_misalign.
	* tree-object-size.c (plus_expr_object_size): Handle
	POINTER_PLUS_EXPR instead of PLUS_EXPR.  Removing all the extra
	code which is trying to figure out which side is a pointer and 
	is the index.
	(check_for_plus_in_loops_1): Likewise.
	(check_for_plus_in_loops): Likewise.
	* c-common.c (pointer_int_sum): Create a
	POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	* tree-ssa-structalias.c (handle_ptr_arith): Handle
	only POINTER_PLUS_EXPR.  Removing all the extra
	code which is trying to figure out which side is a pointer and 
	is the index.
	* tree-cfg.c (verify_expr): Add extra checking for pointers and
	PLUS_EXPR and MINUS_EXPR.
	Also add checking to make sure the operands of POINTER_PLUS_EXPR
	are correct.
	* config/frv/frv.c (frv_expand_builtin_va_start): Use sizetype
	with make_tree, instead of a pointer type.
	* config/s390/s390.c (s390_va_start): Use POINTER_PLUS_EXPR
	for pointers instead of PLUS_EXPR.
	(s390_gimplify_va_arg): Likewise.
	* config/spu/spu.c (spu_va_start): Create POINTER_PLUS_EXPR
	instead of PLUS_EXPR when doing addition on pointer
	types.  Use sizetype for the second operand.
	(spu_gimplify_va_arg_expr): Likewise.
	* config/sparc/sparc.c (sparc_gimplify_va_arg): Use 
	POINTER_PLUS_EXPR instead of PLUS_EXPR when the operand was
	a pointer.  Don't create a BIT_AND_EXPR for pointer types.
	* config/i386/i386.c (ix86_va_start): Use POINTER_PLUS_EXPR
	for the pointer addition and also use size_int/sizetype
	for the offset.
	(ix86_gimplify_va_arg): Likewise.
	Perform BIT_AND_EXPR on sizetype arguments.
	* config/sh/sh.c (sh_va_start): Call make_tree with sizetype
	and convert its result to a pointer type.  Use POINTER_PLUS_EXPR
	for the pointer additions and also use size_int for the offsets.
	(sh_gimplify_va_arg_expr): Use POINTER_PLUS_EXPR for the pointer
	additions and also use size_int for the offsets.  Perform
	BIT_AND_EXPR on sizetype arguments.
	* config/ia64/ia64.c (ia64_gimplify_va_arg): Use
	POINTER_PLUS_EXPR for pointers and create the
	BIT_AND_EXPR in sizetype.
	* config/rs6000/rs6000.c (rs6000_va_start): Use POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointer addition.
	(rs6000_va_start): Likewise.
	Also use sizetype for the offset.
	* config/pa/pa.c (reloc_needed): Handle POINTER_PLUS_EXPR
	as PLUS_EXPR/MINUS_EXPR.
	(hppa_gimplify_va_arg_expr): Don't create MINUS_EXPR or
	PLUS_EXPR for pointers, instead use POINTER_PLUS_EXPR.
	Don't use BIT_AND_EXPR on a pointer type, convert the
	expression to sizetype first.
	* config/mips/mips.c (mips_va_start): Use POINTER_PLUS_EXPR
	for pointers.
	(mips_gimplify_va_arg_expr): Likewise.
	Don't create BIT_AND_EXPR in a pointer type.



2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
        POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
        * trans-expr.c (gfc_trans_string_copy): Create
        POINTER_PLUS_EXPR instead of a PLUS_EXPR
        for pointer types.

2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

	* typeck.c (build_binary_op): For templates build the
	expression in pieces to avoid the assert in build2_stat.
	(get_member_function_from_ptrfunc):
	Change over to using POINTER_PLUS_EXPR and convert
	the second operand to sizetype.
	* typeck2.c (build_m_component_ref):  Likewise.
	* init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	(build_new_1): Likewise.
	(build_vec_delete_1): Likewise.
	(build_vec_delete): Likewise.
	* class.c (build_base_path): Likewise.
	(build_base_path): Likewise.
	(convert_to_base_statically): Likewise.
	(fixed_type_or_null): Handle POINTER_PLUS_EXPR.
	(get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	(dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	* call.c (build_special_member_call): Likewise.
	* rtti.c (build_headof): Likewise.
	Use sizetype instead of ptrdiff_type_node.
	(tinfo_base_init): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	* except.c (expand_start_catch_block):  Do a
	NEGATIVE and then a POINTER_PLUS_EXPR instead
	of a MINUS_EXPR.
	* cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
	PLUS_EXPR on pointer types over to use
	POINTER_PLUS_EXPR and remove the conversion
	to the pointer types.
	* method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
	adding to a pointer type. Use size_int instead of
	ssize_int. Convert the index to sizetype before
	adding it to the pointer.



2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * trans.c (Attribute_to_gnu): When subtracting an
        offset from a pointer, use POINTER_PLUS_EXPR with
        NEGATE_EXPR instead of MINUS_EXPR.
        (gnat_to_gnu): Likewise.
        * utils.c (convert): When converting between
        thin pointers, use POINTER_PLUS_EXPR and sizetype
        for the offset.
        * utils2.c (known_alignment): POINTER_PLUS_EXPR
        have the same semantics as PLUS_EXPR for alignment.
        (build_binary_op): Add support for the semantics of
        POINTER_PLUS_EXPR's operands.
        When adding an offset to a pointer, use POINTER_PLUS_EXPR.



2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * class.c (make_class_data): Build the index in sizetype.
        Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
        adding to a pointer type.
        (build_symbol_entry): Likewise.
        * expr.c (build_java_arrayaccess): Likewise.
        (build_field_ref): Likewise.
        (build_known_method_ref): Likewise.
        (build_invokevirtual): Likewise.
        * except.c (build_exception_object_ref): Do a
        NEGATIVE and then a POINTER_PLUS_EXPR instead
        of a MINUS_EXPR.


2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

	PR tree-opt/32225
	* gcc.c-torture/compile/20070605-1.c: New test.

	* gcc.c-torture/compile/20070603-1.c: New testcase.
	* gcc.c-torture/compile/20070603-2.c: New testcase.

	* gcc.c-torture/compile/20070531-1.c: New test.

	PR tree-opt/32167
	* gcc.c-torture/compile/20070531-2.c: New test.

	PR tree-opt/32144
	* gcc.c-torture/compile/20070529-1.c: New test.

	PR tree-opt/32145
	* gcc.c-torture/compile/20070529-2.c: New test.

	PR tree-opt/32015
	* gcc.c-torture/compile/20070520-1.c: New test.

	* g++.dg/ext/java-1.C: New test.

	* gcc.dg/vect/vect-106.c: We are now able to vectorize two
	loops instead of one. Remove the "can't determine dependence"
	check.
	* gcc.dg/tree-ssa/20030815-1.c: Remove testcase which is no longer
	needed as the cast is gone in the first place.
	* gcc.dg/max-1.c: Change local variable a to be a global one.
	* gcc.dg/tree-ssa/ssa-pre-8.c: Update testcase since we don't
	have a cast which is PREd.

From-SVN: r125755
2007-06-15 22:42:36 -07:00
Daniel Berlin 6fb5fa3cbc Merge dataflow branch into mainline
From-SVN: r125624
2007-06-11 18:02:15 +00:00
Andreas Schwab 740aeb384d ia64.c (emit_predicate_relation_info): Fix use of NOTE_INSN_BASIC_BLOCK_P.
* config/ia64/ia64.c (emit_predicate_relation_info): Fix use of
	NOTE_INSN_BASIC_BLOCK_P.
	(process_for_unwind_directive): Likewise.

From-SVN: r124899
2007-05-21 11:29:35 +00:00
Jan Hubicka a38e7aa544 gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER...
* gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	* ddg.c (create_ddg): LIkewise.
	* final.c (final): Remove hunk moving line numbernotes around since
	they are no longer present at this stage.
	(final_scan_insn): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(output_asm_label): Likewise.
	* reorg.c (dbr_schedule): Likewise.
	* haifa-sched.c (unlink_other_notes): Likewise.
	* mode-switching.c (optimize_mode_switching): Likewise.
	* graph.c (start_bb): Likewise.
	* rtl.def (NOTE): Update description.
	* jump.c (squeeze_notes): Delete.
	(mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use
	NOTE_INSN_BASIC_BLOCK_P when possible.
	* ifcvt.c (dead_or_predicable): Remove call of squeeze_notes.
	* dwarf2out.c (gen_label_die): Use NOTE_KIND instead of
        NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(dwarf2out_var_location): Likewise.
	* cfgbuild.c (make_edges): Likewise.
	(find_basic_blocks_1): Likewise.
	* function.c (reorder_blocks_1): Likewise.
	(epilogue_done): Likewise.
	(reposition_prologue_and_epilogue_notes): Likewise.
	* print-rtl.c (print_rtx): Likewise; drop code for printing line number
	notes.
	(print_rtl): Likewise.
	(print_rtl_single): Likewise.
	* gcse.c (insert_insn_start_bb): Likewise.
	* alias.c (init_alias_analysis): Likewise.
	* calls.c (fixup_tail_calls): Likewise.
	* except.c (sjlj_emit_function_enter): Likewise.
	* emit-rtl.c (add_insn_after): Likeiwse.
	(emit_label_before): Likewise.
	(emit_label_after): Likewise.
	(emit_note_before, emit_note_after, emit_note): Update
	parameter to be enum insn_note; do not deal with source
	files.
	* cfgcleanup.c (merge_blocks_move_predecessor_nojumps):
	Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P
	when possible.
	(merge_blocks_move_successor_nojumps): Simplify now when
	we don't have BLOCK notes.
	(try_optimize_cfg): Likewise.
	* cfglayout.c (skip_insns_after_block): Likewise.
	(record_effective_endpoints): Likewise.
	(duplicate_insn_chain): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.
	* sched-deps.c (sched_analyze): Likewise.
	* rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS):
	Exterminate.
	(note_insn_name): Simplify now when NOTE_INSN_BIAS is gone.
	* rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate.
	(SET_INSN_DELETED): Simplify.
	(NOTE_LINE_NUMBER): Exterminate.
	(NOTE_LINE_KIND): New.
	(NOTE_INSN_BASIC_BLOCK_P): Update.
	(enum insn_note): Simplify.
	(GET_NOTE_INSN_NAME) Simplify.
	(emit_note_before, emit_note_after, emit_note): Update prototype.
	(squeeze_notes): Remove.
	* sched-int.h (NOTE_NOT_BB_P): Update.
	* resource.c (mark_target_live_regs): Update.
	* sched-rgn.c (debug_dependencies): Update.
	* sched-vis.c (print_insn): Update.
	* config/alpha/alpha.c (alpha_handle_trap_shadows): Update.
	* config/i386/i386.c (ix86_output_function_epilogue): Update.
	* config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0.
	(TARGET_ADJUST_UNROLL_MAX): Likewise.
	(split_branches): Update.
	(sh_optimize_target_register_callee_saved): Remove hunk dead since gcc
	4.0.0.
	(sh_adjust_unroll_max): Exterminate.
	* config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED.
	* config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise.
	(m68hc11_reorg): Likewise.
	* config/ia64/ia64.c (emit_insn_group_barriers): Update.
	(emit_predicate_relation_info): Update.
	(process_for_unwind_directive): Update.
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update.
	(output_call): Update.
	* config/pa/pa.c (output_lbranch): Update.
	(output_millicode_call): Update.
	(output_call): Update.
	(pa_combine_instructions): Update.
	* config/mips/mips.c (mips16_gp_pseudo_reg): Update.
	* config/bfin/bfin.c (gen_one_bundle): Update.
	* cfgrtl.c (can_delete_note_p): Update.
	(delete_insn): Update.
	(rtl_merge_blocks): Update.
	(commit_one_edge_insertion): Update.
	(rtl_verify_flow_info): Update.
	* stmt.c (expand_case): Do not call squeeze_notes.

From-SVN: r124895
2007-05-21 06:19:50 +00:00
Jan Hubicka 55e092c4d0 alpha.c (alpha_output_mi_thunk_osf): Use insn_locators_alloc instead of insn_locators_initialize...
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Use
	insn_locators_alloc instead of insn_locators_initialize;
	call reset_block_changes.
	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
	* config/sh/sh.c (sparc_output_mi_thunk): Likewise.
	* config/is64/ia64.c (ia64_output_mi_thunk): Likewise.
	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
	* config/score/score.c (th_output_mi_thunk): Likewise.
	* config/mips/mips.c (mips_output_mi_thunk): Likewise.
	* cfglyaout.c (set_curr_insn_source_location, set_curr_insn_block):
	tolerate uninitialized locator info.

	Re-apply:
	* function.c (init_function_start): Don't init line number info.
	(expand_function_end): Update.
	(reset_block_changes, record_block_change, finalize_block_changes,
	check_block_change, free_block_changes): Kill.
	* function.h (reset_block_changes, record_block_change,
	finalize_block_changes, check_block_change, free_block_changes): Remove
	prototypes.
	(struct function): Remove ib_boundaries_block.
	* emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw):
	Use curr_insn_locator to initialize locator.
	(emit_line_note): Remove.
	* cfgexpand.c (expand_gimple_cond_expr): Update.
	(construct_exit_block): Likewise.
	(tree_expand_cfg): Initialize/finalize locators.
	* expr.c (expand_expr_real): Update.
	* cfglayout.c (line_locators_locs, line_locators_lines,
	file_locators_locs, file_locators_files): Remove.
	(set_block_levels): Move to cfgexpand.c.
	(insn_locators_initialize): Remove.
	(pass_insn_locators_initialize): Remove.
	(locations_locators_locs, locations_locators_vals): New static vars.
	(curr_location, last_location, curr_block, last_block, curr_rtl_loc):
	Likewise.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	New functions.
	(locator_location): New.
	(locator_line, locator_file): Rewrite.
	* rtl.h (emit_line_note): Kill.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	Declare.
	* tree-inline.c (initialize_cfun): Do not initialize
	ib_boundaries_block.
	* passes.c (pass_insn_locators_initialize): Remove.

From-SVN: r124258
2007-04-28 08:20:08 +00:00
Richard Henderson 13f703423a constraints.md: New file.
* config/ia64/constraints.md: New file.
        * config/ia64/predicates.md: Replace CONST_OK_FOR_? with
        satisfies_constraint_?.
        * config/ia64/ia64.c (ia64_move_ok, ia64_legitimate_constant_p,
        ia64_reload_gp, spill_restore_mem, ia64_expand_prologue,
        ia64_expand_epilogue, ia64_split_return_addr_rtx, ia64_rtx_costs,
        ia64_output_mi_thunk): Likewise.
        (ia64_const_ok_for_letter_p): Remove.
        (ia64_const_double_ok_for_letter_p): Remove. 
        (ia64_extra_constraint): Remove.
        * config/ia64/ia64.h (REG_CLASS_FROM_LETTER): Remove.
        (CONST_OK_FOR_I, CONST_OK_FOR_J, CONST_OK_FOR_K, CONST_OK_FOR_L,
        CONST_OK_FOR_M, CONST_OK_FOR_N, CONST_OK_FOR_O, CONST_OK_FOR_P,
        CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_G,
        CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT,
        EXTRA_MEMORY_CONSTRAINT): Remove.
        * config/ia64/ia64.md: Include constriants.md.  Replace
        CONST_OK_FOR_? with satisfies_constraint_?.

From-SVN: r123186
2007-03-24 12:28:37 -07:00
Richard Henderson 9b580a0b53 re PR target/26090 (IA-64 creates DT_TEXTREL binaries)
PR target/26090
	* target.h (targetm.asm.out.reloc_rw_mask): New.
	* target-def.h (TARGET_ASM_RELOC_RW_MASK): New.
	(TARGET_ASM_OUT): Use it.
	* targhooks.c, targhooks.h (default_reloc_rw_mask): New.
	* varasm.c (categorize_decl_for_section): Remove shlib argument;
	use the new reloc_rw_mask target hook instead.
	(default_section_type_flags_1): Merge into...
	(default_section_type_flags): ... here.
	(decl_readonly_section_1): Merge into...
	(decl_readonly_section): ... here.
	(default_elf_select_section_1): Merge into...
	(default_elf_select_section): ... here.
	(default_unique_section_1): Merge into...
	(default_unique_section): ... here.
	(compute_reloc_for_rtx_1, compute_reloc_for_rtx): New.
	(default_select_rtx_section): Use it.
	(default_elf_select_rtx_section): Likewise.
	* output.h: Update to match.
	* doc/tm.texi (TARGET_ASM_RELOC_RW_MASK): New.
	* config/alpha/alpha.c (alpha_elf_reloc_rw_mask): New.
	(TARGET_ASM_RELOC_RW_MASK): New.
	* config/i386/i386.c (x86_64_elf_select_section): Adjust call
	to categorize_decl_for_section.
	(x86_64_elf_unique_section): Likewise.
	* config/ia64/hpux.h (TARGET_ASM_SELECT_SECTION,
	TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): Remove.
	(TARGET_ASM_RELOC_RW_MASK): New.
	* config/ia64/ia64.c (ia64_rwreloc_select_section,
	ia64_rwreloc_unique_section, ia64_rwreloc_select_rtx_section): Remove.
	(ia64_hpux_reloc_rw_mask, ia64_reloc_rw_mask): New.
	(TARGET_RWRELOC): Remove.
	(ia64_section_type_flags): Adjust call to default_section_type_flags.
	* config/ia64/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New.
	* config/rs6000/rs6000.c (rs6000_elf_section_type_flags): Remove.
	(rs6000_elf_select_section, rs6000_elf_unique_section): Remove.
	(rs6000_elf_reloc_rw_mask, rs6000_xcoff_reloc_rw_mask): New.
	(rs6000_xcoff_select_section): Use decl_readonly_section.
	(rs6000_xcoff_section_type_flags): Use default_section_type_flags.
	* config/rs6000/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New.
	(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): Remove.
	(TARGET_SECTION_TYPE_FLAGS): Remove.
	* config/rs6000/xcoff.h (TARGET_ASM_RELOC_RW_MASK): New.

From-SVN: r122781
2007-03-09 16:53:09 -08:00
Lee Millward 767fad4cb9 ia64.c (ia64_expand_builtin): Use the new CALL_EXPR_FN macro for retrieving the function declaration of the...
* config/ia64/ia64.c (ia64_expand_builtin): Use the
	new CALL_EXPR_FN macro for retrieving the function 
	declaration of the input expression.

From-SVN: r122139
2007-02-19 22:39:13 +00:00
Steve Ellcey 86ad1da0d3 * config/ia64/ia64.c (ia64_print_operand): Fix compare strings.
From-SVN: r121530
2007-02-03 00:44:21 +00:00
Maxim Kuvyrkov f6ec1d1163 re PR target/29682 (ICE: in change_pattern, at haifa-sched.c:4066 with -O3 -msched-control-spec)
PR target/29682
	* config/ia64/ia64.c (ia64_speculate_insn): Restrict to memory loads to
	general or fp registers.  Add comments.
	* config/ia64/ia64.md (reg_pred_prefix): Add comment.

	PR target/29682
	* gcc-target/ia64/pr29682.c: New test.

From-SVN: r121510
2007-02-02 16:57:18 +00:00
Maxim Kuvyrkov b198261f9c re PR middle-end/28071 (A file that can not be compiled in reasonable time/space)
* sched-int.h (ds_to_dk, dk_to_ds): Declare functions.
	
	(struct _dep): New type.
	(dep_t): New typedef.
	(DEP_PRO, DEP_CON, DEP_KIND): New access macros.
	(DEP_STATUS): New access macro.  The macro with the same name was
	renamed to DEP_LINK_STATUS.
	(dep_init): Declare function

	(struct _dep_link): New type.
	(dep_link_t): New typedef.
	(DEP_LINK_NODE, DEP_LINK_NEXT, DEP_LINK_PREV_NEXTP): New access macros.
	(DEP_LINK_DEP, DEP_LINK_PRO, DEP_LINK_CON, DEP_LINK_KIND): New macros.
	(DEP_LINK_STATUS): New macro.
	(debug_dep_links): New debug function.

	(struct _deps_list): New type.
	(deps_list_t): New typedef.
	(DEPS_LIST_FIRST): New access macro.
	(FOR_EACH_DEP_LINK): New cycle macro.
	(create_deps_list, free_deps_list, delete_deps_list): Declare
	functions.
	(deps_list_empty_p, debug_deps_list, add_back_dep_to_deps_list): Ditto.
	(find_link_by_pro_in_deps_list, find_link_by_con_in_deps_list): Ditto.
	(copy_deps_list_change_con): Ditto.

	(move_dep_link): Declare function.

	(struct _dep_node): New type.
	(dep_node_t): New typedef.
	(DEP_NODE_BACK, DEP_NODE_DEP, DEP_NODE_FORW): New access macros.

	(struct haifa_insn_data.back_deps): New field to hold backward
	dependencies of the insn.
	(struct haifa_insn_data.depend): Rename to forw_deps.  Change its type
	to deps_list_t.
	(struct haifa_insn_data.resolved_deps): Rename to resolved_back_deps.
	Change its type	to deps_list_t.
	(INSN_BACK_DEPS): New access macro to use instead of LOG_LINKS.
	(INSN_DEPEND): Rename to INSN_FORW_DEPS.
	(RESOLVED_DEPS): Rename to INSN_RESOLVED_BACK_DEPS.

	(INSN_COST): Move to haifa-sched.c.  Use insn_cost () instead.
	
	(DEP_STATUS): Rename to DEP_LINK_STATUS.  Fix typo in the comment.

	(add_forw_dep, delete_back_forw_dep, insn_cost): Update declaration and
	all callers.
	(dep_cost): Declare.
	
	* sched-deps.c (CHECK): New macro to (en/dis)able sanity checks.
	(ds_to_dk, dk_to_ds): New functions.
	
	(init_dep_1): New static function.
	(init_dep): New function.
	(copy_dep): New static function.
	
	(dep_link_consistent_p, attach_dep_link, add_to_deps_list): New static
	functions.
	(detach_dep_link): New static function.
	(move_dep_link): New function.
	
	(dep_links_consistent_p, dump_dep_links): New static functions.
	(debug_dep_links): New debugging function.
	
	(deps_obstack, dl_obstack, dn_obstack): New static variables.
	
	(alloc_deps_list, init_deps_list): New static functions.
	(create_deps_list): New function.
	(clear_deps_list): New static function.
	(free_deps_list, delete_deps_list, deps_list_empty_p): New functions.
	(deps_list_consistent_p, dump_deps_list): New static functions.
	(debug_deps_list): New function.
	(add_back_dep_to_deps_list, find_link_by_pro_in_deps_list): New
	functions.
	(find_link_by_con_in_deps_list, copy_deps_list_change_con): Ditto.

	(maybe_add_or_update_back_dep_1, add_or_update_back_dep_1): Update to
	use new scheduler dependencies lists.
	(add_back_dep, delete_all_dependences, fixup_sched_groups): Ditto.
	(sched_analyze): Ditto.  Initialize dependencies lists.
	(add_forw_dep, compute_forward_dependences): Update to use new
	scheduler dependencies lists.
	
	(init_dependency_caches): Init deps_obstack.
	(free_dependency_caches): Free deps_obstack.
	
	(adjust_add_sorted_back_dep, adjust_back_add_forw_dep): Update to use
	new scheduler dependencies lists.
	(delete_forw_dep, add_or_update_back_forw_dep): Ditto.
	(add_back_forw_dep, delete_back_forw_dep): Ditto.

	* sched-rgn.c (set_spec_fed, find_conditional_protection, is_pfree):
	Update to use new scheduler dependencies lists.
	(is_conditionally_protected, is_prisky, add_branch_dependences): Ditto.
	(debug_dependencies): Ditto.
	(schedule_region): Update comments.
	
	* sched-ebb.c (earliest_block_with_similiar_load): Update to use new
	scheduler dependencies lists.
	(schedule_ebb): Update comments.
	
	* rtl.def (DEPS_LIST): Remove.
	
	* lists.c (unused_deps_list): Remove.
	(free_list): Update assertions.
	
	(alloc_DEPS_LIST, free_DEPS_LIST_list, free_DEPS_LIST_node): Remove.
	(remove_free_DEPS_LIST_elem, copy_DEPS_LIST_list): Ditto.

	* rtl.h (free_DEPS_LIST_list, alloc_DEPS_LIST): Remove declarations.
	(remove_free_DEPS_LIST_elem, copy_DEPS_LIST_list): Ditto.
	
	* haifa-sched.c (comments): Update.
	(insn_cost1): Remove.  Inline the code into insn_cost ().
	(insn_cost): Update to use new scheduler dependencies lists.  Move
	processing of the dependency cost to dep_cost ().
	(dep_cost): New function.  Use it instead of insn_cost () when
	evaluating cost of the dependency.  Use compatible interface to
	interact with the target.
	(priority): Update to use new scheduler dependencies lists.
	(rank_for_schedule): Ditto.  Optimize heuristic that prefers the insn
	with greater number of insns that depend on the insn.
	(schedule_insn): Update to use new scheduler dependencies lists.  Add
	code to free backward dependencies lists.  Inline and optimize code
	from resolve_dep () - see PR28071.
	(ok_for_early_queue_removal): Update to use new scheduler dependencies
	lists.  Update call to targetm.sched.is_costly_dependence hook.
	
	(fix_inter_tick, try_ready, fix_tick_ready): Update to use new
	scheduler dependencies lists.
	
	(resolve_dep): Remove.  Move the logic to schedule_insn ().
	(init_h_i_d): Initialize dependencies lists.
	
	(process_insn_depend_be_in_spec): Rename to
	process_insn_forw_deps_be_in_spec.  Update to use new scheduler
	dependencies lists.
	(add_to_speculative_block, create_check_block_twin, fix_recovery_deps):
	Update to use new scheduler dependencies lists.
	(clear_priorities, calc_priorities, add_jump_dependencies): Ditto.
	
	* ddg.c (create_ddg_dependence, create_ddg_dep_no_link): Update to use
	new scheduler dependencies lists.
	(build_intra_loop_deps): Ditto.
	
	* target.h (struct _dep): Declare to use in
	gcc_target.sched.is_costly_dependence.
	(struct gcc_target.sched.adjust_cost): Fix typo.
	(struct gcc_target.sched.is_costly_dependence): Change signature to use
	single dep_t parameter instead of an equivalent triad.
	(struct gcc_target.sched.adjust_cost_2): Remove.

	* target-def.h (TARGET_SCHED_ADJUST_COST_2): Remove.

	* reg-notes.def (DEP_TRUE, DEP_OUTPUT, DEP_ANTI): Update comments.

	* doc/tm.texi (TARGET_SCHED_IS_COSTLY_DEPENDENCE): Update
	documentation.
	(TARGET_SCHED_ADJUST_COST_2): Remove documentation.

	* doc/rtl.texi (LOG_LINKS): Remove part about instruction scheduler.
	(REG_DEP_TRUE): Document.
	
	* config/ia64/ia64.c (ia64_adjust_cost_2): Rename to ia64_adjust_cost.
	Change signature to correspond to the targetm.sched.adjust_cost hook.  
	Update use in TARGET_SCHED_ADJUST_COST_2.
	(TARGET_SCHED_ADJUST_COST_2): Rename to TARGET_SCHED_ADJUST_COST.
	(ia64_dependencies_evaluation_hook, ia64_dfa_new_cycle): Update to use
	new scheduler dependencies lists.
	(ia64_gen_check): Ditto.

	* config/mips/mips.c (vr4130_swap_insns_p): Update to use new scheduler
	dependencies lists.
	
	* config/rs6000/rs6000.c (rs6000_is_costly_dependence): Change
	signature to correspond to the targetm.sched.is_costly_dependence hook.
	(is_costly_group): Update to use new scheduler dependencies lists.

	* config/spu/spu.c (spu_sched_adjust_cost): Use insn_cost () function
	instead of INSN_COST () macro.

From-SVN: r121494
2007-02-02 09:11:11 +00:00
Steve Ellcey 7d52200069 re PR target/30182 (FAIL: gcc.dg/pr28796-2.c (test for excess errors))
PR other/30182
	* config/pa/pa.c (pa_init_builtins): Set asm names for finite routines.
	* config/ia64/ia64.c (ia64_init_builtins):  Ditto.

From-SVN: r121178
2007-01-25 17:06:55 +00:00
Steve Ellcey 812b587e9d target.h (globalize_decl_name): New.
* target.h (globalize_decl_name): New.
	* target-def.h (TARGET_ASM_GLOBALIZE_DECL_NAME): New.
	* output.h (default_globalize_decl_name): New.
	* varasm.c (asm_output_bss): Use globalize_decl_name instead of
	globalize_label.
        (globalize_decl): Ditto.
	(default_globalize_decl_name): New.
	* config/ia64/ia64.c (ia64_globalize_decl_name): New.
	(ia64_handle_version_id_attribute): New.
	(TARGET_ASM_GLOBALIZE_DECL_NAME): New.
	(ia64_asm_output_external): Use globalize_decl_name instead
	of globalize_label.
	* doc/extend.texi (version_id): New pragma.
	* doc/tm.texi (ARGET_ASM_GLOBALIZE_DECL_NAME): New target hook.

From-SVN: r121128
2007-01-24 19:40:12 +00:00
Andreas Schwab ae1e2d4caa re PR target/29166 (broken unwind information for many life variables resulting in register corruption)
PR target/29166
	* config/ia64/ia64.c (ia64_compute_frame_size): Account space for
	save of BR0 in extra_spill_size instead of spill_size.
	(ia64_expand_prologue): Save BR0 outside of the gr/br/fr spill
	area.
	(ia64_expand_epilogue): Restore BR0 from its new location.

testsuite/:
	* g++.dg/eh/pr29166.C: New test.

From-SVN: r120319
2007-01-01 22:03:23 +00:00
Kazu Hirata 2e226e6699 cgraphunit.c, [...]: Fix comment typos.
* cgraphunit.c, config/i386/i386.c, config/ia64/ia64.c, cse.c,
	output.h, toplev.c, tree-affine.h, tree-flow.h,
	tree-ssa-alias.c, tree-ssa-coalesce.c, tree-ssa-live.c,
	tree-ssa-live.h, tree-ssa-operands.c, tree-ssa-ter.c,
	tree-vrp.c, varpool.c: Fix comment typos.

From-SVN: r120137
2006-12-22 01:19:39 +00:00
Jakub Jelinek 4a4cd49c06 re PR target/30230 (Incorrect ia64 EH info when an EH region ends in the middle of a bundle)
PR target/30230
	* config/ia64/ia64.c (ia64_add_bundle_selector_before): New function.
	(bundling): Use it.

	* g++.dg/eh/ia64-2.C: New test.

From-SVN: r120103
2006-12-21 13:59:06 +01:00
H.J. Lu c47c29c896 re PR middle-end/17982 (stop calling assemble_external before final assembly output time)
2006-12-11  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/17982
	PR middle-end/20218
	* cgraphunit.c (cgraph_optimize): Remove call to
	process_pending_assemble_externals.

	* config/elfos.h (ASM_OUTPUT_EXTERNAL): New.

	* config/ia64/hpux.h (TARGET_ASM_FILE_END): Removed.

	* config/ia64/ia64.c (ia64_asm_output_external): Rewritten.
	(ia64_hpux_add_extern_decl): Removed.
	(ia64_hpux_file_end): Likewise.
	(extern_func_list): Likewise.
	(extern_func_head): Likewise.

	* output.h (assemble_external): Update comments.
	(default_elf_asm_output_external): New.
	(maybe_assemble_visibility): New.

	* toplev.c (compile_file): Update comment.

	* varasm.c (assemble_external): Always put it on
	pending_assemble_externals.
	(maybe_assemble_visibility): Make it extern and return int.
	(default_elf_asm_output_external): New.

From-SVN: r119764
2006-12-11 19:58:52 -08:00
Aldy Hernandez 07beea0df3 Merge gimple-tuples-branch into mainline.
From-SVN: r119546
2006-12-05 17:26:05 +00:00
Zdenek Dvorak 47eb5b329b params.c (set_param_value): Initialize the "set" field.
* params.c (set_param_value): Initialize the "set" field.
	* params.h (struct param_info): Add "set" field.
	(PARAM_SET_P): New macro.
	(PREFETCH_LATENCY, SIMULTANEOUS_PREFETCHES, L1_CACHE_SIZE,
	L1_CACHE_LINE_SIZE): New macros.
	* toplev.c (DEFPARAM): Initialize the "set" field.
	* tree-ssa-loop-prefetch.c (PREFETCH_LATENCY,
	SIMULTANEOUS_PREFETCHES): Removed.
	(PREFETCH_BLOCK): Use L1_CACHE_LINE_SIZE.
	(tree_ssa_prefetch_arrays): Dump the values of the parameters.
	* config/sparc/sparc.c: Include params.h.
	(sparc_override_options): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/sparc/sparc.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES):
	Removed.
	* config/i386/i386.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES):
	Removed.
	* config/i386/i386.c: Include params.h.
	(k8_cost): Change default value for SIMULTANEOUS_PREFETCHES.
	(override_options): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/sh/sh.h (SIMULTANEOUS_PREFETCHES): Removed.
	(OPTIMIZATION_OPTIONS): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/ia64/ia64.c (ia64_optimization_options): Set
	SIMULTANEOUS_PREFETCHES and L1_CACHE_LINE_SIZE parameters.
	* config/ia64/ia64.h (SIMULTANEOUS_PREFETCHES, PREFETCH_BLOCK):
	Removed.
	* params.def (PARAM_PREFETCH_LATENCY, PARAM_SIMULTANEOUS_PREFETCHES,
	PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE): New params.
	* doc/invoke.texi: Document new params.

From-SVN: r118728
2006-11-12 19:17:02 +00:00
Steve Ellcey bdbba3c27e ia64.c (ia64_hpux_init_libfuncs): Use HP-UX millicode routines for integer division.
* config/ia64/ia64.c (ia64_hpux_init_libfuncs):  Use HP-UX millicode
	routines for integer division.

From-SVN: r118632
2006-11-09 23:48:55 +00:00
Rafael Ávila de Espíndola c79efc4d2a decl.c: Include langhooks.h.
* gcc/java/decl.c: Include langhooks.h.
       (builtin_function): Remove.
       (java_init_decl_processing): Replace calls to builtin_function
       with add_builtin_function.

       * gcc/java/Make-lang.in (jc1$(exeext)): Depend on and link with
       attribs.o.
       (java/decl.o): Depend on langhooks.h.

       * gcc/java/java-tree.h (builtin_function): Remove.

       * gcc/tree.c (local_define_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/objc/objc-act.c (synth_module_prologue): Replace calls to
       builtin_function with add_builtin_function.
       (build_next_objc_exception_stuff): Replace calls to
       builtin_function with add_builtin_function.
       (build_objc_exception_stuff): Replace calls to
       builtin_function with add_builtin_function.

       * gcc/objcp/objcp-decl.h (objcp_builtin_function): Remove.

       * gcc/cp/decl.c (builtin_function_1): Move common code to
       add_builtin_function.
       (builtin_function): Rename to cxx_builtin_function.
       Change the signature.

       * gcc/cp/call.c: Include langhooks.h.
       (build_java_interface_fn_ref):  Replace calls to
       builtin_function with add_builtin_function.

       * gcc/cp/Make-lang.in (cp/call.o): Depend on langhooks.h.

       * gcc/cp/cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       cxx_builtin_function.

       * gcc/cp/cp-tree.h (builtin_function): Rename to cxx_builtin_function.
       Change the signature.

       * gcc/c-objc-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       c_builtin_function.

       * gcc/c-tree.h (builtin_function): Rename to c_builtin_function. Change
       the signature.

       * gcc/ada/utils.c (builtin_function): Rename to gnat_builtin_function.
       Move common code to add_builtin_function.

       * gcc/ada/misc.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       gnat_builtin_function.

       * gcc/ada/gigi.h (builtin_function): Rename to gnat_builtin_function.
       Change the signature.

       * gcc/c-decl.c (builtin_function): Rename to c_builtin_function. Move
       common code to add_builtin_function.

       * gcc/fortran/Make-lang.in (f951$(exeext)): Depend on and link with
       attribs.o.

       * gcc/fortran/trans.h (builtin_function): Rename to
       gfc_builtin_function. Change the signature.

       * gcc/fortran/f95-lang.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       gfc_builtin_function.
       (builtin_function): Rename to gfc_builtin_function. Move common
       code to builtin_function.
       (gfc_define_builtin): Replace calls to builtin_function with
       gfc_define_builtin.

       * gcc/langhooks.c (add_builtin_function): New function.
       (lhd_builtin_function): New function.

       * gcc/langhooks.h (struct lang_hooks): Change the signature of
       builtin_function.
       (add_builtin_function): New function.

       * gcc/treelang/treetree.c (builtin_function): Remove.

       * gcc/tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Replace
       calls to lang_hooks.builtin_function with add_builtin_function.

       * gcc/c-common.c (decl_builtin_1): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/alpha/alpha.c (alpha_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/frv/frv.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/s390/s390.c (s390_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/sparc/sparc.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/i386/i386.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.
       (def_builtin): Replace calls to lang_hooks.builtin_function with
       add_builtin_function.

       * gcc/config/sh/sh.c (sh_media_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/c4x/c4x.c (c4x_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/stormy16/stormy16.c (xstormy16_init_builtins):
       Replace calls to lang_hooks.builtin_function with
       add_builtin_function.

       * gcc/config/iq2000/iq2000.c (def_builtin):
       Replace calls to lang_hooks.builtin_function with
       add_builtin_function.

       * gcc/config/ia64/ia64.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/rs6000/rs6000.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.
       (altivec_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/arm/arm.c (def_mbuiltin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.
       (arm_init_tls_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/mips/mips.c (mips_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/bfin/bfin.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/langhooks-def.h (lhd_builtin_function): New function.
       (LANG_HOOKS_BUILTIN_FUNCTION): Define as lhd_builtin_function.

From-SVN: r117981
2006-10-23 19:47:58 +00:00
Steve Ellcey 7ab629664b re PR target/28490 (ICE in ia64_expand_move, at config/ia64/ia64.c:1088)
PR 28490
	* config/ia64/ia64.c (ia64_legitimate_constant_p): Allow function
	pointers as legitimate constants.

From-SVN: r117057
2006-09-19 16:09:48 +00:00
James E Wilson d0970db2ad Short term fix for PR 28490.
* config/ia64/ia64.c (ia64_legitimate_constant_p, cast CONST):
Handle symbol offsets same as they are handled in ia64_expand_move
and move_operand.

From-SVN: r116983
2006-09-15 16:05:40 -07:00
Jan Hubicka 2c9e13f37d predict.c (probability_reliable_p): New predicate.
* predict.c (probability_reliable_p): New predicate.
	(edge_probability_reliable_p, br_prob_note_reliable_p): Likewise.
	(predict_loops): Do not predict loop exit with less than 2%
	probability.
	* basic-block.h (edge_probability_reliable_p,
	br_prob_note_reliable_p): Declare.
	* ia64.h (ia64_print_operand): Do not disable on-chip branch
	prediction when static predictor is not reliable.
	* rs6000.c (output_cbranch): Likewise.

From-SVN: r116358
2006-08-23 22:29:14 +00:00
Maxim Kuvyrkov bb83aa4bef params.def (PARAM_MAX_SCHED_EXTEND_REGIONS_ITERS): Change default value to 0.
2006-06-06  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	* params.def (PARAM_MAX_SCHED_EXTEND_REGIONS_ITERS): Change default
	value to 0.
	* doc/invoke.texi (max-sched-extend-regions-iters): Document.
	* config/ia64/ia64.c (params.h): New header.
	(ia64_optimization_options): New function to adjust parameters.
	* config/ia64/ia64-protos.h (ia64_optimization_options): New prototype.
	* config/ia64/ia64.h (OPTIMIZATION_OPTIONS): New macro.
	* config/ia64/t-ia64 (ia64.o): Add dependence from params.h .

From-SVN: r114425
2006-06-06 09:44:17 +00:00
Steve Ellcey 1f4a2e84b4 re PR target/27051 (Compiler generates .sdata when -mno-sdata specified)
PR target/27051
	* config/ia64/ia64.c (ia64_select_rtx_section): Check TARGET_NO_SDATA.

From-SVN: r114390
2006-06-05 15:13:01 +00:00
Kazu Hirata 917f1b7ea3 builtins.c, [...]: Fix comment typos.
* builtins.c, config/arm/arm.c, config/i386/cygwin.h,
	config/i386/i386.c, config/ia64/ia64.c, config/s390/fixdfdi.h,
	config/sh/sh.c, config/sh/sh.h, df-scan.c, except.c,
	haifa-sched.c, optabs.c, rtl.h, sched-deps.c, sched-int.h,
	sched-rgn.c, tree-inline.h, tree-ssa-dom.c,
	tree-ssa-loop-prefetch.c, tree-ssa-operands.c,
	tree-vect-patterns.c, tree-vrp.c: Fix comment typos.  Follow
	spelling convensions.
	* config/ia64/ia64.opt, doc/contrib.texi, doc/invoke.texi,
	doc/passes.texi, doc/tm.texi, doc/tree-ssa.texi: Fix comment
	typos.  Follow spelling conventions.

From-SVN: r112782
2006-04-08 17:01:17 +00:00
Maxim Kuvyrkov a57aee2ab6 haifa-sched.c (choose_ready): Fix type of the local variable.
2006-03-23  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	* haifa-sched.c (choose_ready): Fix type of the local variable.
	Move local variables.  Add comment.
	(check_reg_live): Change signature.  Make callable from debugger.
	* sched-int.h (check_reg_live): Update signature.
	* sched-ebb.c (check_reg_live): Update parameters.
	* sched-rgn.c (check_reg_live): Ditto.
	(region_head_or_leaf_p): Check pointer before dereferencing.
	* config/ia64/ia64.c (ia64_set_sched_flags): Disable data speculation
	before reload on optimization levels below 1.

From-SVN: r112328
2006-03-23 18:23:53 +00:00
Maxim Kuvyrkov 048d0d36c2 ia64.c (stops_p): Added explicit initialization.
2006-03-16  Maxim Kuvyrkov <mkuvyrkov@ispras.ru>

        * config/ia64/ia64.c (stops_p): Added explicit initialization.
        (ia64_first_cycle_multipass_dfa_lookahead_guard_spec,
        ia64_h_i_d_extended, ia64_set_sched_flags, ia64_speculate_insn,
        ia64_needs_block_p, ia64_gen_check, ia64_sched_init_global,
	ia64_sched_finish_global): New static functions to implement
	hooks from gcc_target.sched.
	(spec_check_no, max_uid, pending_data_specs): New static variables.
        (ia64_mode_to_int, ia64_gen_spec_insn, ia64_spec_check_p,
	ia64_spec_check_src_p): New static functions.
        (ia64_adjust_cost): Renamed to ia64_adjust_cost_2.
        (TARGET_SCHED_ADJUST_COST): Removed.
        (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_INIT_GLOBAL,
	TARGET_SCHED_FINISH_GLOBAL, TARGET_SCHED_H_I_D_EXTENDED,
	TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P,
	TARGET_SCHED_GEN_CHECK,
	TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC,
        TARGET_SCHED_SET_SCHED_FLAGS): New macros.
        (update_set_flags, group_barrier_needed, set_src_needs_barrier):
	Fixed to handle speculation checks.
        (rtx_needs_barrier): Fixed to handle speculative loads and
        their checks.
        (ia64_variable_issue): Added code to count speculative loads and their
        checks.
        (ia64_first_cycle_multipass_dfa_lookahead_guard): Fixed to handle
        speculative loads.
        (enum SPEC_MODES, enum SPEC_GEN_LD_MAP, SPEC_GEN_CHECK_OFFSET):
        New enumerations.
        (SPEC_GEN_EXTEND_OFFSET, SPEC_N, SPEC_GEN_CHECK_MUTATION_OFFSET):
        New constants.
        (ia64_ld_address_bypass_p): Fixed to handle speculative loads.
	(ia64_reorg): Reset stops_p to NULL after it is freed.
        * config/ia64/ia64.md (UNSPEC_LDA, UNSPEC_LDS, UNSPEC_LDSA,
	UNSPEC_LDCCLR, UNSPEC_CHKACLR, UNSPEC_CHKS): New constants.
        (itanium_class): chk_s renamed to chk_s_i.  New constants: chk_s_f,
        chk_a.
        (data_speculative, control_speculative, check_load): New attributes.
        (mov<mode>_advanced, mov<mode>_speculative,
        mov<mode>_speculative_advanced, zero_extend<mode>di2_advanced,
        zero_extend<mode>di2_speculative,
        zero_extend<mode>di2_speculative_advanced): New patterns for
        data and control speculative loads.
        (mov<mode>_clr, zero_extend<mode>di2_clr): New patterns for
        check loads.
        (advanced_load_check_clr_<mode>, speculation_check_<mode>):
        New pattern for data and control speculation checks.
	(MODE, MODE_FOR_EXTEND, output_a, output_s, output_sa, output_c_clr,
	ld_reg_constr, ldc_reg_constr, chk_reg_constr, mem_constr,
	reg_pred_prefix, ld_class, chka_class, chks_class, attr_yes):
	Auxiliary definitions for the patterns.
        * config/ia64/itanium1.md (1_fldc, 1_fldpc, 1_ldc, 1_chk_s_f, 1_chk_a,
        1b_fldc, 1b_fldpc, 1b_ldc, 1b_chk_s_f, 1b_chk_a): New resource
        constraints.
	(1_fld, 1_fldp, 1_ld, 1b_fld, 1b_fldp, 1b_ld): Add a condition
        for speculation.
        (1_chk_s, 1b_chk_s): Renamed to 1_chk_s_i, 1b_chk_s_i.
        * config/ia64/itanium2.md (2_flda, 2_fldc, 2_fldpc, 2_ldc, 2_chk_s_f,
	2_chk_a, 2b_flda, 2b_fldc, 2b_fldpc, 2b_ldc, 2b_chk_s_f, 2b_chk_a):
	New resource constraints.
	(2_fld, 2_fldp, 2_ld, 2b_fld, 2b_fldp, 2b_ld): Add a condition
        for speculation.
        (2_chk_s, 2b_chk_s): Renamed to 2_chk_s_i, 2b_chk_s_i.
        * config/ia64/ia64.opt (msched-br-data-spec, msched-ar-data-spec,
        msched-control-spec, msched-br-in-data-spec, msched-ar-in-data-spec,
        msched-in-control-spec, msched-ldc, msched-control-ldc,
        msched-spec-verbose, msched-prefer-non-data-spec-insns,
        msched-prefer-non-control-spec-insns,
	msched-count-spec-in-critical-path): New flags to tune speculative
	scheduling.
	* doc/invoke.texi (msched-br-data-spec, msched-ar-data-spec,
        msched-control-spec, msched-br-in-data-spec, msched-ar-in-data-spec,
        msched-in-control-spec, msched-ldc, msched-control-ldc,
        msched-spec-verbose, msched-prefer-non-data-spec-insns,
        msched-prefer-non-control-spec-insns,
	msched-count-spec-in-critical-path): Document new flags.

From-SVN: r112129
2006-03-16 05:29:44 +00:00
Roger Sayle 0cc8f5c5a0 ia64.c (hfa_element_mode): Don't handle CHAR_TYPE.
* config/ia64/ia64.c (hfa_element_mode): Don't handle CHAR_TYPE.

From-SVN: r110686
2006-02-07 03:20:46 +00:00
Zdenek Dvorak 10d2256750 tree-vrp.c (execute_vrp): Do not pass dump argument to.
* tree-vrp.c (execute_vrp): Do not pass dump argument to.
	loop_optimizer_init and loop_optimizer_finalize
	* tree-ssa-sink.c (execute_sink_code): Ditto.
	* tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
	* tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init,
	tree_ssa_loop_done): Ditto.
	* tree-ssa-pre.c (init_pre, fini_pre): Ditto.
	* sched-ebb.c: Include output.h.
	(schedule_ebbs): Do not use dump argument.
	* value-prof.h (struct profile_hooks): Remove profile_dump_file.
	* loop.c (loop_dump_stream): Removed.
	(loop_optimize, rest_of_handle_loop_optimize): Do not use dump
	argument.
	(scan_loop, move_movables, find_and_verify_loops, mark_loop_jump,
	emit_prefetch_instructions, loop_bivs_find, loop_bivs_check,
	final_biv_value, loop_biv_eliminable_p, loop_givs_rescan,
	loop_iterations, strength_reduce, record_biv, record_giv,
	final_giv_value, check_final_value, check_ext_dependent_givs,
	combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems,
	try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use
	dump_file instead of loop_dump_stream.
	* ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call
	argument dump_file.
	* reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use
	dump argument.
	* flow.c (life_analysis, rest_of_handle_life): Ditto.
	* haifa-sched.c: Include output.h
	(schedule_insns, sched_init): Do not use dump argument.
	* mode-switching.c (optimize_mode_switching): Ditto.
	* modulo-sched.c (stats_file): Removed.
	(print_node_sched_params): Do not call argument dump_file.
	(sms_schedule_by_order, loop_canon_p, sms_schedule,
	rest_of_handle_sms): Do not use dump argument.  Use dump_file instead
	of stats_file.
	* cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not
	use dump argument.
	* loop-init.c (loop_optimizer_init, loop_optimizer_finalize,
	rtl_loop_init, rtl_loop_done): Ditto.
	* global.c (global_alloc, rest_of_handle_global_alloc): Ditto.
	* predict.c (combine_predictions_for_bb, tree_estimate_probability):
	Ditto.
	* recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto.
	* lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto.
	* regmove.c (fixup_match_1, fixup_match_2, regmove_optimize,
	rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto.
	* emit-rtl.c (renumber_insns): Ditto.
	* cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr,
	expand_gimple_basic_block, tree_expand_cfg): Ditto.
	* regclass.c (regclass): Ditto.
	* tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts,
	remove_ssa_form, rewrite_out_of_ssa): Ditto.
	* reg-stack.c (compensate_edge, compensate_edges, convert_regs_1,
	convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs):
	Ditto.
	* sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto.
	* local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file
	to regclass.
	* gcse.c (gcse_file, debug_stderr): Removed.
	(gcse_main, bypass_jumps, rest_of_handle_jump_bypass,
	rest_of_handle_gcse): Do not use dump argument.
	(cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets,
	one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb,
	pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass,
	compute_code_hoist_vbeinout, compute_code_hoist_data,
	one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores,
	compute_store_table, build_store_vectors, insert_insn_start_bb,
	insert_store, remove_reachable_equiv_notes, replace_store_insn,
	store_motion): Use dump_file instead of gcse_file.
	* ipa-type-escape.c (type_escape_execute): Remove debugging comments.
	* profile.c (profile_dump_file): Removed.
	(branch_prob): Use dump_file instead of profile_dump_file.
	* ipa.c (cgraph_remove_unreachable_nodes): Do not call argument
	dump_file.
	* tree-ssa-copy.c (dump_copy_of): Ditto.
	* rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass
	dump file to life_analysis.
	* bt-load.c (branch_target_load_optimize): Ditto.
	* cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to
	renumber_insns.
	* rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs,
	regclass, dbr_schedule): Declaration changed.
	* sched-int.h (sched_init): Declaration changed.
	* tree-profile.c (tree_profile_dump_file): Removed.
	(tree_profile_hooks): Removed profile_dump_file hook.
	* rtl-profile (rtl_profile_dump_file): Removed.
	(rtl_profile_hooks): emoved profile_dump_file hook.
	* cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration
	changed.
	* c-gimplify.c (c_genericize): Do not call local variable dump_file.
	* tree-cfg.c (build_tree_cfg): Ditto.
	* Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency.
	* basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm):
	Declaration changed.
	* config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to
	life_analysis and schedule_insns.
	* config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to
	life_analysis.
	* config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to
	dbr_schedule.
	* config/mips/mips.c (mips_reorg): Ditto.
	* config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to
	schedule_ebbs.

From-SVN: r110656
2006-02-06 18:20:47 +00:00
Alexandre Oliva 3a3315f7cc Add 2006 to copyright line
From-SVN: r110595
2006-02-04 22:10:43 +00:00
Alexandre Oliva 658f32fda2 re PR debug/24444 (invalid register in debug info)
PR debug/24444
* config/ia64/ia64.c: Include debug.h.
(MAX_ARTIFICIAL_LABEL_BYTES): New.
(ia64_label_after_insn, ia64_dwarf2out_def_steady_cfa): New.
(IA64_CHANGE_CFA_IN_EPILOGUE): Define to 0.
(process_epilogue, process_set, process_for_unwind_directive):
Output unwind info only if requested.  Add CFA info if requested.
Add new arguments as needed.  Adjust callers.
* config/ia64/ia64.h (ARG_POINTER_CFA_OFFSET): Override
incorrect default.
(DWARF2_FRAME_INFO): Define to zero.
* config/ia64/unwind-ia64.c: Remove code that compensated for
the CFA offset error fixed above.
* config/ia64/t-ia64 (ia64.o): Depend on debug.h.
* dwarf2out.c (DWARF2_FRAME_INFO): Define default.
(dwarf2out_do_frame): Require nonzero DWARF2_UNWIND_INFO for
-funwind-tables and -fexceptions to enable frame info.
(dwarf2out_frame_init): Define initial CFA even if
DWARF2_UNWIND_INFO is disabled.  Call initial_return_save if
DWARF2_UNWIND_INFO is nonzero, not just defined.
(dwarf2out_frame_finish): Output non-EH call frame info only
if DWARF2_FRAME_INFO is nonzero.
(convert_cfa_to_loc_list,
compute_frame_pointer_to_cfa_displacement): Define even if
unwind info is not supported.
(gen_subprogram_die): Use the above unconditionally.  Remove
legacy alternate code.
* toplev.c (compile_file): Compile in call to
dwarf2out_frame_finish if DWARF2_DEBUGGING_INFO is defined.
(lang_dependent_init): Ditto for dwarf2out_frame_init.

From-SVN: r110594
2006-02-04 22:08:04 +00:00
Joseph Myers 4a73d8657b re PR other/25028 (TImode-to-floating conversions broken)
PR other/25028
	* libgcc2.h (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Define.
	* libgcc2.c (__floatdixf, __floatundixf, __floatditf,
	__floatunditf): Use #error if type sizes don't match requirements
	of implementation.
	(__floatdisf, __floatdidf): Unify.  Possibly use XFmode or TFmode
	as wider floating-point type.  Use #error if type sizes don't
	match requirements of implementation.  Avoid overflow in computing
	Wtype_MAXp1_F * Wtype_MAXp1_F.  When special casing conversion,
	shift one more bit.  Cast 1 to DWtype or UDWtype for shifting.
	(__floatundisf, __floatundidf): Likewise.
	* config/ia64/hpux.h (XF_SIZE, TF_SIZE): Define.
	* config/ia64/ia64.c (ia64_init_libfuncs): Use
	_U_Qfcnvfxt_quad_to_quad and _U_Qfcnvxf_quad_to_quad for
	TFmode-TImode conversions.
	* doc/tm.texi (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Document.

testsuite:
	* gcc.dg/torture/fp-int-convert-timode.c: Only XFAIL for LP64 IA64
	HP-UX.

From-SVN: r108598
2005-12-15 21:50:10 +00:00
Richard Sandiford d6b5193bfc alpha.c (alpha_start_function): Use switch_to_section.
* config/alpha/alpha.c (alpha_start_function): Use switch_to_section.
	(alpha_elf_select_rtx_section): Return the selected section rather
	than emitting assembly code.
	(alpha_write_linkage): Emit a ".link" directive directly and then
	set in_section to NULL.
	(vms_asm_out_constructor): Use switch_to_section.
	(vms_asm_out_destructor): Likewise.
	(unicosmk_output_common): Set in_section to NULL instead of calling
	the dummy common_section function.
	(unicosmk_text_section): Delete in favor of...
	(unicosmk_output_text_section_asm_op): ...this new function.
	(unicosmk_data_section): Delete in favor of...
	(unicosmk_output_data_section_asm_op): ...this new function.
	(unicosmk_init_sections): New function.
	(unicosmk_output_deferred_case_vectors): Use switch_to_section.
	(unicosmk_output_ssib): Set in_section to NULL instead of calling
	the dummy ssib_section function.
	(unicosmk_section_buf): Delete.
	* config/alpha/alpha-protos.h (unicosmk_text_section): Delete.
	(unicosmk_data_section): Delete.
	* config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section)
	(SECTION_FUNCTION_TEMPLATE): Delete.
	* config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP)
	(READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete.
	(ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP)
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(link_section, literals_section): Delete.
	(ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then
	set in_section to NULL.

	* config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete.
	(COMMON_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling
	the dummy common_section function.
	* config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	* config/arm/arm.c (get_jump_table_size): Use pointer comparison
	between readonly_data_section and text_section to check whether
	read-only data is being put in the text section.
	(arm_output_function_epilogue): Use switch_to_section.
	(arm_elf_asm_constructor): Likewise.
	(thumb_call_via_reg): Replace call to in_text_section with
	a comparison between in_section and text_section.
	(arm_file_end): Use switch_to_section.
	(aof_text_section): Delete in favor of...
	(aof_output_text_section_asm_op): ...this new function.
	(aof_data_section): Delete in favor of...
	(aof_output_data_section_asm_op): ...this new function.
	(aof_asm_init_sections): New function.
	(zero_init_section): Moved from config/arm/aof.h.
	(aof_dump_imports, aof_file_start): Use switch_to_section.
	* config/arm/arm.h (thumb_call_via_label): Update comment.
	* config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete.
	(common_section): Delete.
	* config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.
	(ASM_DECLARE_OBJECT_NAME): Update the type of save_section.  Use the
	global switch_to_section function instead of the old port-local one.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION)
	(SWITCH_TO_SECTION_FUNCTION): Delete.
	(drectve_section): Redefine as a macro.
	* config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS):
	(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and
	switch_to_section.

	* config/avr/avr.c (progmem_section): New variable.
	(avr_output_progmem_section_asm_op): New function.
	(avr_asm_init_sections): New function.
	(avr_output_addr_vec_elt): Use switch_to_section.
	* config/avr/avr.h (progmem_section): Declare.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(READONLY_DATA_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_OUTPUT_CASE_LABEL): Use switch_to_section.
	* config/avr/avr-protos.h (progmem_section): Delete.

	* config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section.

	* config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete.

	* config/darwin-sections.def: New file.
	* config/darwin.c: Define all sections in darwin-sections.def.
	(output_objc_section_asm_op, darwin_init_sections): New functions.
	(machopic_output_indirection): Use switch_to_section.
	(machopic_select_section): Return the selected section rather than
	emitting assembly code.  Replace the static function table with
	inline conditional expressions.  Update the tests of last_text_section
	and move them into the FUNCTION_DECL block.
	(machopic_select_rtx_section): Return the selected section rather than
	emitting assembly code.
	(machopic_asm_out_constructor, machopic_asm_out_destructor)
	(darwin_file_end): Use switch_to_section.
	* config/darwin.h: Use darwin-sections.def to declare sections.
	(INIT_SECTION_ASM_OP): Remove empty definition.
	(HAS_INIT_SECTION): Define this instead.
	(SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete.
	(TARGET_ASM_EH_FRAME_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/darwin-protos.h (darwin_init_sections): Declare.
	(machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section)
	(machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete.
	(machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section)
	(constructor_section, destructor_section, mod_init_section): Delete.
	(mod_term_section): Delete.
	(darwin_exception_section, darwin_eh_frame_section): Delete.
	(machopic_select_section): Return a section.
	(machopic_select_rtx_section): Likewise.
	(text_coal_section, text_unlikely_section, text_unlikely_coal_section)
	(const_section, const_coal_section, const_data_section): Delete.
	(const_data_coal_section, data_coal_section, cstring_section): Delete.
	(literal4_section, literal8_section, constructor_section): Delete.
	(mod_init_section, mod_term_section, destructor_section): Delete.
	(objc_class_section, objc_meta_class_section, objc_category_section)
	(objc_class_vars_section, objc_instance_vars_section): Delete.
	(objc_cls_meth_section, objc_inst_meth_section): Delete.
	(objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete.
	(objc_selector_refs_section, objc_selector_fixup_section): Delete.
	(objc_symbols_section, objc_module_info_section): Delete.
	(objc_image_info_section, objc_protocol_section): Delete.
	(objc_string_object_section, objc_constant_string_object_section)
	(objc_class_names_section, objc_meth_var_names_section): Delete.
	(objc_meth_var_types_section, objc_cls_refs_section): Delete.
	(machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section)
	(machopic_symbol_stub_section, machopic_picsymbol_stub_section)
	(darwin_exception_section, darwin_eh_frame_section): Delete.
	* config/t-darwin (darwin.o): Depend on config/darwin-sections.def.

	* config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section.
	(frv_asm_out_destructor): Likewise.
	* config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete.
	(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and
	get_named_section.
	(ASM_OUTPUT_CASE_LABEL): Use switch_to_section.
	* config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section)
	(data_section): Delete.

	* config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(DRECTVE_SECTION_FUNCTION): Delete.
	(drectve_section): Redefine as a macro that sets in_section after
	emitting the directive.
	(SWITCH_TO_SECTION_FUNCTION): Delete.
	* config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to
	in_text_section with comparison between in_section and text_section.
	* config/i386/i386.c (x86_64_elf_select_section): Return the section
	rather than emitting assembly code.  Use get_named_section.
	(x86_output_aligned_bss, ix86_file_end): Use switch_to_section and
	get_named_section.
	(machopic_output_stub): Use switch_to_section.
	* config/i386/nwld.c (nwld_named_section_asm_out_constructor)
	(nwld_named_section_asm_out_destructor): Use get_section and
	switch_to_section.

	* config/ia64/ia64.c (ia64_select_rtx_section): Return the section
	rather than emitting assembly code.
	(ia64_rwreloc_select_section): Likewise.
	(ia64_rwreloc_select_rtx_section): Likewise.
	* config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete.
	* config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use
	switch_to_section.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete.

	* config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the
	section rather than emitting assembly code.
	(iq2000_select_section): Likewise.
	* config/iq2000/iq2000.h (rdata_section, sdata_section): Delete.
	(sbss_section): Delete.

	* config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section
	and get_named_section.
	* config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete.

	* config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete.
	(SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete.
	(EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete.
	(MCORE_EXPORT_NAME): Emit the exports directive directly, then set
	in_section to NULL.
	(ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.
	(ASM_DECLARE_OBJECT_NAME): Update the type of save_section.  Use the
	global switch_to_section function instead of the old port-local one.
	* config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(SWITCH_SECTION_FUNCTION): Delete.
	* config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete.
	(DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete.
	(SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete.
	(MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set
	in_section to NULL.
	(ASM_DECLARE_OBJECT_NAME): Update the type of save_section.  Use the
	global switch_to_section function instead of the old port-local one.
	(ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.

	* config/mips/mips.c (mips_file_start): Update comment.
	(mips_output_aligned_bss): Use switch_to_section and get_named_section.
	(mips_output_aligned_decl_common): Use switch_to_section.
	(mips_select_rtx_section): Return the section rather than emitting
	assembly code.  Use get_named_section.
	(mips_function_rodata_section: Likewise get_section.
	(build_mips16_function_stub): Use switch_to_section.
	* config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section.
	(SDATA_SECTION_ASM_OP): Delete.
	* config/mips/vxworks.h (EXTRA_SECTIONS): Delete.
	(EXTRA_SECTION_FUNCTIONS): Delete.

	* config/mmix/mmix.c (mmix_file_start, mmix_file_end)
	(mmix_asm_output_aligned_local): Use switch_to_section.

	* config/pa/pa.c (som_readonly_data_section, som_one_only_data_section)
	(som_one_only_readonly_data_section): New variables.
	(pa_output_function_epilogue): Set in_section to NULL instead of
	calling forget_section.
	(output_deferred_plabels): Use select_section.
	(pa_asm_output_mi_thunk): Likewise.  Set in_section to NULL instead
	of calling forget_section.
	(pa_asm_output_aligned_bss, pa_asm_output_aligned_common)
	(pa_asm_output_aligned_local): Use select_section.
	(som_text_section_asm_op): Delete in favor of...
	(som_output_text_section_asm_op): ...this new function.
	(pa_som_asm_init_sections): New function.
	(pa_select_section): Return the section rather than emitting
	assembly code.
	* config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(SOM_READONLY_DATA_SECTION_FUNCTION): Delete.
	(SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete.
	(SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete.
	* config/pa/pa-protos.h (som_text_section_asm_op): Delete.
	(som_readonly_data_section, som_one_only_readonly_data_section)
	(som_one_only_data_section, forget_section): Delete.
	* config/pa/som.h (TEXT_SECTION_ASM_OP): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete.

	* config/rs6000/rs6000.c (read_only_data_section): New variable.
	(private_data_section, read_only_private_data_section): New variables.
	(sdata2_section, toc_section): New variables.
	(rs6000_file_start): Use switch_to_section.
	(rs6000_assemble_integer): Use comparisons against in_section
	instead of calling in_toc_section and in_text_section.  Use
	unlikely_text_section_p.
	(rs6000_elf_output_toc_section_asm_op): New function, derived
	from the old rs6000/sysv4.h toc_section function.
	(rs6000_elf_asm_init_sections): New function.
	(rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return
	the section rather than emitting assembly code.
	(machopic_output_stub): Use switch_to_section.
	(toc_section): Delete dummy function.
	(rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use
	switch_to_section and get_section.
	(rs6000_xcoff_output_readonly_section_asm_op): New function.
	(rs6000_xcoff_output_readwrite_section_asm_op): New function.
	(rs6000_xcoff_output_toc_section_asm_op): New function, derived from
	the old rs6000/xcoff.h toc_section function.
	(rs6000_xcoff_asm_init_sections): New function.
	(rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return
	the section rather than emitting assembly code.
	(rs6000_xcoff_file_start): Use switch_to_section.
	(rs6000_xcoff_file_end): Likewise.
	* config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete.
	(sdata2_section, sbss_section, private_data_section): Delete.
	(read_only_data_section, read_only_private_data_section): Delete.
	* config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION)
	(SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete.
	(FINI_SECTION_FUNCTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	* config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION)
	(READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION)
	(READONLY_DATA_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.  Set in_section
	to NULL rather than no_section.
	(TARGET_ASM_EXCEPTION_SECTION): Delete.

	* config/sh/sh.c (sh_file_start): Use switch_to_section.

	* config/sparc/sparc.c (emit_pic_helper): Use switch_to_section.
	(sparc_output_deferred_case_vectors): Likewise.  Remove argument
	from call to current_function_section.

	* config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h.
	(bss100_section): New variable.
	(xstormy16_asm_output_aligned_common): Use switch_to_section.
	(xstormy16_asm_init_sections): New function.
	(xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use
	switch_to_section and get_section.
	(xstormy16_output_addr_vec): Use switch_to_section.  Remove argument
	from calls to current_function_section.
	* config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete.
	(XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/stormy16/stormy16-protos.h (bss100_section): Delete.

	* config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION)
	(FINI_SECTION_FUNCTION): Delete.

	* config/v850/v850.c: Include gt-v850.h.
	(rosdata_section, rozdata_section, tdata_section, zdata_section)
	(zbss_section): New variables.
	(v850_output_aligned_bss): Use switch_to_section.
	(v850_asm_init_sections): New function.
	(v850_select_section): Return the section rather than emitting
	assembly code.
	* config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP)
	(ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/v850/v850-protos.h (sdata_section, rosdata_section): Delete.
	(sbss_section, tdata_section, zdata_section, rozdata_section): Delete.
	(zbss_section): Delete.

	* config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section.

	* config/vx-common.h (vxworks_exception_section): Delete.
	(TARGET_ASM_EXCEPTION_SECTION): Delete.

	* config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the
	section rather than emitting assembly code.
	* config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use
	switch_to_section.

	* Makefile.in (GTFILES): Add $(srcdir)/output.h.
	* coretypes.h (section): New union and typedef.
	* dbxout.c (FORCE_TEXT): Use switch_to_section.  Remove argument
	from call to current_function_section.
	(dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish)
	(dbxout_symbol_location): Use switch_to_section.
	* dwarf2out.c (named_section_eh_frame_section): Delete, moving
	most of the code into...
	(default_eh_frame_section): ...here.  Return a section.
	(collect2_eh_frame_section): Delete, moving most of the code into..
	(switch_to_eh_frame_section): ...this new function.
	(debug_info_section, debug_abbrev_section, debug_aranges_section)
	(debug_macinfo_section, debug_line_section, debug_loc_section)
	(debug_pubnames_section, debug_str_section, debug_ranges_section): New
	variables.
	(output_call_frame_info): Call switch_to_eh_frame_section instead of
	eh_frame_section.  Use switch_to_section and get_section.
	(dwarf2out_begin_prologue): Use switch_to_section.
	(AT_string_form): Check the flags in debug_str_section instead of
	DEBUG_STR_SECTION_FLAGS.
	(output_comp_unit): Use switch_to_section, get_section, and
	debug_info_section.
	(output_line_info, secname_for_decl): Use unlikely_text_section_p.
	(dwarf2out_begin_block): Use switch_to_section.  Remove argument
	from call to current_function_section.
	(dwarf2out_var_location): Use unlikely_text_section_p.
	(dwarf2out_source_line): Use switch_to_section.  Remove argument
	from call to current_function_section.
	(dwarf2out_start_source_file, dwarf2out_end_source_file)
	(dwarf2out_define, dwarf2out_undef: Use switch_to_section and
	debug_macinfo_section.
	(dwarf2out_init): Initialize the new section variables.  Use them
	instead of calls to named_section_flags.  Use switch_to_section.
	(output_indirect_string): Use switch_to_section and debug_str_section.
	(dwarf2out_finish): Use switch_to_section and the new section
	variables.
	* except.c (default_exception_section): Return the section instead
	of emitting assembly code.
	(output_function_exception_table): Use the global exception_section
	variable instead of the target hook.  Use switch_to_section.  Remove
	argument from call to current_function_section.
	* final.c (HAVE_READONLY_DATA_SECTION): Delete.
	(shorten_branches): Use pointer comparisons to detect whether the
	text section is the same as readonly_data_section.
	(profile_function): Use switch_to_section.  Remove argument from
	call to current_function_section.
	(final_scan_insn): Likewise.  Update use of last_text_section.
	* gengtype.c (open_base_files): Add an include of output.h.
	* output.h (text_section, data_section, readonly_data_section)
	(ctors_section, dtors_section, bss_section, init_section)
	(fini_section, sdata_section): Turn into section pointers.
	(in_text_section, in_unlikely_text_section, exports_section)
	(drectve_section, named_section, mergeable_string_section)
	(last_text_section_name): Delete.
	(default_exception_section, default_eh_frame_section): Return sections.
	(SECTION_DECLARED, SECTION_NAMED): New macros.
	(SECTION_MACH_DEP): Bump value.
	(section_common, named_section, unnamed_section): New structures.
	(unnamed_section_callback): New typedef.
	(section): New union.
	(sbss_section, exception_section, eh_frame_section): New variables.
	(in_section, last_text_section): Turn into section pointers.
	(get_unnamed_section, get_section, get_named_section): New functions.
	(mergeable_constant_section, function_section): Return a section.
	(unlikely_text_section): Likewise.
	(current_function_section): Likewise.  Remove the decl argument.
	(unlikely_text_section_p, switch_to_section): New functions.
	(output_section_asm_op): New function.
	(set_named_section_flags, named_section_flags, named_section_real)
	(named_section_first_declaration): Delete.
	(default_select_section, default_elf_select_section): Return a section.
	(default_elf_select_section_1, default_function_rodata_section)
	(default_no_function_rodata_section, default_select_rtx_section)
	(default_elf_select_rtx_section): Likewise.
	* rtl.h (in_data_section): Delete.
	* sdbout.c (sdbout_one_type): Use switch_to_section.
	* system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison.
	(READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison.
	(TARGET_ASM_EH_FRAME_SECTION): Poison.
	* target-def.h (TARGET_ASM_INIT_SECTIONS): New macro.
	(TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete.
	(TARGET_ASM_OUT): Update after above changes.
	* target.h (init_sections): New hook.
	(exception_section, eh_frame_section): Delete.
	(select_section, select_rtx_section, function_rodata_section): Return
	a section rather than emitting assembly code.
	* varasm.c (text_section, data_section, readonly_data_section)
	(ctors_section, dtors_section, bss_section, init_section)
	(fini_section): Turn into section pointers.
	(sdata_section, sbss_section, exception_section): New variables.
	(eh_frame_section): New variable.
	(in_section): Make global and turn into a section pointer.
	(last_text_section): Turn into a section pointer.
	(unnamed_sections): New variable.
	(in_named_name, last_text_section_name): Delete.
	(EXTRA_SECTION_FUNCTIONS): Delete.
	(in_named_entry): Delete.
	(section_htab): New variable, replacing...
	(in_named_htab): ...this deleted variable.
	(section_entry_eq, section_entry_hash): New functions, based on...
	(in_named_entry_eq, in_named_entry_hash): ...these deleted functions.
	(get_unnamed_section, get_section): New functions.
	(unlikely_text_section): Return a section instead of emitting
	assembly code.
	(in_text_section, in_unlikely_text_section, in_data_section): Delete.
	(get_named_section_flags, named_section_first_declaration): Delete.
	(unlikely_text_section_p): New function.
	(named_section_real, named_section): Delete.
	(get_named_section): New function.
	(asm_output_bss, asm_output_aligned_bss): Use switch_to_section.
	(function_section): Return a section rather than emitting
	assembly code.
	(current_function_section): Likewise.  Remove argument.  Use
	last_text_section if nonnull, otherwise use function_section.
	(default_function_rodata_section): Return a section rather than
	emitting assembly code.  Use get_section.
	(default_no_function_rodata_section): Return a section rather than
	emitting assembly code.
	(variable_section): Use switch_to_section and get_named_section.
	(mergeable_string_section): Return a section rather than emitting
	assembly code.  Use get_section.  Make static.  Don't take special
	countermeasures for empty strings.
	(mergeable_constant_section): Return a section rather than emitting
	assembly code.  Use get_section.
	(default_named_section_asm_out_destructor): Use switch_to_section
	and get_section.
	(default_dtor_section_asm_out_destructor): Use switch_to_section.
	(default_named_section_asm_out_constructor): Use switch_to_section
	and get_section.
	(default_ctor_section_asm_out_constructor): Use switch_to_section.
	(assemble_start_function): Likewise.  Set last_text_section to
	NULL rather than no_section.  Change the type of save_section.
	(assemble_zeros, assemble_variable): Use the section flags to detect
	whether or not a section is text.
	(assemble_static_space): Use switch_to_section.
	(assemble_trampoline_template): Likewise.
	(output_constant_def_contents): Use switch_to_section and
	get_named_section.
	(output_constant_pool_1): Use switch_to_section.  Use the section
	flags to see whether sections contain mergeable data.
	(init_varasm_once): Initialize section_htab instead of in_named_htab.
	Initialize new section variables.  Call TARGET_ASM_INIT_SECTIONS.
	(default_elf_asm_named_section): Use SECTION_DECLARED to detect
	whether a section has already been declared.
	(default_select_section, default_elf_select_section): Return a
	section rather than emitting assembly code.
	(default_elf_select_section_1): Likewise.  Use bss_section for
	SECCAT_BSS if nonnull.  Use get_named_section.
	(default_select_rtx_section): Return a section rather than
	emitting assembly code.
	(default_elf_select_rtx_section): Likewise.  Use get_named_section.
	(file_end_indicate_exec_stack): Use switch_to_section and get_section.
	(output_section_asm_op, switch_to_section): New functions.
	* vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and
	get_named_section.

	* doc/tm.texi: Expand the introduction to the sections documentation.
	(TRAMPOLINE_SECTION): Document new interface.
	(SDATA_SECTION_ASM_OP): Document new macro.
	(READONLY_DATA_SECTION): Delete.
	(SDATA_SECTION_ASM_OP): Document new macro.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(TARGET_ASM_INIT_SECTIONS): Document new hook.
	(TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION)
	(TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface.
	(TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete.

gcc/java/
	* class.c (build_utf8_ref, emit_register_classes): Use
	switch_to_section and get_section.

From-SVN: r108152
2005-12-07 07:53:14 +00:00
Richard Guenther 47a25a46d3 alpha.c (alpha_va_start, [...]): Use buildN and fold_buildN where applicable.
2005-12-02  Richard Guenther  <rguenther@suse.de>

	* config/alpha/alpha.c (alpha_va_start, alpha_gimplify_va_arg_1i,
	alpha_gimplify_va_arg): Use buildN and fold_buildN where applicable.
	* config/frv/frv.c (frv_expand_builtin_va_start): Likewise.
	* config/s390/s390.c (s390_va_start, s390_gimplify_va_arg): Likewise.
	* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
	* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
	* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg):
	Likewise.
	* config/sh/sh.c (sh_va_start, sh_gimplify_va_arg_expr,
	sh_adjust_unroll_max): Likewise.
	* config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise.
	* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
	* config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr):
	Likewise.
	* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
	Likewise.
	* config/mips/mips.c (mips_va_start, mips_gimplify_va_arg_expr):
	Likewise.

From-SVN: r107906
2005-12-02 17:06:50 +00:00
Jakub Jelinek b15b83fb3b ia64.c (ia64_expand_tls_address): Add ORIG_OP1 argument.
* config/ia64/ia64.c (ia64_expand_tls_address): Add ORIG_OP1 argument.
	Move ADDEND_{HI,LO} computation into TLS_MODEL_INITIAL_EXEC case.
	(ia64_expand_move): Adjust caller.

	* gcc.dg/tls/opt-11.c: New test.

From-SVN: r107704
2005-11-30 09:32:16 +01:00
Jakub Jelinek dca1376799 ia64.c (ia64_expand_atomic_op): Only use fetchadd{4,8}.acq instruction if CODE is PLUS or MINUS...
* config/ia64/ia64.c (ia64_expand_atomic_op): Only use
	fetchadd{4,8}.acq instruction if CODE is PLUS or MINUS, for MINUS
	negate VAL.

From-SVN: r107703
2005-11-30 09:30:48 +01:00
Joseph Myers 2a3ebe774c floatunsisf.c, [...]: New files.
* config/floatunsisf.c, config/floatunsidf.c,
	config/floatunsixf.c, config/floatunsitf.c: New files.
	* config/ia64/t-hpux: Add floatunsitf.c.
	* config/ia64/ia64.c (ia64_init_libfuncs): Use
	_U_Qfcnvxuf_dbl_to_quad for unsigned DImode-to-TFmode conversion.

From-SVN: r107558
2005-11-27 01:40:01 +00:00
Andreas Schwab 6819a4637b re PR target/24757 (__sync_fetch_and_add on ia64)
PR target/24757
	* config/ia64/ia64.c (ia64_expand_atomic_op): Fix condition of cmp
	insn.

From-SVN: r107246
2005-11-20 10:43:43 +00:00
Eric Botcazou 3ab997e838 expmed.c (extract_bit_field): Do not use insv/extv/extzv patterns if the bitsize is zero.
* expmed.c (extract_bit_field): Do not use insv/extv/extzv patterns
	if the bitsize is zero.
	* doc/md.texi (Standard Pattern Names): Document it.

	* config/ia64/ia64.c (ia64_pass_by_reference): Delete.
	(TARGET_PASS_BY_REFERENCE): Likewise.

From-SVN: r106605
2005-11-07 19:14:02 +00:00
Eric Botcazou 694a2f6ea6 ia64.c (ia64_output_function_profiler): Emit an indirect call to _mcount if the function needs a static chain.
* config/ia64/ia64.c (ia64_output_function_profiler): Emit an
	indirect call to _mcount if the function needs a static chain.

From-SVN: r105917
2005-10-26 07:25:57 +00:00
Richard Henderson e898620c39 ia64.c (ia64_expand_widen_sum): New.
* config/ia64/ia64.c (ia64_expand_widen_sum): New.
        (ia64_expand_dot_prod_v8qi): New.
        * config/ia64/ia64-protos.h: Update.
        * config/ia64/vect.md (pmpy2_r, pmpy2_l, widen_usumv8qi3,
        widen_usumv4hi3, widen_ssumv8qi3, widen_ssumv4hi3, udot_prodv8qi,
        sdot_prodv8qi, sdot_prodv4hi): New.
        (reduc_splus_v2sf): Rename from reduc_plus_v2sf.

From-SVN: r104426
2005-09-19 10:20:02 -07:00
Kazu Hirata a4d0554781 Makefile.in, [...]: Fix comment/doc typos.
* Makefile.in, cfgexpand.c, cfgloop.h, cfgloopmanip.c,
	config.gcc, ipa-cp.c, ipa-prop.c, ipa-prop.h, reg-stack.c,
	tree-ssa-structalias.c, tree-vrp.c, value-prof.c, vec.h,
	config/linux.h, config/alpha/alpha.h, config/alpha/linux.h,
	config/alpha/predicates.md, config/arc/arc.h,
	config/arm/arm.h, config/arm/ieee754-df.S,
	config/arm/ieee754-sf.S, config/bfin/bfin.c,
	config/bfin/bfin.h, config/c4x/c4x.h, config/crx/crx.c,
	config/fr30/fr30.h, config/frv/frv.h, config/h8300/h8300.h,
	config/i386/i386.h, config/ia64/ia64.c, config/ia64/ia64.h,
	config/m68hc11/m68hc11.h, config/mips/mips.c,
	config/mips/mips.h, config/mips/openbsd.h,
	config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.h,
	config/pdp11/pdp11.h, config/rs6000/linux-unwind.h,
	config/rs6000/rs6000.c, config/rs6000/rs6000.h,
	config/s390/s390.c, config/sh/sh.c, config/sh/sh.h,
	config/sparc/linux.h, config/sparc/linux64.h,
	config/sparc/sparc.h, config/v850/v850.h, config/vax/vax.h,
	doc/extend.texi, doc/gcov.texi, doc/install.texi,
	doc/invoke.texi, doc/rtl.texi, doc/tm.texi: Fix comment/doc
	typos.  Follow spelling conventions.

From-SVN: r102809
2005-08-06 13:26:35 +00:00
Jan Beulich a71aef0bb3 ia64.c (ia64_load_pair_ok): New.
gcc/
2005-07-28 Jan Beulich <jbeulich@novell.com>

	* config/ia64/ia64.c (ia64_load_pair_ok): New.
	(ia64_print_operand): Describe and handle 'X'.
	(ia64_register_move_cost): Also handle FP_REGS.
	(ia64_preferred_reload_class): Likewise.
	(ia64_secondary_reload_class): Likewise.
	(ia64_dependencies_evaluation_hook): New local variable c. Initialize
	it. Also check for ITANIUM_CLASS_FLDP.
	* config/ia64/ia64.h (FP_REGNO_P): New.
	(HARD_REGNO_MODE_OK): Remove explusion of TImode.
	(reg_class): Add FP_REGS.
	(REG_CLASS_NAMES): Adjust for it.
	(REG_CLASS_CONTENTS): Likewise.
	(REGNO_REG_CLASS): Use FP_REGS where appropriate.
	(REG_CLASS_FROM_LETTER): Handle 'x'.
	(CLASS_MAX_NREGS): Handle FP_REGS.
	(MEMORY_MOVE_COST): Likewise.
	* config/ia64/ia64.md (itanium_class): Add fldp.
	(type): Handle fldp.
	(movti_internal): More allowable operand combinations. Use ldfp8 when
	splitting unnecessary. Remove predicable attribute. Adjust
	itanium_class attribute.
	(smuldi3_highpart): Remove outdated comment.
	(mulditi3, umulditi3, rotlti3): New expanders.
	(addti3, subti3, mulditi3_internal, umulditi3_internal, negti2, rotlti3_internal): New insns.
	(absti2): Disabled new insn for future reference.
	Respective new splitters.
	* config/ia64/itanium1.md (1_fldp, 1b_fldp): New insn reservations.
	* config/ia64/itanium2.md (2_fldp, 2b_fldp): Likewise.
	* config/ia64/ia64-protos.h (ia64_load_pair_ok): New.

From-SVN: r102463
2005-07-28 06:58:58 +00:00
Steve Ellcey 6f3113ed29 * config/ia64/ia64.c (ia64_output_dwarf_dtprel): Support ILP32 mode.
From-SVN: r102031
2005-07-14 20:38:42 +00:00
James E Wilson ae4d3291c0 Fix ia64-hpux ABI bug with varargs __float80 argument.
* config/ia64/ia64.c (ia64_expand_movxf_movrf): Don't word swap when
reading/writing general registers.
(ia64_function_arg): Revert 2005-06-18 change.

From-SVN: r101679
2005-07-06 17:20:49 -07:00
James E Wilson 1ad159f91b Fix -O0 -fschedule-insns2 ICE.
* ia64.c (ia64_reorg): Check optimize before ia64_flag_schedule_isns2.

From-SVN: r101675
2005-07-06 17:10:54 -07:00
Joseph Myers dee158440e toplev.c (default_tree_printer): Handle setting location with '+' flag.
2005-07-02  Zack Weinberg  <zack@codesourcery.com>
            Joseph S. Myers  <joseph@codesourcery.com>

	* toplev.c (default_tree_printer): Handle setting location with
	'+' flag.
	* c-objc.common.c (c_tree_printer): Likewise.
	* c-format.c (gcc_diag_flag_specs): Add '+'.
	(gcc_cdiag_char_table): Allow '+' flag for tree formats.
	(format_types_orig): Allow '+' flag for gcc_diag and gcc_cdiag
	formats.
	* c-common.c, c-decl.c, c-objc-common.c, c-pragma.c,
	config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c,
	config/mcore/mcore.c, config/sh/symbian.c, config/sol2.c,
	config/v850/v850.c, function.c, stor-layout.c, toplev.c,
	tree-inline.c, tree-optimize.c, tree.c, varasm.c: Use '+' flag
	instead of %J or %H.  Use 'q' flag for quoting.  Avoid '.' at end
	of diagnostics.  Use %q+D not %s for a decl.  Do not pass excess
	format arguments where %J is used without %D.

cp:
	* error.c (location_of): Add comment.
	(locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
	* cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
	* call.c, class.c, decl.c, decl2.c, friend.c, init.c,
	name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
	typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
	or cp_pedwarn_at.  Mark up some diagnostic strings with N_.

java:
	* class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
	flag for quoting.

objc:
	* objc-act.c: Use '+' flag instead of %J.  Use 'q' flag for
	quoting.

testsuite:
	* gcc.dg/format/gcc_diag-1.c: Update.

From-SVN: r101532
2005-07-02 11:55:32 +01:00
Richard Henderson 93b4080b3d ia64.c (ia64_expand_vecint_minmax): Use us_minus and plus for V4HImode UMAX.
* config/ia64/ia64.c (ia64_expand_vecint_minmax): Use us_minus and
        plus for V4HImode UMAX.

From-SVN: r101441
2005-06-29 15:22:13 -07:00
Richard Henderson 6283ba266f ia64.c (ia64_expand_vecint_compare): Decompose to EQ when using psubN.uuu.
* config/ia64/ia64.c (ia64_expand_vecint_compare): Decompose to EQ
        when using psubN.uuu.

From-SVN: r101405
2005-06-28 17:32:25 -07:00
Richard Henderson e934ca476b ia64.c (ia64_expand_vecint_compare): Use unsigned saturating subtraction for QI and HImode unsigned compares.
* config/ia64/ia64.c (ia64_expand_vecint_compare): Use unsigned
        saturating subtraction for QI and HImode unsigned compares.  Use
        bit arithmetic tricks for SImode unsigned compares.
        (ia64_expand_vcondu_v2si): Remove.
        (ia64_expand_vecint_cmov): Don't call it.

From-SVN: r101396
2005-06-28 15:34:53 -07:00
Joseph Myers 4de67c26fe target.h (invalid_conversion, [...]): New hooks.
* target.h (invalid_conversion, invalid_unary_op,
	invalid_binary_op): New hooks.
	* target-def.h (TARGET_INVALID_CONVERSION,
	TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP,
	TARGET_INITIALIZER): Likewise.
	* hooks.h (hook_constcharptr_tree_tree_null,
	hook_constcharptr_int_tree_null,
	hook_constcharptr_int_tree_tree_null): New.
	* hooks.c (hook_constcharptr_tree_tree_null,
	hook_constcharptr_int_tree_null,
	hook_constcharptr_int_tree_tree_null): Likewise.
	* gcc/doc/tm.texi (TARGET_INVALID_CONVERSION,
	TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP): Document.
	* c-convert.c (convert): Use invalid_conversion hook.
	* c-typeck.c (build_unary_op): Use invalid_unary_op hook.
	(build_binary_op): Use invalid_binary_op hook.
	* config/ia64/ia64-modes.def: Define RFmode.
	* config/ia64/ia64-protos.h (spill_xfmode_operand): Remove.
	(ia64_expand_movxf_movrf): New.
	* config/ia64/ia64.md (movxf): Move code to
	ia64_expand_movxf_movrf.
	(movrf, movrf_internal): New.
	* ia64.c (ia64_invalid_conversion, ia64_invalid_unary_op,
	ia64_invalid_binary_op, TARGET_INVALID_CONVERSION,
	TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP): New.
	(spill_xfmode_operand): Rename to spill_xfmode_rfmode_operand.
	Add mode parameter.  Make static.
	(ia64_expand_movxf_movrf): New, moved from ia64.md.  Handle RFmode
	as well as XFmode.
	(ia64_function_arg, ia64_function_value, ia64_register_move_cost,
	ia64_scalar_mode_supported_p): Handle RFmode as well as XFmode.
	(ia64_init_builtins): Set up __fpreg as RFmode.
	(ia64_mangle_fundamental_type): Mangle __fpreg as u7__fpreg.

cp:
	* cvt.c (ocp_convert): Use invalid_conversion hook.
	* typeck.c (build_binary_op): Use invalid_binary_op hook.
	(build_unary_op): Use invalid_unary_op hook.

testsuite:
	* g++.dg/ext/fpreg1.C, gcc.target/ia64/fpreg-1.c,
	gcc.target/ia64/fpreg-2.c: New tests.

From-SVN: r101391
2005-06-28 22:55:24 +01:00
Richard Henderson cabddb237f ia64.c (ia64_expand_vcondu_v2si): Generate proper comparison operations.
* config/ia64/ia64.c (ia64_expand_vcondu_v2si): Generate proper
        comparison operations.
        (ia64_expand_vecint_minmax): Fix size of xops.
        * config/ia64/vect.md (umax<VECINT>3): Fix fallback pattern typo.
        (vec_shl_<VECINT>, vec_shr_<VECINT>): New.

From-SVN: r101375
2005-06-28 00:46:40 -07:00
R. Kelley Cook 39d14ddaac Update FSF address.
From-SVN: r101314
2005-06-25 01:22:41 +00:00
Joseph Myers cac24f06cb i386.c (TARGET_MANGLE_FUNDAMENTAL_TYPE): Define.
* config/i386/i386.c (TARGET_MANGLE_FUNDAMENTAL_TYPE): Define.
	(ix86_mangle_fundamental_type): New.
	* config/ia64/ia64.c (TARGET_MANGLE_FUNDAMENTAL_TYPE): Define.
	(ia64_mangle_fundamental_type): New.

testsuite:
	* g++.dg/abi/mangle24.C, g++.dg/abi/mangle25.C: New tests.

From-SVN: r101191
2005-06-19 21:12:16 +01:00
Richard Henderson b4e3537b60 ia64-modes.def (V4SF): Add.
* config/ia64/ia64-modes.def (V4SF): Add.
        * config/ia64/ia64.c (ia64_legitimate_constant_p): Handle CONST_VECTOR.
        * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Allow vector to
        integer mode changes in fp regs.
        * config/ia64/ia64.md (UNSPEC_VECT_EXTR): New.
        * config/ia64/vect.md (smaxv2sf3, sminv2sf3): Fix typos in names.
        (reduc_plus_v2sf, reduc_smax_v2sf, reduc_smin_v2sf): New.
        (vcondv2sf): Use gen_fpack
        (fpack): Remove * from name.
        (fswap, fmix_l, fmix_r, fmix_lr): New.
        (vec_setv2sf, vec_extractv2sf_0_le, vec_extractv2sf_0_be): New.
        (vec_extractv2sf_1, vec_extractv2sf): New.

From-SVN: r101185
2005-06-19 09:10:49 -07:00
Joseph Myers 6d409ca872 ia64.c (ia64_function_arg): Set up a PARALLEL for a big-endian unnamed __float80 value.
* config/ia64/ia64.c (ia64_function_arg): Set up a PARALLEL for a
	big-endian unnamed __float80 value.

testsuite:
	* gcc.target/ia64/float80-varargs-1.c: New test.

From-SVN: r101153
2005-06-18 12:56:42 +01:00
Steve Ellcey d26afa4f56 re PR target/19889 (g++.old-deja/g++.law/profile1.C execution test fails on ia64-hpux)
PR target/19889
	* config/ia64/hpux.h (FUNCTION_PROFILER): New (dummy).
	(PROFILE_HOOK): New.
	(PROFILE_BEFORE_PROLOGUE): Undef.
	(NO_PROFILE_COUNTERS): New.
	* config/ia64/ia64-protos.h (ia64_profile_hook): New.
	* config/ia64/ia64.c (ia64_compute_frame_size): Add ifdef.
	(gen_mcount_func_rtx): New.
	(ia64_profile_hook): New.
	* config/ia64/ia64.md (ip_value): New.

From-SVN: r101134
2005-06-17 20:45:50 +00:00
Jan Hubicka 5e2d947ce8 basic-block.h (rtl_bb_info): Break out head_, end_, global_live_at_start, global_live_at_end from ...
* basic-block.h (rtl_bb_info): Break out head_, end_,
	global_live_at_start, global_live_at_end from ...
	(basic_block_def): ... here; update all references
	(BB_RTL): New flag.
	(init_rtl_bb_info): Declare.
	* cfgexpand.c (expand_gimple_basic_block): Init bb info, set BB_RTL
	flag.
	* cfgrtl.c: Include ggc.h
	(create_basic_block_structure): Init bb info.
	(rtl_verify_flow_info_1): Check BB_RTL flag and rtl_bb_info pointer.
	(init_rtl_bb_info): New function.
	(rtl_merge_block, cfglayout_merge_block): Copy global_live_at_end here.
	* cfghooks.c (merge_block): Do not copy global_live_at_end here.
	* cfg.c (clear_bb_flags): Skip BB_RTL flag.
	(dump_flow_info): Gueard global_live_* dumping.

From-SVN: r101082
2005-06-16 10:33:40 +00:00
Richard Henderson c8d3810f93 ia64.c (update_set_flags): Just return for IF_THEN_ELSE.
* config/ia64/ia64.c (update_set_flags): Just return for IF_THEN_ELSE.
        Use SCALAR_FLOAT_MODE_P.
        * config/ia64/vect.md (vcondv2sf): Remove code check on comparison.
        (fselect): Rename from fpcmp; use %F.
        (fpcmp): New.

From-SVN: r100803
2005-06-09 10:38:06 -07:00
Richard Henderson bd8633a3c0 ia64.h (NO_PROFILE_COUNTERS): New.
* config/ia64/ia64.h (NO_PROFILE_COUNTERS): New.
        * config/ia64/ia64.c (ia64_output_function_profiler): Honor it.
        Emit out3 load right after alloc.

From-SVN: r100781
2005-06-08 14:29:36 -07:00
Richard Henderson 2b4f149bc9 ia64.h (FUNCTION_PROFILER): Move implementation ...
* config/ia64/ia64.h (FUNCTION_PROFILER): Move implementation ...
        * config/ia64/ia64.c (ia64_output_function_profiler): ... here; add
        unwind markup.
        * config/ia64/ia64-protos.h (ia64_output_function_profiler): Declare.

From-SVN: r100774
2005-06-08 12:23:07 -07:00
Richard Henderson 9f3b845245 re PR target/21721 (fails to assemble, Use of p0 is not valid in this context)
PR target/21721
        * config/ia64/ia64.c (emit_predicate_relation_info): Skip p0.

From-SVN: r100745
2005-06-08 00:26:58 -07:00
Eric Botcazou fdbe66f28c re PR debug/21889 (Native Solaris assembler cannot grok DTP-relative debug symbols)
PR target/21889
	* target.h (gcc_target) <asm_out>: New field output_dwarf_dtprel.
	* target-def.h (TARGET_ASM_OUTPUT_DWARF_DTPREL): New macro.
	(TARGET_ASM_OUT): Add it.
	* doc/tm.texi (Debugging Info): Document it.
	* dwarf2out.c (output_loc_operands) <INTERNAL_DW_OP_tls_addr>:
	Test it instead of ASM_OUTPUT_DWARF_DTPREL.
	(loc_descriptor_from_tree_1) <VAR_DECL>: Likewise.
	* system.h: Poison ASM_OUTPUT_DWARF_DTPREL.
	* config/frv/frv-protos.h (frv_output_dwarf_dtprel): Delete.
	* config/frv/frv.c (frv_output_dwarf_dtprel): Make static and unused.
	(gen_inlined_tls_plt): Remove unused variable MEM.
	(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to frv_output_dwarf_dtprel.
	* config/frv/frv.h (ASM_OUTPUT_DWARF_DTPREL): Delete.
	* config/i386/i386-protos.h (i386_output_dwarf_dtprel): Delete.
	* config/i386/i386.c (i386_output_dwarf_dtprel): Make static and
	unused.
	(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to i386_output_dwarf_dtprel.
	* config/i386/i386.h (ASM_OUTPUT_DWARF_DTPREL): Delete.
	* config/ia64/ia64-protos.h (ia64_output_dwarf_dtprel): Delete.
	* config/ia64/ia64.c (ia64_output_dwarf_dtprel): Make static and
	unused.
	(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to ia64_output_dwarf_dtprel.
	* config/ia64/ia64.h (ASM_OUTPUT_DWARF_DTPREL): Delete.
	* config/rs6000/rs6000-protos.h (rs6000_output_dwarf_dtprel): Delete.
	* config/rs6000/rs6000.c (rs6000_output_dwarf_dtprel): Make static and
	unused.
	(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to rs6000_output_dwarf_dtprel
	* config/rs6000/rs6000.h (ASM_OUTPUT_DWARF_DTPREL): Delete.
	* config/s390/s390-protos.h (s390_output_dwarf_dtprel): Delete.
	* config/s390/s390.c (s390_output_dwarf_dtprel): Make static and
	unused.
	(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to s390_output_dwarf_dtprel.
	* config/s390/s390.h (ASM_OUTPUT_DWARF_DTPREL): Delete.
	* config/sparc/sol2-gas.h (TARGET_SUN_TLS): Define to 0.
	(TARGET_GNU_TLS): Define to 1.
	* config/sparc/sparc-protos.h (sparc_output_dwarf_dtprel): Delete.
	* config/sparc/sparc.c (sparc_output_dwarf_dtprel): Make static and
	unused.
	(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to sparc_output_dwarf_dtprel
	if TARGET_GNU_TLS only.
	* config/sparc/sparc.h (ASM_OUTPUT_DWARF_DTPREL): Delete.

	* config.gcc (sparc64-*-solaris2*): Include tm-dwarf2.h last.
	(sparc-*-solaris2*): Likewise on Solaris 7 and up.

From-SVN: r100742
2005-06-08 05:05:45 +00:00
Jakub Jelinek c8b622ff2d combine.c (try_combine): Use hard_regno_nregs array instead of HARD_REGNO_NREGS macro.
* combine.c (try_combine): Use hard_regno_nregs array instead of
	HARD_REGNO_NREGS macro.
	* config/rs6000/rs6000.c (rs6000_split_multireg_move,
	rs6000_register_move_cost, rs6000_memory_move_cost): Likewise.
	* config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.

From-SVN: r100673
2005-06-06 21:22:19 +02:00
Richard Sandiford bacf5b96ed system.h (TARGET_OPTIONS, [...]): Poison.
* system.h (TARGET_OPTIONS, TARGET_SWITCHES): Poison.
	* opts.h (print_filtered_help): Delete.
	* opts.c (handle_option, decode_options): Remove calls to
	set_target_switch.
	(print_target_help): New function.
	(common_option, print_help): Call print_target_help instead of
	display_target_options.
	(print_filtered_help): Make static.
	* toplev.h (display_target_options, set_target_switch): Delete.
	* toplev.c (target_switches, target_options, display_target_options)
	(set_target_switch): Delete.
	(print_switch_values): Remove handling of TARGET_SWITCHES and
	TARGET_OPTIONS.
	(default_get_pch_validity): Likewise.  Only treat target_flags
	specially if targetm.check_pch_target_flags is nonnull.
	(pch_option_mismatch): New function.
	(default_pch_valid_p): Use it.  Remove handling of TARGET_SWITCHES
	and TARGET_OPTIONS.  Only treat target_flags specially if
	targetm.check_pch_target_flags is nonnull.
	* config/ia64/ia64.c (ia64_override_options): Don't mention
	TARGET_OPTIONS in comment.
	* config/m68k/m68k-none.h (CC1_SPEC): Likewise.
	* doc/invoke.texi: Remove a reference to TARGET_SWITCHES.
	* doc/tm.texi (TARGET_DEFAULT_TARGET_FLAGS): Don't mention the
	interaction with TARGET_SWITCHES.
	(TARGET_@var{featurename}, TARGET_SWITCHES, TARGET_OPTIONS): Delete.

From-SVN: r100432
2005-06-01 07:02:36 +00:00
Richard Sandiford 55bea00ab0 opt-functions.awk (var_type): New function.
* opt-functions.awk (var_type): New function.
	(var_set): Use CLVC_STRING if var_type returns "const char *".
	* opth-gen.awk: Use var_type to find out the types of variables.
	Don't print comments above each "extern" definition.
	* optc-gen.awk: Use var_type in the same way.
	* opts.h (cl_var_cond): Rename to...
	(cl_var_type): ...this.  Add CLVC_STRING.
	(cl_option): Make "flag_var" a "void *" pointer.  Replace "var_cond"
	with "var_type".
	* opts.c (handle_option, option_enabled): Update after above name
	change.  Cast flag_var before using it.  Handle CLVC_STRING.

	* config/alpha/alpha.h (alpha_tls_size): Delete.
	* config/alpha/alpha.c (alpha_tls_size, alpha_cpu_string)
	(alpha_tune_string, alpha_tp_string, alpha_fprm_string)
	(alpha_fptm_string, alpha_mlat_string): Delete.
	(alpha_handle_option): Don't set the above variables here.  Use the
	integer argument to check the validity of -mtls-size=.
	* config/alpha/alpha.opt (mcpu=, mtune=, mfp-rounding-mode=)
	(mfp-trap-mode=, mtrap-precision=, mmemory-latency=): Add Var()s.
	(mtls-size=): Likewise.  Convert to a UInteger and initialize the
	variable to 32.

	* config/arc/arc.c (arc_cpu_string, arc_text_string)
	(arc_data_string, arc_rodata_string): Delete.
	(arc_handle_option): Don't set the above variables here.
	* config/arc/arc.opt (mcpu=, mtext=, mdata=, mrodata=): Add Var()s
	and initialize them.

	* config/arm/arm.c (target_fpu_name, target_fpe_name)
	(target_float_abi_name, target_abi_name, structure_size_string)
	(arm_pic_register_string): Delete.
	(arm_handle_option): Don't set the above variables here, except
	in the handling of -mhard-float and -msoft-float.
	* config/arm/arm.opt (mabi=, mfloat-abi=, mfp=, mfpe=, mfpu=)
	(mpic-register=, mstructure-size-boundary=): Add Var()s.

	* config/avr/avr.c (avr_init_stack, avr_mcu_name, TARGET_HANDLE_OPTION)
	(avr_handle_option): Delete.
	* config/avr/avr.opt (mmcu=, minit-stack=): Add Var()s and initialize
	them.

	* config/bfin/bfin.c (bfin_library_id): Delete.
	(bfin_handle_option): Don't set it.
	* config/bfin/bfin.opt (mshared-library-id=): Add Var().

	* config/c4x/c4x.h (c4x_rpts_cycles): Delete.
	* config/c4x/c4x.c (c4x_rpts_cycles): Delete.
	(c4x_handle_option): Don't set c4x_rpts_cycles here.
	* config/c4x/c4x.opt (mrpts=): Add Var().

	* config/cris/aout.h (CRIS_SUBTARGET_HANDLE_OPTION): Don't set
	cris_elinux_stacksize_str here.
	* config/cris/aout.opt (melinux-stacksize=): Add Var().
	* config/cris/cris.h (cris_max_stackframe_str, cris_cpu_str)
	(cris_tune_str, cris_elinux_stacksize_str): Delete.
	* config/cris/cris.c (cris_max_stackframe_str, cris_cpu_str)
	(cris_tune_str, cris_elinux_stacksize_str): Delete.
	(cris_handle_option): Don't set the above variables here.
	* config/cris/cris.opt (mcpu=, march=, mtune=, mmax-stackframe=)
	(max-stackframe=): Add Var()s.

	* config/i386/i386.h (ix86_tune_string, ix86_arch_string): Delete.
	* config/i386/i386.c (ix86_cmodel_string, ix86_asm_string)
	(ix86_tls_dialect_string, ix86_tune_string, ix86_arch_string)
	(ix86_fpmath_string, ix86_regparm_string, ix86_align_loops_string)
	(ix86_align_jumps_string, ix86_preferred_stack_boundary_string)
	(ix86_branch_cost_string, ix86_align_funcs_string): Delete.
	(ix86_handle_option): Don't set the above variables here.
	* config/i386/i386.opt (malign-functions=, malign-jumps=)
	(malign-loops=, march=, masm=, mbranch-cost=, mcmodel=, mfpmath=)
	(mpreferred-stack-boundary=, mregparm=, mtls-dialect=, mtune=): Add
	Var()s.

	* config/ia64/ia64.h (ia64_tls_size): Delete.
	* config/ia64/ia64.c (ia64_tls_size): Delete.
	(ia64_handle_option): Treat -mtls-size= as a UInteger option,
	reading the integer argument from the "value" parameter.  Don't
	set ia64_tls_size here.
	* config/ia64/ia64.opt (mtls-size=): Turn into a UInteger option.
	Add Var() and Init().

	* config/m32r/m32r.h (m32r_cache_flush_func): Delete.
	(m32r_cache_flush_trap): Delete.
	* config/m32r/m32r.c (m32r_cache_flush_func): Delete.
	(m32r_cache_flush_trap): Delete.
	(m32r_handle_option): Don't set the above variables when handling
	-mflush-func= and -mflush-trap=.
	* config/m32r/m32r.opt (-mflush-func=, -mflush-trap=): Add Var()s
	and Init()s.

	* config/mips/mips.h (mips_cache_flush_func): Delete.
	* config/mips/mips.c (mips_arch_string, mips_tune_string)
	(mips_cache_flush_func): Delete.
	(mips_handle_option): Don't set the above variables when handling
	-march=, -mtune= and -mflush-func=.
	* config/mips/mips.opt (march=, mflush-func=, mtune=): Add Var()s.

	* config/s390/s390.c (s390_arch_string): Delete.
	(s390_handle_option): Don't set it here.
	* config/s390/s390.opt (march=): Add Var().

	* config/sparc/sparc.h (sparc_cmodel_string): Delete.
	* config/sparc/sparc.c (sparc_cmodel_string): Delete.
	(sparc_handle_option): Don't set it here.
	* config/sparc/sparc.opt (mcmodel=): Add Var().

From-SVN: r100185
2005-05-26 05:28:04 +00:00
DJ Delorie 5c498b10af common.opt (-Wattributes): New.
* common.opt (-Wattributes): New.  Default true.
* doc/invoke.texi (-Wno-attributes): Document.

* attribs.c (decl_attributes): Move warning control from if() to
warning(OPT_*).
* c-common.c (handle_packed_attribute): Likewise.
(handle_nocommon_attribute): Likewise.
(handle_common_attribute): Likewise.
(handle_noreturn_attribute): Likewise.
(handle_noinline_attribute): Likewise.
(handle_always_inline_attribute): Likewise.
(handle_used_attribute): Likewise.
(handle_unused_attribute): Likewise.
(handle_const_attribute): Likewise.
(handle_transparent_union_attribute): Likewise.
(handle_constructor_attribute): Likewise.
(handle_destructor_attribute): Likewise.
(handle_mode_attribute): Likewise.
(handle_alias_attribute): Likewise.
(handle_visibility_attribute): Likewise.
(handle_tls_model_attribute): Likewise.
(handle_malloc_attribute): Likewise.
(handle_returns_twice_attribute): Likewise.
(handle_pure_attribute): Likewise.
(handle_deprecated_attribute): Likewise.
(handle_vector_size_attribute): Likewise.
(handle_nothrow_attribute): Likewise.
(handle_cleanup_attribute): Likewise.
(handle_warn_unused_result_attribute): Likewise.
(handle_sentinel_attribute): Likewise.
* c-decl.c (diagnose_mismatched_decls): Likewise.
(start_decl): Likewise.
(grokdeclarator): Likewise.
(start_function): Likewise.
* c-format.c (check_function_format): Likewise.
* stor-layout.c (place_field): Likewise.
(finalize_record_size): Likewise.
* tree.c (handle_dll_attribute)): Likewise.
* varasm.c (default_assemble_visibility): Likewise.
* config/darwin.c (darwin_handle_weak_import_attribute): Likewise.
(darwin_assemble_visibility): Likewise.
* config/arc/arc.c (arc_handle_interrupt_attribute): Likewise.
* config/arm/arm.c (arm_handle_fndecl_attribute): Likewise.
(arm_handle_isr_attribute): Likewise.
* config/avr/avr.c (avr_handle_progmem_attribute): Likewise.
(avr_handle_fndecl_attribute): Likewise.
* config/bfin/bfin.c (handle_int_attribute): Likewise.
* config/c4x/c4x.c (c4x_handle_fntype_attribute): Likewise.
* config/h8300/h8300.c (h8300_handle_fndecl_attribute): Likewise.
(h8300_handle_eightbit_data_attribute): Likewise.
(h8300_handle_tiny_data_attribute): Likewise.
* config/i386/i386.c (ix86_handle_cdecl_attribute): Likewise.
(ix86_handle_regparm_attribute): Likewise.
(ix86_handle_struct_attribute): Likewise.
* config/i386/winnt.c (ix86_handle_shared_attribute): Likewise.
(i386_pe_encode_section_info): Likewise.
* config/ia64/ia64.c (ia64_handle_model_attribute): Likewise.
* config/ip2k/ip2k.c (ip2k_handle_progmem_attribute): Likewise.
(ip2k_handle_fndecl_attribute): Likewise.
* config/m32r/m32r.c (m32r_handle_model_attribute): Likewise.
* config/m68hc11/m68hc11 (m68hc11_handle_page0_attribute): Likewise.
(m68hc11_handle_fntype_attribute): Likewise.
(m68hc11_encode_section_info): Likewise.
* config/m68k/m68k.c (m68k_handle_fndecl_attribute): Likewise.
* config/mcore/mcore.c (mcore_handle_naked_attribute): Likewise.
* config/ns32k/ns32k.c (ns32k_handle_fntype_attribute): Likewise.
* config/rs6000/rs6000.c (rs6000_handle_longcall_attribute): Likewise.
* config/sh/sh.c (sh_handle_interrupt_handler_attribute): Likewise.
(sh_handle_sp_switch_attribute): Likewise.
(sh_handle_trap_exit_attribute): Likewise.
* config/sh/symbian.c (sh_symbian_dllimport_p): Likewise.
(sh_symbian_handle_dll_attribute): Likewise.
* config/stormy16/stormy16.c (xstormy16_handle_interrupt_attribute): Likewise.
(xstormy16_handle_below100_attribute): Likewise.
* config/v850/v850.c (v850_handle_interrupt_attribute): Likewise.

[testsuite]

* gcc.dg/Wattributes-1.c: New.
* gcc.dg/Wattributes-2.c: New.
* gcc.dg/Wattributes-3.c: New.

[cp]

* decl.c (duplicate_decls): Move warning control from if() to
warning(OPT_*).
* name-lookup.c (parse_using_directive): Likewise.
* parser.c (cp_parser_elaborated_type_specifier): Likewise.
(cp_parser_init_declarator): Likewise.
* tree.c (handle_com_interface_attribute): Likewise.

[java]

* class.c (set_constant_value): Move warning control from if() to
warning(OPT_*).

From-SVN: r100136
2005-05-25 00:18:19 -04:00
Richard Henderson 9a7e4ed66a re PR target/21657 (TLS reference miscompiled)
PR target/21657
        * config/ia64/ia64.c (ia64_expand_tls_address): Remove extra
        memory indirection in local-dynamic case.

From-SVN: r99971
2005-05-19 02:42:23 -07:00
Richard Henderson 3d4ee18234 re PR target/21632 (ICE with small model attribute on ia64)
PR target/21632
        * config/ia64/ia64.c (ia64_extra_constraint) <'T'>: Use
        small_addr_symbolic_operand.

From-SVN: r99910
2005-05-18 10:33:33 -07:00
H.J. Lu 21e4385058 re PR target/21551 (ia64 bootstrap failed)
2005-05-15  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/21551
	* config/ia64/ia64.c (ia64_expand_move): Don't add addend twice.

From-SVN: r99760
2005-05-15 19:11:59 -07:00
Richard Henderson 5e6c8b6428 re PR target/21412 (ICE loading TLS address)
PR target/21412
        * config/ia64/ia64.c (TARGET_CANNOT_FORCE_CONST_MEM): New.
        (ia64_cannot_force_const_mem): New.
        (tls_symbolic_operand_type): New.
        (ia64_legitimate_constant_p): New.
        (ia64_expand_load_address): Return true on success.  Improve
        checks for when we should not split.
        (ia64_expand_tls_address): New addend operand.  Distribute it
        as appropriate to the tls_kind.  Delay referencing gp.
        (ia64_expand_move): Split symbolic addend as necessary.  Handle
        tls symbols with addends.
        * config/ia64/ia64-protos.h: Update.
        * config/ia64/ia64.h (CALL_REALLY_USED_REGISTERS): False for r0,
        p0, f0, f1, and r13.
        (LEGITIMATE_CONSTANT_P): Move to ia64_legitimate_constant_p.
        * config/ia64/ia64.md (UNSPEC_DTPMOD): New.
        (symbolic_operand splitter): Pass everything through
        ia64_expand_load_address and FAIL or DONE as appropriate.
        (load_fptr): Only accept after reload.
        (load_fptr_internal1, gprel64_offset, load_gprel64, load_symptr_high,
        load_symptr_low, load_ltoff_dtpmod,
        (load_dtpmod): New.
        (load_dtprel): Only accept tls symbols.
        (load_dtprel64, load_dtprel22): Likewise.
        (load_tprel, load_tprel64, load_tprel22): Likewise.
        (load_dtprel_gd, load_ltoff_dtprel, load_tprel_ie): New.
        (add_dtprel): Only accept tls symbols.  Canonicalize PLUS.
        (add_dtprel14, add_dtprel22): Likewise.
        (add_tprel, add_tprel14, add_tprel22): Likewise.
        * config/ia64/predicates.md (small_addr_symbolic_operand): New.
        (any_offset_symbol_operand, aligned_offset_symbol_operand): New.
        (got_symbolic_operand): Check CONST offsets.
        (tls_symbolic_operand, ld_tls_symbolic_operand): New.
        (ie_tls_symbolic_operand, le_tls_symbolic_operand): New.
        (move_operand): Don't handle tls here.  Check CONST offsets.

From-SVN: r99596
2005-05-11 14:34:19 -07:00
Richard Henderson 16df4ee6c2 ia64.c (ia64_expand_atomic_op): New.
* config/ia64/ia64.c (ia64_expand_atomic_op): New.
        * config/ia64/ia64-protos.h: Declare it.
        * config/ia64/sync.md (I124MODE, FETCHOP, fetchop_name): New.
        (sync_add<I48MODE>, sync_old_add<I48MODE>): Remove.
        (sync_<FETCHOP><IMODE>, sync_nand<IMODE>): New.
        (sync_old_<FETCHOP><IMODE>, sync_old_nand<IMODE>): New.
        (sync_new_<FETCHOP><IMODE>, sync_new_nand<IMODE>): New.
        (cmpxchg_rel_<I124MODE>): Split from cmpxchg_acq_<IMODE>.  Zero
        extend result; use release semantics.
        (cmpxchg_rel_di): Rename from cmpxchg_acq_<IMODE>; use release.
        (sync_val_compare_and_swap_<IMODE>): Update to match.

From-SVN: r99527
2005-05-10 09:37:36 -07:00
Kazu Hirata ee30710df8 * config/ia64/ia64.c: Fix a comment typo.
From-SVN: r99442
2005-05-09 14:38:07 +00:00
Jakub Jelinek 0f666d6e50 ia64.c (ia64_override_options): Don't set ia64_flag_var_tracking and clear flag_var_tracking here...
* config/ia64/ia64.c (ia64_override_options): Don't set
	ia64_flag_var_tracking and clear flag_var_tracking here...
	(ia64_file_start): ... but here.

From-SVN: r99408
2005-05-08 23:19:16 +02:00
James E Wilson c1bc6ca8a5 Fix issues brought up by Nathan's assertify patch for the ia64 backend.
* config/ia64/ia64.c (update_set_flags): Delete ppred and pcond
parameters.  Replace conditional move code with assert checking for
ar.lc.  Delete obsolete comments.
(set_src_needs_barrier): Delete cond parameter, and code using it.
(rtx_needs_barrier): Delete initialization of cond.  Fix typo in
assert checking for PR_REGS.  Fix calls to update_set_flags and
set_src_needs_barrier.
(group_barrier_needed): Renamed from group_barrier_needed_p.  Fix all
callers.  Rewrite explanatory comment before the function.
(safe_group_barrier_needed): Renamed from safe_group_barrier_needed_p.
Fix all callers.

From-SVN: r98900
2005-04-27 17:40:42 -07:00
Nathan Sidwell e820471b58 ia64.c (ia64_encode_addr_area): Use gcc_assert and gcc_unreachable as appropriate.
* config/ia64/ia64.c (ia64_encode_addr_area): Use gcc_assert and
	gcc_unreachable as appropriate.
	(ia64_expand_load_address, ia64_expand_tls_address,
	ia64_split_tmode, ia64_split_tmode_move, ia64_expand_compare,
	ia64_expand_vecint_compare, ia64_expand_vecint_minmax,
	next_scratch_gr_reg, ia64_initial_elimination_offset,
	ia64_expand_prologue, ia64_expand_epilogue,
	ia64_output_dwarf_dtprel, ia64_print_operand,
	ia64_register_move_cost, first_instruction, rws_access_regno,
	update_set_flags, rtx_needs_barrier, group_barrier_needed_p,
	ia64_sched_init, ia64_variable_issue,
	ia64_first_cycle_multipass_dfs_lookahead_guard,
	ia64_dfa_new_cycle, issue_nops_and_insn, get_template, bundling,
	ia64_st_address_bypass_p, ia64_ld_address_bypass_p, process_set,
	process_for_unwind_directive, ia64_hpux_file_end): Likewise.
	* config/ia64/ia64.h (ASM_OUTPUT_ADDR_VEC_ELT): Likewise.
	* config/ia64/ia64.md (*arm_movdi_vfp, *movdf_vfp): Likewise.
	* config/ia64/predicates.md (got_symbolic_operand,
	sdata_symbolic_operand): Likewise.
	* config/ia64/vect.md (vcondv2sf): Likewise.

From-SVN: r98817
2005-04-27 08:47:38 +00:00
DJ Delorie d4ee4d2525 diagnostic.c (warning): Accept parameter to classify warning option.
* diagnostic.c (warning): Accept parameter to classify warning option.
(warning0): New, for when a pointer to an error() like function is needed.
* errors.c (warning): Likewise.
* errors.h (warning, warning0): Adjust prototypes.
* toplev.h (warning, warning0): Likewise.

* attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c,
c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c,
c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c,
fold-const.c, fortran/trans-decl.c, function.c, gcse.c,
genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c,
reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c,
tree-ssa.c, tree.c, varasm.c: Adjust warning() callers.

* config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c,
config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c,
config/darwin.c, config/darwin.h, config/h8300/h8300.c,
config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c,
config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c,
config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c,
config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h,
config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h,
config/rs6000/aix52.h, config/rs6000/darwin.h,
config/rs6000/rs6000-c.c, config/rs6000/rs6000.c,
config/s390/s390.c, config/sh/sh.c, config/sh/sh.h,
config/sh/symbian.c, config/sol2-c.c, config/sol2.c,
config/stormy16/stormy16.c, config/v850/v850-c.c,
config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning()
callers.

* ada/misc.c: Adjust warning() callers.

* cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c,
cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c,
cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c,
cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers.

* fortran/trans-decl.c: Adjust warning() callers.

* java/class.c, java/decl.c, java/expr.c, java/jcf-io.c,
java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning()
callers.

* objc/objc-act.c: Adjust warning() callers.

* treelang/parse.y: Adjust warning() callers.

From-SVN: r98633
2005-04-23 17:29:07 -04:00
Richard Henderson f12b785df3 builtins.c (expand_builtin_sync_operation): Revert last change.
* builtins.c (expand_builtin_sync_operation): Revert last change.
        * optabs.c (expand_bool_compare_and_swap): Compare vs old value,
        not vs new value.
        (expand_compare_and_swap_loop): Likewise.
        (expand_sync_operation): Remove fallback from NAND to AND; invert
        memory operand when expanding from cmpxchg.
        (expand_sync_fetch_operation): Likewise.
        * doc/extend.texi (Atomic Builtins): Fix docs for nand and
        compare-and-swap.

        * config/alpha/alpha.c (alpha_split_atomic_op): Invert memory operand
        when implementing NAND.  Fix double-add for AFTER.
        * config/alpha/sync.md (sync_nand<I48MODE>): Invert memory operand.
        (sync_old_nand<I48MODE>, sync_new_nand<I48MODE>): Likewise.
        (sync_compare_and_swap<I48MODE>): Fix compare vs zero.  Return old
        memory value.
        (sync_lock_test_and_set<I48MODE>): Remove extra label and last
        memory barrier.

        * config/i386/sync.md (sync_compare_and_swap<IMODE>): Fix pattern
        to return old memory value.
        (sync_compare_and_swap_cc<IMODE>): Likewise.

        * config/ia64/ia64.c (ia64_dependencies_evaluation_hook): Early
        return pre-reload.  Don't consider output or anti dependencies.
        * config/ia64/sync.md (IMODE): New.
        (modesuffix): Add QI and HI.
        (memory_barrier): Simplify expansion.
        (sync_compare_and_swap<IMODE>): Use IMODE, not I48MODE.
        (cmpxchg_acq_<IMODE>): Likewise.
        (sync_lock_test_and_set<IMODE>): Likewise.
        (sync_lock_release<IMODE>): Likewise.

From-SVN: r98436
2005-04-19 21:54:11 -07:00
Joseph Myers 077bc9240b re PR middle-end/20491 (internal compiler error: in subreg_regno_offset, at rtlanal.c:3042)
PR middle-end/20491
	* config/ia64/ia64.c (rtx_needs_barrier): Recurse instead of
	falling through from SUBREG case to REG.

From-SVN: r98225
2005-04-16 11:37:29 +01:00
Richard Henderson af795c3cac ia64.h (enum fetchop_code): Remove.
* config/ia64/ia64.h (enum fetchop_code): Remove.
        (enum ia64_builtins): Move ...
        * config/ia64/ia64.c (enum ia64_builtins): ... here.  Remove all
        members except BSP and FLUSHRS.
        (ia64_init_builtins): Remove __sync builtins.
        (ia64_expand_builtin): Likewise.
        (ia64_expand_fetch_and_op, ia64_expand_op_and_fetch): Remove.
        (ia64_expand_compare_and_swap, ia64_expand_lock_test_and_set): Remove.
        (ia64_expand_lock_release): Remove.
        * config/ia64/ia64.md (mf): Move to sync.md.
        (mf_internal, fetchadd_acq_si, fetchadd_acq_di, cmpxchg_acq_si,
        cmpxchg_acq_di, xchgsi, xchgdi): Likewise.
        * config/ia64/sync.md: New file.
        (memory_barrier): Rename from mf.
        (fetchadd_acq_<I48MODE>): Macroize from _si/_di patterns.
        (cmpxchg_acq_<I48MODE>): Likewise.
        (sync_lock_test_and_set<I48MODE>): Likewise.

        * config/ia64/ia64intrin.h: Define nothing for C; limit #defines
        to c++.  Remove __sync* declarations.  s/_si/_4/.  s/_di/_8/.

From-SVN: r98156
2005-04-14 16:53:02 -07:00
Vladimir Makarov 96ddf8ef23 re PR target/20632 (GCC should avoid generating F- and B-unit NOPs)
2005-03-31  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/20632
	* genautomata.c (first_cycle_unit_presence): Check all alternative
	states for unit presence.

	* doc/md.texi: Remove remark about impossibility to query unit
	presence in non nondeterministic automaton state.

	* config/ia64/ia64.c (get_template): Change order of unit querying.

From-SVN: r97351
2005-03-31 23:26:33 +00:00
Tom Tromey 5662a50dd8 tree.def (FILE_TYPE): Removed.
gcc:
	* tree.def (FILE_TYPE): Removed.
	* typeclass.h (enum type_class): Removed file_type_class.
	* dwarf2out.c (is_base_type): Updated.
	(gen_type_die): Likewise.
	* dbxout.c (dbxout_type): Updated.
	* builtins.c (type_to_class): Updated.
	* tree.c (type_contains_placeholder_1): Updated.
	* config/sparc/sparc.c (sparc_type_code): Updated.
	* config/ia64/ia64.c (hfa_element_mode): Updated.
	* expr.c (count_type_elements): Updated.
	* stor-layout.c (layout_type): Updated.
	* tree-inline.c (remap_type): Updated.
	* tree-pretty-print.c (dump_generic_node): Updated.
gcc/java:
	* decl.c (gnat_substitute_in_type): Don't handle FILE_TYPE.

From-SVN: r97282
2005-03-30 21:34:41 +00:00
Ian Lance Taylor c9d691e977 final.c (final): Remove prescan parameter.
* final.c (final): Remove prescan parameter.  Change all callers.
	(final_scan_insn): Remove prescan parameter.  Change all callers.

From-SVN: r97267
2005-03-30 18:53:35 +00:00
Richard Henderson dbdd120f4c config.gcc (ia64*-*-hpux*): Add extra_options.
* config.gcc (ia64*-*-hpux*): Add extra_options.
        * config/ia64/hpux.h (SUBTARGET_SWITCHES): Remove.
        (TARGET_DEFAULT): Remove MASK_INLINE_FLOAT_DIV_THR.
        * config/ia64/ia64.c (ia64_fixed_range_string): Remove.
        (ia64_tls_size_string, ia64_tune_string): Remove.
        (ia64_tune): Init to PROCESSOR_ITANIUM2.
        (TARGET_DEFAULT_TARGET_FLAGS): New.
        (TARGET_HANDLE_OPTION): New.
        (ia64_override_options): Move options parsing ...
        (ia64_handle_option): ... here.  New.
        * config/ia64/ia64.h (target_flags, MASK_BIG_ENDIAN, MASK_GNU_AS,
        MASK_GNU_LD, MASK_NO_PIC, MASK_VOL_ASM_STOP, MASK_ILP32,
        MASK_REG_NAMES, MASK_NO_SDATA, MASK_CONST_GP, MASK_AUTO_PIC,
        MASK_INLINE_FLOAT_DIV_LAT, MASK_INLINE_FLOAT_DIV_THR,
        MASK_INLINE_INT_DIV_LAT, MASK_INLINE_INT_DIV_THR,
        MASK_INLINE_SQRT_LAT, MASK_INLINE_SQRT_THR, MASK_DWARF2_ASM,
        MASK_EARLY_STOP_BITS, TARGET_BIG_ENDIAN, TARGET_GNU_AS, TARGET_GNU_LD,
        TARGET_NO_PIC, TARGET_VOL_ASM_STOP, TARGET_ILP32, TARGET_REG_NAMES,
        TARGET_NO_SDATA, TARGET_CONST_GP, TARGET_AUTO_PIC,
        TARGET_INLINE_FLOAT_DIV_LAT, TARGET_INLINE_FLOAT_DIV_THR,
        TARGET_INLINE_INT_DIV_LAT, TARGET_INLINE_INT_DIV_THR,
        TARGET_INLINE_FLOAT_DIV, TARGET_INLINE_INT_DIV, TARGET_INLINE_SQRT_LAT,
        TARGET_INLINE_SQRT_THR, TARGET_INLINE_SQRT, TARGET_DWARF2_ASM,
        TARGET_EARLY_STOP_BITS): Remove.
        (TARGET_ILP32): Default false.
        (TARGET_SWITCHES, SUBTARGET_SWITCHES, TARGET_OPTIONS): Remove.
        (enum ia64_inline_type): New.
        (TARGET_DEFAULT): Remove MASK_INLINE_FLOAT_DIV_THR.
        * config/ia64/ia64.md: Update for new definitions of
        TARGET_INLINE_INT_DIV, TARGET_INLINE_FLOAT_DIV, TARGET_INLINE_SQRT.
        * config/ia64/ia64.opt: New file.
        * config/ia64/ilp32.opt: New file.

From-SVN: r96621
2005-03-17 09:35:16 -08:00
James E Wilson 68e11b42af patch to fix extraneous nop at function start, bug from David Mosberger
patch to fix extraneous nop at function start, bug from David Mosberger
* config/ia64/ia64.c (issue_nops_and_insn): Check first_insn attribute,
and return without creating new state if before_nops_num is nonzero.
* config/ia64/ia64.md (first_insn): New attribute.
(alloc): Set it to yes.

From-SVN: r96597
2005-03-16 19:51:09 -08:00
Joseph Myers 543144ed5d hpux.h (LINK_SPEC): Add -z.
* config/ia64/hpux.h (LINK_SPEC): Add -z.
	* config/ia64/ia64.c (ia64_function_value): Return a REG not a
	PARALLEL for an empty structure.

From-SVN: r96004
2005-03-07 03:28:13 +00:00
James E Wilson 4c334b377c Remove obsolete IA-64 -mb-step option.
* doc/invoke.texi (IA-64 Options): Delete -mb-step.
* config/ia64/ia64.c (last_group, group_idx): Delete variables.
(errata_find_address_regs, errata_emit_nops, fixup_errata): Delete
functions.
(ia64_reorg): Delete fixup_errata call.
* config/ia64/ia64.h (MASK_B_STEP, TARGET_B_STEP): Delete.
(TARGET_SWITCHES): Delete -mb-step entry.

From-SVN: r95257
2005-02-18 17:02:23 -08:00
Joseph Myers 5b4275dbe9 re PR target/19886 (g++.dg/eh/registers1.C execution test fails)
PR target/19886
	* config/ia64/ia64.h (struct machine_function): Add state_num.
	* config/ia64/ia64.c (process_epilogue,
	process_for_unwind_directive): Use new unwind state numbers each
	time rather than state 1.

From-SVN: r95234
2005-02-18 21:23:16 +00:00
Richard Henderson 046625fab2 builtins.c (expand_builtin_copysign): New.
* builtins.c (expand_builtin_copysign): New.
        (expand_builtin): Call it.
        * genopinit.c (optabs): Add copysign_optab.
        * optabs.c (init_optabs): Initialize it.
        (expand_copysign): New.
        * optabs.h (OTI_copysign, copysign_optab): New.
        (expand_copysign): Declare.

        * config/alpha/alpha.md (UNSPEC_COPYSIGN): New.
        (copysignsf3, ncopysignsf3, copysigndf3, ncopysigndf3): New.

        * config/i386/i386.c (ix86_build_signbit_mask): Split from ...
        (ix86_expand_fp_absneg_operator): ... here.
        (ix86_split_copysign): New.
        * config/i386/i386-protos.h: Update.
        * config/i386/i386.md (UNSPEC_COPYSIGN): New.
        (copysignsf3, copysigndf3): New.

        * config/ia64/ia64.md (UNSPEC_COPYSIGN): New.
        (copysignsf3, ncopysignsf3): New.
        (copysigndf3, ncopysigndf3): New.
        (copysignxf3, ncopysignxf3): New.
        * config/ia64/ia64.c (rtx_needs_barrier): Handle UNSPEC_COPYSIGN.

From-SVN: r94357
2005-01-27 16:55:07 -08:00
Kazu Hirata 35fd3193de alias.c, [...]: Fix comment typos.
* alias.c, c-common.h, c-incpath.c, c-incpath.h, expr.c,
	fold-const.c, gimplify.c, params.h, tree-data-ref.c,
	tree-if-conv.c, tree-nested.c, tree-outof-ssa.c,
	tree-ssa-dom.c, tree-vectorizer.c, tree.def, config/darwin.c,
	config/freebsd-spec.h, config/arm/arm.h,
	config/h8300/h8300.md, config/i386/i386.md,
	config/i386/predicates.md, config/i386/sse.md,
	config/ia64/ia64.c, config/ip2k/ip2k.c, config/s390/s390.c,
	config/vax/vax.md: Fix comment typos.  Follow spelling
	conventions.

From-SVN: r94112
2005-01-23 15:05:49 +00:00
Alan Modra abb8b19a1f varasm.c (default_section_type_flags_1): Don't set SECTION_SMALL.
* varasm.c (default_section_type_flags_1): Don't set SECTION_SMALL.
	* config/ia64/ia64.c (TARGET_SECTION_TYPE_FLAGS): Define.
	(TARGET_RWRELOC): Define.
	(ia64_rwreloc_section_type_flags): Delete.
	(ia64_section_type_flags): New function.
	* config/ia64/hpux.h (TARGET_SECTION_TYPE_FLAGS): Don't define.
	(TARGET_RWRELOC): Define.

From-SVN: r93175
2005-01-11 14:37:28 +10:30