gcc/gcc/targhooks.c

1969 lines
48 KiB
C
Raw Normal View History

targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
/* Default target hook functions.
Copyright (C) 2003-2016 Free Software Foundation, Inc.
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
/* The migration of target macros to target hooks works as follows:
1. Create a target hook that uses the existing target macros to
implement the same functionality.
2. Convert all the MI files to use the hook instead of the macro.
3. Repeat for a majority of the remaining target macros. This will
take some time.
4. Tell target maintainers to start migrating.
5. Eventually convert the backends to override the hook instead of
defining the macros. This will take some time too.
6. TBD when, poison the macros. Unmigrated targets will break at
this point.
Note that we expect steps 1-3 to be done by the people that
understand what the MI does with each macro, and step 5 to be done
by the target maintainers for their respective targets.
Note that steps 1 and 2 don't have to be done together, but no
target can override the new hook until step 2 is complete for it.
Once the macros are poisoned, we will revert to the old migration
rules - migrate the macro, callers, and targets all at once. This
comment can thus be removed at that point. */
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
#include "config.h"
#include "system.h"
#include "coretypes.h"
alias.c: Reorder #include statements and remove duplicates. 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * alias.c: Reorder #include statements and remove duplicates. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-common.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-poly.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int-print.cc: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. From-SVN: r229526
2015-10-29 14:57:32 +01:00
#include "target.h"
#include "function.h"
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
#include "rtl.h"
#include "tree.h"
alias.c: Reorder #include statements and remove duplicates. 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * alias.c: Reorder #include statements and remove duplicates. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-common.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-poly.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int-print.cc: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. From-SVN: r229526
2015-10-29 14:57:32 +01:00
#include "tree-ssa-alias.h"
#include "gimple-expr.h"
#include "tm_p.h"
#include "stringpool.h"
#include "tree-ssanames.h"
#include "optabs.h"
#include "regs.h"
#include "recog.h"
#include "diagnostic-core.h"
genattrtab.c (write_header): Include hash-set.h... 2015-01-09 Michael Collison <michael.collison@linaro.org> * genattrtab.c (write_header): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-attrtab.c. * genautomata.c (main) : Include hash-set.h, macInclude hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-automata.c. * genemit.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-emit.c. * gengtype.c (open_base_files): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating gtype-desc.c. * genopinit.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-opinit.c. * genoutput.c (output_prologue): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-output.c. * genpeep.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-peep.c. * genpreds.c (write_insn_preds_c): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-preds.c. * optc-save-gen-awk: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating options-save.c. * opth-gen.awk: Change include guard from GCC_C_COMMON_H to GCC_C_COMMON_C when generating options.h. * ada/gcc-interface/cuintp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/decl.c: ditto. * ada/gcc-interface/misc.c: ditto. * ada/gcc-interface/targtyps.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, real.h, fold-const.h, wide-int.h, inchash.h due to flattening of tree.h. * ada/gcc-interface/utils.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/utils2.c: ditto. * alias.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * asan.c: ditto. * attribs.c: ditto. * auto-inc-dec.c: ditto. * auto-profile.c: ditto * bb-reorder.c: ditto. * bt-load.c: Include symtab.h due to flattening of tree.h. * builtins.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c/c-array-notation.c: ditto. * c/c-aux-info.c: ditto. * c/c-convert.c: ditto. * c/c-decl.c: ditto. * c/c-errors.c: ditto. * c/c-lang.c: dittoxs. * c/c-objc-common.c: ditto. * c/c-parser.c: ditto. * c/c-typeck.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * calls.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ccmp.c: ditto. * c-family/array-notation-common.c: ditto. * c-family/c-ada-spec.c: ditto. * c-family/c-cilkplus.c: ditto. * c-family/c-common.c: Include input.h due to flattening of tree.h. Define macro GCC_C_COMMON_C. * c-family/c-common.h: Flatten tree.h header files into c-common.h. Remove include of tree-core.h. * c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-dump.c: ditto. * c-family/c-format.c: Flatten tree.h header files into c-common.h. * c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-dump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-format.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * c-family/c-gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/cilk.c: ditto. * c-family/c-lex.c: ditto. * c-family/c-omp.c: ditto. * c-family/c-opts.c: ditto. * c-family/c-pch.c: ditto. * c-family/c-ppoutput.c: ditto. * c-family/c-pragma.c: ditto. * c-family/c-pretty-print.c: ditto. * c-family/c-semantics.c: ditto. * c-family/c-ubsan.c: ditto. * c-family/stub-objc.c: ditto. * cfgbuild.c: ditto. * cfg.c: ditto. * cfgcleanup.c: ditto. * cfgexpand.c: ditto. * cfghooks.c: ditto. * cfgloop.c: Include symtab.h, fold-const.h, and inchash.h due to flattening of tree.h. * cfgloopmanip.c: ditto. * cfgrtl.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * cgraphbuild.c: ditto. * cgraph.c: ditto. * cgraphclones.c: ditto. * cgraphunit.c: ditto. * cilk-common.c: ditto. * combine.c: ditto. * combine-stack-adj.c: Include symbol.h due to flattening of tree.h. * config/aarch64/aarch64-builtins.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/aarch64/aarch64.c: ditto. * config/alpha/alpha.c: ditto. * config/arc/arc.c: ditto. * config/arm/aarch-common.c: ditto. * config/arm/arm-builtins.c: ditto. * config/arm/arm.c: ditto. * config/arm/arm-c.c: ditto. * config/avr/avr.c: ditto. * config/avr/avr-c.c: ditto. * config/avr/avr-log.c: ditto. * config/bfin/bfin.c: ditto. * config/c6x/c6x.c: ditto. * config/cr16/cr16.c: ditto. * config/cris/cris.c: ditto. * config/darwin.c: ditto. * config/darwin-c.c: ditto. * config/default-c.c: ditto. * config/epiphany/epiphany.c: ditto. * config/fr30/fr30.c: ditto. * config/frv/frv.c: ditto. * config/glibc-c.c: ditto. * config/h8300/h8300.c: ditto. * config/i386/i386.c: ditto. * config/i386/i386-c.c: ditto. * config/i386/msformat.c: ditto. * config/i386/winnt.c: ditto. * config/i386/winnt-cxx.c: ditto. * config/i386/winnt-stubs.c: ditto. * config/ia64/ia64.c: ditto. * config/ia64/ia64-c.c: ditto. * config/iq2000/iq2000.c: ditto. * config/lm32/lm32.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/m32c/m32c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/m32c/m32c-pragma.c: ditto. * config/m32c/m32cr.c: ditto. * config/m68/m68k.c: ditto. * config/mcore/mcore.c: ditto. * config/mep/mep.c: ditto. * config/mep/mep-pragma.c: ditto. * config/microblaze/microblaze.c: ditto. * config/microblaze/microblaze-c.c: ditto. * config/mips/mips.c: ditto. * config/mmix/mmix.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/mn10300/mn10300.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/moxie/moxie.c: ditto. * config/msp430/msp430.c: ditto. * config/msp430/msp430-c.c: ditto. * config/nds32/nds32.c: ditto. * config/nds32/nds32-cost.c: ditto. * config/nds32/nds32-fp-as-gp.c: ditto. * config/nds32/nds32-intrinsic.c: ditto. * config/nds32/nds32-isr.c: ditto. * config/nds32/nds32-md-auxillary.c: ditto. * config/nds32/nds32-memory-manipulationx.c: ditto. * config/nds32/nds32-pipelines-auxillary.c: ditto. * config/nds32/nds32-predicates.c: ditto. * config/nios2/nios2.c: ditto. * config/nvptx/nvptx.c: ditto. * config/pa/pa.c: ditto. * config/pdp11/pdp11x.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/rl78/rl78.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/rl78/rl78-cx.c: ditto. * config/rs6000/rs6000.c: ditto. * config/rs6000/rs6000-c.c: ditto. * config/rx/rx.c: ditto. * config/s390/s390.c: ditto. * config/sh/sh.c: ditto. * config/sh/sc.c: ditto. * config/sh/sh-mem.cc: ditto. * config/sh/sh_treg_combine.cc: Include symtab.h, inchash.h and tree.h due to flattening of tree.h. Remove include of tree-core.h. * config/sol2.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/sol2-c.c: ditto. * config/sol2-cxx.c: ditto. * config/sol2-stubs.c: ditto. * config/sparc/sparc.c: ditto. * config/sparc/sparc-cx.c: ditto. * config/spu/spu.c: ditto. * config/spu/spu-c.c: ditto * config/storym16/stormy16.c: ditto. * config/tilegx/tilegx.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/gen-mul-tables.cc: Include symtab.h in generated file. * config/tilegx/tilegx-c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/tilepro.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/tilepro-c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/v850/v850.c: ditto. * config/v850/v850-c.c: ditto. * config/vax/vax.c: ditto. * config/vms/vms.c: ditto. * config/vms/vms-c.c: ditto. * config/vxworks.c: ditto. * config/winnt-c.c: ditto. * config/xtensa/xtensa.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * coverage.c: ditto. * cp/call.c: ditto. * cp/class.c: ditto. * cp/constexpr.c: ditto. * cp/cp-array-notation.c: ditto. * cp/cp-gimplify.c: ditto. * cp/cp-lang.c: ditto. * cp/cp-objcp-common.c: ditto. * cp/cvt.c: ditto. * cp/decl2.c: ditto. * cp/decl.c: ditto. * cp/dump.c: ditto. * cp/error.c: ditto. * cp/except.c: ditto. * cp/expr.c: ditto. * cp/friend.c: ditto. * cp/init.c: ditto. * cp/lambda.c: ditto. * cp/lex.c: ditto. * cp/mangle.c: ditto. * cp/name-lookup.c: ditto. * cp/optimize.c: ditto. * cp/parser.c: ditto. * cp/pt.c: ditto. * cp/ptree.c: ditto. * cp/repo.c: ditto. * cp/rtti.c: ditto. * cp/search.c: ditto. * cp/semantics.c: ditto. * cp/tree.c: ditto. * cp/typeck2.c: ditto. * cp/typeck.c: ditto. * cppbuiltin.c: ditto. * cprop.c: ditto. * cse.c: Add include of symtab.h due to flattening of tree.h. * cselib.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * data-streamer.c: ditto. * data-streamer-in.c: ditto. * data-streamer-out.c: ditto. * dbxout.c: ditto. * dce.c: ditto. * ddg.c: Add include of symtab.h due to flattening of tree.h. * debug.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * dfp.c: ditto. * df-scan.c: ditto. * dojump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * double-int.c: ditto. * dse.c: ditto. * dumpfile.c: ditto. * dwarf2asm.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * dwarf2cfi.c: ditto. * dwarf2out.c: ditto. * emit-rtl.c: ditto. * except.c: ditto. * explow.c: ditto. * expmed.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * expr.c: ditto. * final.c: ditto. * fixed-value.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and fixed-value.h due to flattening of tree.h. * fold-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. Relocate inline function convert_to_ptrofftype_loc from tree.h. Relocate inline function fold_build_pointer_plus_loc from tree.h. Relocate inline function fold_build_pointer_plus_hwi_loc from tree.h. * fold-const.h: Relocate macro convert_to_ptrofftype from tree.h. Relocate macro fold_build_pointer_plus to relocate from tree.h.h. Relocate macro fold_build_pointer_plus_hwi from tree.h. Add prototype for convert_to_ptrofftype_loc relocated from tree.h. Add prototype for fold_build_pointer_plus_loc relocated from tree.h. Add prototype for fold_build_pointer_plus_hwi_loc relocated from tree.h. * fortran/convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/decl.c: ditto. * fortran/f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/iresolve.c: ditto. * fortran/match.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/module.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/options.c: ditto. * fortran/target-memory.c: Include hash-set.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-const.c: ditto. * fortran/trans-decl.c: ditto. * fortran/trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * fortran/trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-openmp.c: ditto. * fortran/trans-stmt.c: ditto. * fortran/trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * function.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gcc-plugin.h: Include statistics.h, double-int.h, real.h, fixed-value.h, alias.h, flags.h, and symtab.h due to flattening of tree.h * gcse.c: ditto. * generic-match-head.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ggc-page.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimple-builder.c: ditto. * gimple.c: ditto. * gimple-expr.c: ditto. * gimple-fold.c: ditto. * gimple-iterator.c: ditto. * gimple-low.c: ditto. * gimple-match-head.c: ditto. * gimple-pretty-print.c: ditto. * generic-ssa-isolate-paths.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimple-ssa-strength-reduction.c: ditto. * gimple-streamer-in.c: ditto. * gimple-streamer-out.c: ditto. * gimple-walk.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimplify-me.c: ditto. * go/go-gcc.cc: ditto. * go/go-lang.c: ditto. * go/gdump.c: ditto. * graphite-blocking.c: ditto. * graphite.c: ditto. * graphite-dependencies.c: ditto. * graphite-interchange.c: ditto. * graphite-isl-ast-to-gimple.c: ditto. * graphite-optimize-isl.c: ditto. * graphite-poly.c: ditto. * graphite-scop-detection.c: ditto. * graphite-sese-to-poly.c: ditto. * hw-doloop.c: Include symtab.h due to flattening of tree.h. * ifcvt.c: ditto. * init-regs.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * internal-fc.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa.c: ditto. * ipa-chkp.c: ditto. * ipa-comdats.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-cp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-devirt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-icf.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-icf-gimple.c: ditto. * ipa-inline-analysis.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-inline.c: ditto. * ipa-inline-transform.c: ditto. * ipa-polymorhpic-call.c: ditto. * ipa-profile.c: ditto. * ipa-prop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-pure-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-reference.c: ditto. * ipa-split.c: ditto. * ipa-utils.c: ditto. * ipa-visbility.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ira.c: ditto. * ira-color.c: Include hash-set.h due to flattening of tree.h. * ira-costs.c: ditto. * ira-emit.c: ditto. * java/boehm.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/builtins.c: ditto. * java/class.c: ditto. * java/constants.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/decl.c: ditto. * java/except.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h,inchash.h and real.h due to flattening of tree.h. * java/gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/jcf-dump.c: ditto. * java/jcf-io.c: ditto. * java/jcf-parse.c: ditto. * java/jvgenmain.c: ditto. * java/lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/mangle.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/mangle_name.c: ditto. * java/resource.c: ditto. * java/typeck.c: ditto. * java/verify-glue.c: ditto. * java/verify-impl.c: ditto. * jump.c: Include symtab.h due to flattening of tree.h. * langhooks.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * loop-doloop.c: Include symtab.h due to flattening of tree.h. * loop-init.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * loop-invariant.c: Include symtab.h due to flattening of tree.h. * loop-iv.c: ditto. * loop-unroll.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lower-subreg.c: ditto. * lra-assigns.c: Include symtab.h due to flattening of tree.h. * lra.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * lra-coalesce.c: Include symtab.h due to flattening of tree.h. * lra-constraints.c: ditto. * lra-eliminations.c: ditto. * lra-livesc: ditto. * lra-remat.c: ditto. * lra-spills.c: ditto. * lto/lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-partition.c: ditto. * lto/lto-symtab.c: ditto. * lto-cgraph.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-compress.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-opts.c: ditto. * lto-section-in.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-section-out.c: ditto. * lto-streamer.c: ditto. * lto-streamer-in.c: ditto. * lto-streamer-out.c: ditto. * modulo-sched.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * objc/objc-act.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * objc/objc-encoding.c: ditto. * objc/objc-gnu-runtime-abi-01.c: ditto. * objc/objc-lang.c: ditto. * objc/objc-map.c: ditto. * objc/objc-next-runtime-abi-01.c: ditto. * objc/objc-next-runtime-abi-02.c: ditto. * objc/objc-runtime-shared-support.c: ditto. * objcp/objcp-decl.c: ditto. * objcp/objcp-lang.c: ditto. * omega.c: ditto. * omega-low.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * optabs.c: ditto. * opts-global.c: ditto. * passes.c: ditto. * plugin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * postreload.c: Include symtab.h due to flattening of tree.h. * postreload-gcse.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * predict.c: ditto. * print-rtl.c: ditto. * print-tree.c: ditto. * profile.c: Include symtab.h, fold-const.h and inchash.h due to flattening of tree.h. * real.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * realmpfr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * recog.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ree.c: ditto. * reginfo.c: ditto. * reg-stack.c: ditto. * reload1.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * reload.c: Include symtab.h due to flattening of tree.h. * reorg.c: ditto. * rtlanal.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * rtl-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * rtlhooks.c: Include symtab.h due to flattening of tree.h. * sanopt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * sched-deps.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * sched-vis.c: ditto. * sdbout.c: ditto. * sel-sched.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * sel-sched-ir.c: ditto. * sese.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * shrink-wrap.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * simplify-rtx.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * stack-ptr-mod.c: ditto. * stmt.c: ditto. * store-motion.c: ditto. * store-layout.c: ditto. * stringpool.c: ditto. * symtab.c: ditto. * target-globals.c: ditto. * targhooks.c: ditto. * toplev.c: ditto. * tracer.c: ditto. * trans-mem.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-affine.c: ditto. * tree-browser.c: ditto. * tree.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-call-cdce.c: Include symtab.h, alias.h, double-int.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-cfg.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-cfgcleanup.c: ditto. * tree-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-chkp-opt.c: ditto. * tree-chrec.c: ditto. * tree-chkp-opt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-core.h: Flatten header file by removing all #include statements. * tree-data-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-dfa.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-diagnostic.c: ditto. * tree-dump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-dfa.c: ditto. * tree-eh.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-emutls.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree.h: Flatten header files by removing all includes except tree-core.h. Remove inline function convert_to_ptrofftype_loc to relocate to fold-const.c. Remove macro convert_to_ptrofftype to relocate to fold-const.h. Remove inline function fold_build_pointer_plus_loc to relocate to fold-const.c. Remove macro fold_build_pointer_plus to relocate to fold-const.h. Remove inline function fold_build_pointer_plus_hwi_loc to relocate to fold-const.c. Remove macro fold_build_pointer_plus_hwi to relocate to fold-const.h. * tree-if-conv.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-inline.c: ditto. * tree-into-ssa.c: ditto. * tree-iterator.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-loop-distribution.c: ditto. * tree-nested.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-nrv.c: ditto. * tree-object-size.c: ditto. * tree-outof-ssa.c: ditto. * tree-parloops.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-phinodes.c: ditto. * tree-predcom.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-pretty-print.c: ditto. * tree-profile.c: double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-scalar-evolution.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-sra.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-ssa-alias.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa.c: ditto. * tree-ssa-ccp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-ssa-coalesce.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-copy.c: ditto. * tree-ssa-copyrename.c: ditto. * tree-ssa-dce.c: ditto. * tree-ssa-dom.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-ssa-dse.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-forwprop.c: ditto. * tree-ssa-ifcombine.c: ditto. * tree-ssa-live.c: ditto. * tree-ssa-loop.c: ditto. * tree-ssa-loop-ch.c: ditto. * tree-ssa-loop-im.c: ditto. * tree-ssa-loop-ivcanon.c: ditto. * tree-ssa-loop-ivopts.c: ditto. * tree-ssa-loop-manip.c: ditto. * tree-ssa-loop-niter.c: ditto. * tree-ssa-loop-prefetch.c: ditto. * tree-ssa-loop-unswitch.c: ditto. * tree-ssa-loop-math-opts.c: ditto. * tree-ssanames.c: ditto. * tree-ssa-operands.c: ditto. * tree-ssa-phiopt.c: ditto. * tree-ssa-phiprop.c: ditto. * tree-ssa-pre.c: ditto. * tree-ssa-propagate.c: ditto. * tree-ssa-reassoc.c: ditto. * tree-ssa-sccvn.c: ditto. * tree-ssa-sink.c: ditto. * tree-ssa-strlen.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-structalias.c: double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-tail-merge.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-ter.c: ditto. * tree-ssa-threadedge.c: ditto. * tree-ssa-threadupdate.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-uncprop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-uninit.c: ditto. * tree-stdarg.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-streamer.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-streamer-in.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-streamer-out.c: dittoo. * tree-switch-conversion.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-tailcall.c: ditto. * tree-vect-data-refs.c: ditto. * tree-vect-generic.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-vect-loop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-vect-loop-manip.c: ditto. * tree-vectorizer.c: ditto. * tree-vect-patterns.c: ditto. * tree-vect-slp.c: ditto. * tree-vect-stmts.c: ditto. * tree-vrp.c: ditto. * tsan.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * ubsan.c: ditto. * value-prof.c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * varasm.c: ditto. * varpool.c: ditto. * var-tracking.c: ditto. * vmsdbgout.c: ditto. * vtable-verify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * wide-int.cc: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * xcoffout.c: ditto. * libcc1/plugin.cc: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. From-SVN: r219402
2015-01-09 21:18:42 +01:00
#include "fold-const.h"
Factor unrelated declarations out of tree.h. This patch applies the rule that functions defined in FOO.c must be declared in FOO.h. One of the worst offenders in the code base is tree.h, unsurprisingly. The patch creates several new headers: attribs.h calls.h fold-const.h gcc-symtab.h print-rtl.h print-tree.h stmt.h stor-layout.h stringpool.h tree-nested.h tree-object-size.h varasm.h. Functions in each corresponding .c file got moved to those headers and others that already existed. I wanted to make this patch as mechanical as possible, so I made no attempt to fix problems like having build_addr defined in tree-inline.c. I left that for later. There were some declarations that I could not move out of tree.h because of header poisoning or the use of target macros. We forbid the inclusion of things like expr.h from FE files. While that's a reasonable idea, the FE file *still* manage to at expr.c functionality because the declarations they want to use were defined in tree.h. The affected files are builtins.h, emit-rtl.h and expr.h. If that functionality is allowed to be accessed from the FEs, then I will later move those functions out of expr.c into tree.c. I have moved these declarations to the bottom of tree.h so they are easy to identify later. There is a namespace collision with libcpp. The file gcc/symtab.c cannot use gcc/symtab.h because the #include command picks up libcpp/include/symtab.h first. So I named this file gcc-symtab.h for now. Finally, I added a new header to PLUGIN_HEADERS to account for the tree.h refactoring. I did not add all headers factored out of tree.h because it is unclear (and impossible to tell) what plugins need. This adds the one header used by the plugins in the testsuite. This will be changing quite dramatically as we progress with the header refactoring. This patch should offer some minimal incremental build advantages by reducing the size of tree.h. Changes that would otherwise affected tree.h, will now go to other headers which are less frequently included. * tree.h: Include fold-const.h. (aggregate_value_p): Moved to function.h. (alloca_call_p): Moved to calls.h. (allocate_struct_function): Moved to function.h. (apply_tm_attr): Moved to attribs.h. (array_at_struct_end_p): Moved to expr.h. (array_ref_element_size): Moved to tree-dfa.h. (array_ref_low_bound): Moved to tree-dfa.h. (array_ref_up_bound): Moved to tree.h. (assemble_alias): Moved to cgraph.h. (bit_from_pos): Moved to stor-layout.h. (build_addr): Moved to tree-nested.h. (build_duplicate_type): Moved to tree-inline.h. (build_fold_addr_expr): Moved to fold-const.h. (build_fold_addr_expr_with_type): Moved to fold-const.h. (build_fold_addr_expr_with_type_loc): Moved to fold-const.h. (build_fold_indirect_ref): Moved to fold-const.h. (build_fold_indirect_ref_loc): Moved to fold-const.h. (build_personality_function): Moved to tree.h. (build_range_check): Moved to fold-const.h. (build_simple_mem_ref): Moved to fold-const.h. (build_simple_mem_ref_loc): Moved to fold-const.h. (build_tm_abort_call): Moved to trans-mem.h. (byte_from_pos): Moved to stor-layout.h. (call_expr_flags): Moved to calls.h. (can_move_by_pieces): Moved to expr.h. (categorize_ctor_elements): Moved to expr.h. (change_decl_assembler_name): Moved to gcc-symtab.h. (combine_comparisons): Moved to fold-const.h. (complete_ctor_at_level_p): Moved to tree.h. (component_ref_field_offset): Moved to tree-dfa.h. (compute_builtin_object_size): Moved to tree-object-size.h. (compute_record_mode): Moved to stor-layout.h. (constant_boolean_node): Moved to fold-const.h. (constructor_static_from_elts_p): Moved to varasm.h. (cxx11_attribute_p): Moved to attribs.h. (debug_body): Moved to print-tree.h. (debug_find_tree): Moved to tree-inline.h. (debug_fold_checksum): Moved to fold-const.h. (debug_head): Moved to print-tree.h. (debug_head): Moved to print-tree.h. (debug_raw): Moved to print-tree.h. (debug_tree): Moved to print-tree.h. (debug_vec_tree): Moved to print-tree.h. (debug_verbose): Moved to print-tree.h. (debug_verbose): Moved to print-tree.h. (decl_attributes): Moved to attribs.h. (decl_binds_to_current_def_p): Moved to varasm.h. (decl_default_tls_model): Moved to varasm.h. (decl_replaceable_p): Moved to varasm.h. (div_if_zero_remainder): Moved to fold-const.h. (double_int mem_ref_offset): Moved to fold-const.h. (dump_addr): Moved to print-tree.h. (element_precision): Moved to machmode.h. (expand_dummy_function_end): Moved to function.h. (expand_function_end): Moved to function.h. (expand_function_start): Moved to function.h. (expand_label): Moved to stmt.h. (expr_first): Moved to tree-iterator.h. (expr_last): Moved to tree-iterator.h. (finalize_size_functions): Moved to stor-layout.h. (finish_builtin_struct): Moved to stor-layout.h. (finish_record_layout): Moved to stor-layout.h. (fixup_signed_type): Moved to stor-layout.h. (fixup_unsigned_type): Moved to stor-layout.h. (flags_from_decl_or_type): Moved to calls.h. (fold): Moved to fold-const.h. (fold_abs_const): Moved to fold-const.h. (fold_binary): Moved to fold-const.h. (fold_binary_loc): Moved to fold-const.h. (fold_binary_to_constant): Moved to fold-const.h. (fold_build1): Moved to fold-const.h. (fold_build1_initializer_loc): Moved to fold-const.h. (fold_build1_loc): Moved to fold-const.h. (fold_build1_stat_loc): Moved to fold-const.h. (fold_build2): Moved to fold-const.h. (fold_build2_initializer_loc): Moved to fold-const.h. (fold_build2_loc): Moved to fold-const.h. (fold_build2_stat_loc): Moved to fold-const.h. (fold_build3): Moved to fold-const.h. (fold_build3_loc): Moved to fold-const.h. (fold_build3_stat_loc): Moved to fold-const.h. (fold_build_call_array): Moved to fold-const.h. (fold_build_call_array_initializer): Moved to fold-const.h. (fold_build_call_array_initializer_loc): Moved to fold-const.h. (fold_build_call_array_loc): Moved to fold-const.h. (fold_build_cleanup_point_expr): Moved to fold-const.h. (fold_convert): Moved to fold-const.h. (fold_convert_loc): Moved to fold-const.h. (fold_convertible_p): Moved to fold-const.h. (fold_defer_overflow_warnings): Moved to fold-const.h. (fold_deferring_overflow_warnings_p): Moved to fold-const.h. (fold_fma): Moved to fold-const.h. (fold_ignored_result): Moved to fold-const.h. (fold_indirect_ref): Moved to fold-const.h. (fold_indirect_ref_1): Moved to fold-const.h. (fold_indirect_ref_loc): Moved to fold-const.h. (fold_read_from_constant_string): Moved to fold-const.h. (fold_real_zero_addition_p): Moved to fold-const.h. (fold_single_bit_test): Moved to fold-const.h. (fold_strip_sign_ops): Moved to fold-const.h. (fold_ternary): Moved to fold-const.h. (fold_ternary_loc): Moved to fold-const.h. (fold_unary): Moved to tree-data-ref.h. (fold_unary_ignore_overflow): Moved to fold-const.h. (fold_unary_ignore_overflow_loc): Moved to fold-const.h. (fold_unary_loc): Moved to fold-const.h. (fold_unary_to_constant): Moved to fold-const.h. (fold_undefer_and_ignore_overflow_warnings): Moved to fold-const.h. (fold_undefer_overflow_warnings): Moved to fold-const.h. (folding_initializer): Moved to fold-const.h. (free_temp_slots): Moved to function.h. (generate_setjmp_warnings): Moved to function.h. (get_attribute_name): Moved to attribs.h. (get_identifier): Moved to stringpool.h. (get_identifier_with_length): Moved to stringpool.h. (get_inner_reference): Moved to tree.h. (gimple_alloca_call_p): Moved to calls.h. (gimplify_parameters): Moved to function.h. (highest_pow2_factor): Moved to expr.h. (indent_to): Moved to print-tree.h. (init_attributes): Moved to attribs.h. (init_dummy_function_start): Moved to function.h. (init_function_start): Moved to function.h. (init_inline_once): Moved to tree-inline.h. (init_object_sizes): Moved to tree-object-size.h. (init_temp_slots): Moved to function.h. (init_tree_optimization_optabs): Moved to optabs.h. (initialize_sizetypes): Moved to stor-layout.h. (initializer_constant_valid_for_bitfield_p): Moved to varasm.h. (initializer_constant_valid_p): Moved to varasm.h. (int_const_binop): Moved to fold-const.h. (internal_reference_types): Moved to stor-layout.h. (invert_tree_comparison): Moved to fold-const.h. (invert_truthvalue): Moved to fold-const.h. (invert_truthvalue_loc): Moved to fold-const.h. (is_tm_ending_fndecl): Moved to trans-mem.h. (is_tm_may_cancel_outer): Moved to trans-mem.h. (is_tm_pure): Moved to trans-mem.h. (is_tm_safe): Moved to trans-mem.h. (layout_decl): Moved to stor-layout.h. (layout_type): Moved to stor-layout.h. (lookup_attribute_spec): Moved to attribs.h. (make_accum_type): Moved to stor-layout.h. (make_decl_one_only): Moved to varasm.h. (make_decl_rtl): Moved to tree.h. (make_decl_rtl_for_debug): Moved to varasm.h. (make_fract_type): Moved to stor-layout.h. (make_or_reuse_sat_signed_accum_type): Moved to stor-layout.h. (make_or_reuse_sat_signed_fract_type): Moved to stor-layout.h. (make_or_reuse_sat_unsigned_accum_type): Moved to stor-layout.h. (make_or_reuse_sat_unsigned_fract_type): Moved to stor-layout.h. (make_or_reuse_signed_accum_type): Moved to stor-layout.h. (make_or_reuse_signed_fract_type): Moved to stor-layout.h. (make_or_reuse_unsigned_accum_type): Moved to stor-layout.h. (make_or_reuse_unsigned_fract_type): Moved to stor-layout.h. (make_range): Moved to fold-const.h. (make_range_step): Moved to fold-const.h. (make_sat_signed_accum_type): Moved to stor-layout.h. (make_sat_signed_fract_type): Moved to stor-layout.h. (make_sat_unsigned_accum_type): Moved to stor-layout.h. (make_sat_unsigned_fract_type): Moved to stor-layout.h. (make_signed_accum_type): Moved to stor-layout.h. (make_signed_fract_type): Moved to stor-layout.h. (make_signed_type): Moved to stor-layout.h. (make_unsigned_accum_type): Moved to stor-layout.h. (make_unsigned_fract_type): Moved to stor-layout.h. (make_unsigned_type): Moved to stor-layout.h. (mark_decl_referenced): Moved to varasm.h. (mark_referenced): Moved to varasm.h. (may_negate_without_overflow_p): Moved to fold-const.h. (maybe_get_identifier): Moved to stringpool.h. (merge_ranges): Moved to fold-const.h. (merge_weak): Moved to varasm.h. (mode_for_size_tree): Moved to stor-layout.h. (multiple_of_p): Moved to fold-const.h. (must_pass_in_stack_var_size): Moved to calls.h. (must_pass_in_stack_var_size_or_pad): Moved to calls.h. (native_encode_expr): Moved to fold-const.h. (native_interpret_expr): Moved to fold-const.h. (non_lvalue): Moved to fold-const.h. (non_lvalue_loc): Moved to fold-const.h. (normalize_offset): Moved to stor-layout.h. (normalize_rli): Moved to stor-layout.h. (notice_global_symbol): Moved to varasm.h. (omit_one_operand): Moved to fold-const.h. (omit_one_operand_loc): Moved to fold-const.h. (omit_two_operands): Moved to fold-const.h. (omit_two_operands_loc): Moved to fold-const.h. (operand_equal_p): Moved to tree-data-ref.h. (parse_input_constraint): Moved to stmt.h. (parse_output_constraint): Moved to stmt.h. (place_field): Moved to stor-layout.h. (pop_function_context): Moved to function.h. (pop_temp_slots): Moved to function.h. (pos_from_bit): Moved to stor-layout.h. (preserve_temp_slots): Moved to function.h. (print_node): Moved to print-tree.h. (print_node_brief): Moved to print-tree.h. (print_rtl): Moved to rtl.h. (process_pending_assemble_externals): Moved to varasm.h. (ptr_difference_const): Moved to fold-const.h. (push_function_context): Moved to function.h. (push_struct_function): Moved to function.h. (push_temp_slots): Moved to function.h. (record_tm_replacement): Moved to trans-mem.h. (relayout_decl): Moved to stor-layout.h. (resolve_asm_operand_names): Moved to stmt.h. (resolve_unique_section): Moved to varasm.h. (rli_size_so_far): Moved to stor-layout.h. (rli_size_unit_so_far): Moved to stor-layout.h. (round_down): Moved to fold-const.h. (round_down_loc): Moved to fold-const.h. (round_up): Moved to fold-const.h. (round_up_loc): Moved to fold-const.h. (set_decl_incoming_rtl): Moved to emit-rtl.h. (set_decl_rtl): Moved to tree.h. (set_min_and_max_values_for_integral_type): Moved to stor-layout.h. (set_user_assembler_name): Moved to varasm.h. (setjmp_call_p): Moved to calls.h. (size_binop): Moved to fold-const.h. (size_binop_loc): Moved to fold-const.h. (size_diffop): Moved to fold-const.h. (size_diffop_loc): Moved to fold-const.h. (size_int_kind): Moved to fold-const.h. (stack_protect_epilogue): Moved to function.h. (start_record_layout): Moved to stor-layout.h. (supports_one_only): Moved to varasm.h. (swap_tree_comparison): Moved to fold-const.h. (tm_malloc_replacement): Moved to trans-mem.h. (tree build_fold_addr_expr_loc): Moved to fold-const.h. (tree build_invariant_address): Moved to fold-const.h. (tree_binary_nonnegative_warnv_p): Moved to fold-const.h. (tree_binary_nonzero_warnv_p): Moved to fold-const.h. (tree_call_nonnegative_warnv_p): Moved to fold-const.h. (tree_expr_nonnegative_p): Moved to fold-const.h. (tree_expr_nonnegative_warnv_p): Moved to fold-const.h. (tree_output_constant_def): Moved to varasm.h. (tree_overlaps_hard_reg_set): Moved to stmt.h. (tree_single_nonnegative_warnv_p): Moved to fold-const.h. (tree_single_nonzero_warnv_p): Moved to fold-const.h. (tree_swap_operands_p): Moved to fold-const.h. (tree_unary_nonnegative_warnv_p): Moved to fold-const.h. (tree_unary_nonzero_warnv_p): Moved to fold-const.h. (update_alignment_for_field): Moved to stor-layout.h. (use_register_for_decl): Moved to function.h. (variable_size): Moved to rtl.h. (vector_type_mode): Moved to stor-layout.h. * cgraph.h: Corresponding changes. * emit-rtl.h: Corresponding changes. * expr.h: Corresponding changes. * function.h: Corresponding changes. * optabs.h: Corresponding changes. * trans-mem.h: Corresponding changes. Protect against multiple inclusion. * tree-inline.h: Corresponding changes. * tree-iterator.h: Corresponding changes. * tree-dfa.h: Include expr.h. * tree-ssanames.h: Include stringpool.h. * attribs.h: New file. * calls.h: New file. * fold-const.h: New file. * gcc-symtab.h: New file. * print-rtl.h: New file. * print-tree.h: New file. * stmt.h: New file. * stor-layout.h: New file. * strinpool.h: New file. * tree-nested.h: New file * tree-object-size.h: New file. * varasm.h: New file. * Makefile.in (PLUGIN_HEADERS): Add stringpool.h. * alias.c: Include varasm.h. Include expr.h. * asan.c: Include calls.h. Include stor-layout.h. Include varasm.h. * attribs.c: Include stringpool.h. Include attribs.h. Include stor-layout.h. * builtins.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. Include tree-object-size.h. * calls.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include attribs.h. * cfgexpand.c: Include stringpool.h. Include varasm.h. Include stor-layout.h. Include stmt.h. Include print-tree.h. * cgraph.c: Include varasm.h. Include calls.h. Include print-tree.h. * cgraphclones.c: Include stringpool.h. Include function.h. Include emit-rtl.h. Move inclusion of rtl.h earlier in the file. * cgraphunit.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. * cilk-common.c: Include stringpool.h. Include stor-layout.h. * combine.c: Include stor-layout.h. * config/aarch64/aarch64-builtins.c: Include stor-layout.h. Include stringpool.h. Include calls.h. * config/aarch64/aarch64.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/alpha/alpha.c: Include stor-layout.h. Include calls.h. Include varasm.h. * config/arc/arc.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. Include calls.h. * config/arm/arm.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/avr/avr-c.c: Include stor-layout.h. * config/avr/avr-log.c: Include print-tree.h. * config/avr/avr.c: Include print-tree.h. Include calls.h. Include stor-layout.h. Include stringpool.h. * config/bfin/bfin.c: Include varasm.h. Include calls.h. * config/c6x/c6x.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/cr16/cr16.c: Include stor-layout.h. Include calls.h. * config/cris/cris.c: Include varasm.h. Include stor-layout.h. Include calls.h. Include stmt.h. * config/darwin.c: Include stringpool.h. Include varasm.h. Include stor-layout.h. * config/epiphany/epiphany.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/fr30/fr30.c: Include stor-layout.h. Include varasm.h. * config/frv/frv.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. * config/h8300/h8300.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/i386/i386.c: Include stringpool.h. Include attribs.h. Include calls.h. Include stor-layout.h. Include varasm.h. * config/i386/winnt-cxx.c: Include stringpool.h. Include attribs.h. * config/i386/winnt.c: Include stringpool.h. Include varasm.h. * config/ia64/ia64-c.c: Include stringpool.h. * config/ia64/ia64.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/iq2000/iq2000.c: Include stor-layout.h. Include calls.h. Include varasm.h. * config/lm32/lm32.c: Include calls.h. * config/m32c/m32c.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/m32r/m32r.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include calls.h. * config/m68k/m68k.c: Include calls.h. Include stor-layout.h. Include varasm.h. * config/mcore/mcore.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include calls.h. * config/mep/mep.c: Include varasm.h. Include calls.h. Include stringpool.h. Include stor-layout.h. * config/microblaze/microblaze.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/mips/mips.c: Include varasm.h. Include stringpool.h. Include stor-layout.h. Include calls.h. * config/mmix/mmix.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/mn10300/mn10300.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/moxie/moxie.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/msp430/msp430.c: Include stor-layout.h. Include calls.h. * config/nds32/nds32.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/pa/pa.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. Include calls.h. * config/pdp11/pdp11.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/picochip/picochip.c: Include calls.h. Include stor-layout.h. Include stringpool.h. Include varasm.h. * config/rl78/rl78.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/rs6000/rs6000-c.c: Include stor-layout.h. Include stringpool.h. * config/rs6000/rs6000.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include print-tree.h. Include varasm.h. * config/rx/rx.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/s390/s390.c: Include print-tree.h. Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/score/score.c: Include stringpool.h. Include calls.h. Include varasm.h. Include stor-layout.h. * config/sh/sh-c.c: Include stringpool.h. Include attribs.h.h. * config/sh/sh.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/sol2-c.c: Include stringpool.h. Include attribs.h. * config/sol2-cxx.c: Include stringpool.h. * config/sol2.c: Include stringpool.h. Include varasm.h. * config/sparc/sparc.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/spu/spu-c.c: Include stringpool.h. * config/spu/spu.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/stormy16/stormy16.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/tilegx/tilegx.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/tilepro/tilepro.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/v850/v850-c.c: Include stringpool.h. Include attribs.h. * config/v850/v850.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/vax/vax.c: Include calls.h. Include varasm.h. * config/vms/vms.c: Include stringpool.h. * config/vxworks.c: Include stringpool.h. * config/xtensa/xtensa.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * convert.c: Include stor-layout.h. * coverage.c: Include stringpool.h. Include stor-layout.h. * dbxout.c: Include varasm.h. Include stor-layout.h. * dojump.c: Include stor-layout.h. * dse.c: Include stor-layout.h. * dwarf2asm.c: Include stringpool.h. Include varasm.h. * dwarf2cfi.c: Include stor-layout.h. * dwarf2out.c: Include rtl.h. Include stringpool.h. Include stor-layout.h. Include varasm.h. Include function.h. Include emit-rtl.h. Move inclusion of rtl.h earlier in the file. * emit-rtl.c: Include varasm.h. * except.c: Include stringpool.h. Include stor-layout.h. * explow.c: Include stor-layout.h. * expmed.c: Include stor-layout.h. * expr.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. Include varasm.h. * final.c: Include varasm.h. * fold-const.c: Include stor-layout.h. Include calls.h. Include tree-iterator.h. * function.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. * genattrtab.c (write_header): Emit includes for varasm.h, stor-layout.h and calls.h. * genautomata.c (main): Likewise. * genemit.c: Likewise. * genopinit.c: Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c: Likewise. * genpreds.c (write_insn_preds_c): Likewise. * gengtype.c (open_base_files): Add stringpool.h. * gimple-expr.c: Include stringpool.h. Include stor-layout.h. * gimple-fold.c: Include stringpool.h. Include expr.h. Include stmt.h. Include stor-layout.h. * gimple-low.c: Include tree-nested.h. Include calls.h. * gimple-pretty-print.c: Include stringpool.h. * gimple-ssa-strength-reduction.c: Include stor-layout.h. Include expr.h. * gimple-walk.c: Include stmt.h. * gimple.c: Include calls.h. Include stmt.h. Include stor-layout.h. * gimplify.c: Include stringpool.h. Include calls.h. Include varasm.h. Include stor-layout.h. Include stmt.h. Include print-tree.h. Include expr.h. * gimplify-me.c: Include stmt.h Include stor-layout.h * internal-fn.c: Include stor-layout.h. * ipa-devirt.c: Include print-tree.h. Include calls.h. * ipa-inline-analysis.c: Include stor-layout.h. Include stringpool.h. Include print-tree.h. * ipa-inline.c: Include trans-mem.h. Include calls.h. * ipa-prop.c: Include expr.h. Include stor-layout.h. Include print-tree.h. * ipa-pure-const.c: Include print-tree.h. Include calls.h. * ipa-reference.c: Include calls.h. * ipa-split.c: Include stringpool.h. Include expr.h. Include calls.h. * ipa.c: Include calls.h. Include stringpool.h. * langhooks.c: Include stringpool.h. Include attribs.h. * lto-cgraph.c: Include stringpool.h. * lto-streamer-in.c: Include stringpool.h. * lto-streamer-out.c: Include stor-layout.h. Include stringpool.h. * omp-low.c: Include stringpool.h. Include stor-layout.h. Include expr.h. * optabs.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. * passes.c: Include varasm.h. * predict.c: Include calls.h. * print-rtl.c: Include print-tree.h. * print-tree.c: Include varasm.h. Include print-rtl.h. Include stor-layout.h. * realmpfr.c: Include stor-layout.h. * reg-stack.c: Include varasm.h. * sdbout.c: Include varasm.h. Include stor-layout.h. * simplify-rtx.c: Include varasm.h. * stmt.c: Include varasm.h. Include stor-layout.h. * stor-layout.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. Include print-tree.h. * symtab.c: Include rtl.h. Include print-tree.h. Include varasm.h. Include function.h. Include emit-rtl.h. * targhooks.c: Include stor-layout.h. Include varasm.h. * toplev.c: Include varasm.h. Include tree-inline.h. * trans-mem.c: Include calls.h. Include function.h. Include rtl.h. Include emit-rtl.h. * tree-affine.c: Include expr.h. * tree-browser.c: Include print-tree.h. * tree-call-cdce.c: Include stor-layout.h. * tree-cfg.c: Include trans-mem.h. Include stor-layout.h. Include print-tree.h. * tree-complex.c: Include stor-layout.h. * tree-data-ref.c: Include expr.h. * tree-dfa.c: Include stor-layout.h. * tree-eh.c: Include expr.h. Include calls.h. * tree-emutls.c: Include stor-layout.h. Include varasm.h. * tree-if-conv.c: Include stor-layout.h. * tree-inline.c: Include stor-layout.h. Include calls.h. * tree-loop-distribution.c: Include stor-layout.h. * tree-nested.c: Include stringpool.h. Include stor-layout.h. * tree-object-size.c: Include tree-object-size.h. * tree-outof-ssa.c: Include stor-layout.h. * tree-parloops.c: Include stor-layout.h. Include tree-nested.h. * tree-pretty-print.c: Include stor-layout.h. Include expr.h. * tree-profile.c: Include varasm.h. Include tree-nested.h. * tree-scalar-evolution.c: Include expr.h. * tree-sra.c: Include stor-layout.h. * tree-ssa-address.c: Include stor-layout.h. * tree-ssa-ccp.c: Include stor-layout.h. * tree-ssa-dce.c: Include calls.h. * tree-ssa-dom.c: Include stor-layout.h. * tree-ssa-forwprop.c: Include stor-layout.h. * tree-ssa-ifcombine.c: Include stor-layout.h. * tree-ssa-loop-ivopts.c: Include stor-layout.h. * tree-ssa-loop-niter.c: Include calls.h. Include expr.h. * tree-ssa-loop-prefetch.c: Include stor-layout.h. * tree-ssa-math-opts.c: Include stor-layout.h. * tree-ssa-operands.c: Include stmt.h. Include print-tree.h. * tree-ssa-phiopt.c: Include stor-layout.h. * tree-ssa-reassoc.c: Include stor-layout.h. * tree-ssa-sccvn.c: Include stor-layout.h. * tree-ssa-sink.c: Include stor-layout.h. * tree-ssa-strlen.c: Include stor-layout.h. * tree-ssa-structalias.c: Include stor-layout.h. Include stmt.h. * tree-ssa-tail-merge.c: Include stor-layout.h. Include trans-mem.h. * tree-ssa-uncprop.c: Include stor-layout.h. * tree-ssa.c: Include stor-layout.h. * tree-ssanames.c: Include stor-layout.h. * tree-streamer-in.c: Include stringpool.h. * tree-streamer-out.c: Include stor-layout.h. * tree-switch-conversion.c: Include varasm.h. Include stor-layout.h. * tree-tailcall.c: Include stor-layout.h. * tree-vect-data-refs.c: Include stor-layout.h. * tree-vect-generic.c: Include stor-layout.h. * tree-vect-loop.c: Include stor-layout.h. * tree-vect-patterns.c: Include stor-layout.h. * tree-vect-slp.c: Include stor-layout.h. * tree-vect-stmts.c: Include stor-layout.h. * tree-vectorizer.c: Include stor-layout.h. * tree-vrp.c: Include stor-layout.h. Include calls.h. * tree.c: Include stor-layout.h. Include calls.h. Include attribs.h. Include varasm.h. * tsan.c: Include expr.h. * ubsan.c: Include stor-layout.h. Include stringpool.h. * value-prof.c: Include tree-nested.h. Include calls.h. * var-tracking.c: Include varasm.h. Include stor-layout.h. * varasm.c: Include stor-layout.h. Include stringpool.h. Include gcc-symtab.h. Include varasm.h. * varpool.c: Include varasm.h. * vmsdbgout.c: Include varasm.h. * xcoffout.c: Include varasm.h. ada/ChangeLog * gcc-interface/decl.c: Include stringpool.h Include stor-layout.h * gcc-interface/misc.c: Include stor-layout.h Include print-tree.h * gcc-interface/trans.c: Include stringpool.h Include stor-layout.h Include stmt.h Include varasm.h * gcc-interface/utils.c: Include stringpool.h Include stor-layout.h Include attribs.h Include varasm.h * gcc-interface/utils2.c: Include stringpool.h Include stor-layout.h Include attribs.h Include varasm.h c-family/ChangeLog * c-common.c: Include fold-const.h. Include stor-layout.h. Include calls.h. Include stringpool.h. Include attribs.h. Include varasm.h. Include trans-mem.h. * c-cppbuiltin.c: Include stor-layout.h. Include stringpool.h. * c-format.c: Include stringpool.h. * c-lex.c: Include stringpool.h. Include stor-layout.h. * c-pragma.c: Include stringpool.h. Include attribs.h. Include varasm.h. Include gcc-symtab.h. * c-pretty-print.c: Include stor-layout.h. Include attribs.h. * cilk.c: Include stringpool.h. Include calls.h. c/ChangeLog * c-decl.c: Include print-tree.h. Include stor-layout.h. Include varasm.h. Include attribs.h. Include stringpool.h. * c-lang.c: Include fold-const.h. * c-parser.c: Include stringpool.h. Include attribs.h. Include stor-layout.h. Include varasm.h. Include trans-mem.h. * c-typeck.c: Include stor-layout.h. Include trans-mem.h. Include varasm.h. Include stmt.h. cp/ChangeLog * call.c: Include stor-layout.h. Include trans-mem.h. Include stringpool.h. * class.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. * cp-gimplify.c: Include stor-layout.h. * cvt.c: Include stor-layout.h. * decl.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include attribs.h. Include calls.h. * decl2.c: Include stringpool.h. Include varasm.h. Include attribs.h. Include stor-layout.h. Include calls.h. * error.c: Include stringpool.h. * except.c: Include stringpool.h. Include trans-mem.h. Include attribs.h. * init.c: Include stringpool.h. Include varasm.h. * lambda.c: Include stringpool.h. * lex.c: Include stringpool.h. * mangle.c: Include stor-layout.h. Include stringpool.h. * method.c: Include stringpool.h. Include varasm.h. * name-lookup.c: Include stringpool.h. Include print-tree.h. Include attribs.h. * optimize.c: Include stringpool.h. * parser.c: Include print-tree.h. Include stringpool.h. Include attribs.h. Include trans-mem.h. * pt.c: Include stringpool.h. Include varasm.h. Include attribs.h. Include stor-layout.h. * ptree.c: Include print-tree.h. * repo.c: Include stringpool.h. * rtti.c: Include stringpool.h. Include stor-layout.h. * semantics.c: Include stmt.h. Include varasm.h. Include stor-layout.h. Include stringpool.h. * tree.c: Include stor-layout.h. Include print-tree.h. Include tree-iterator.h. * typeck.c: Include stor-layout.h. Include varasm.h. * typeck2.c: Include stor-layout.h. Include varasm.h. * vtable-class-hierarchy.c: Include stringpool.h. Include stor-layout.h. fortran/ChangeLog * decl.c: Include stringpool.h. * iresolve.c: Include stringpool.h. * match.c: Include stringpool.h. * module.c: Include stringpool.h. * target-memory.c: Include stor-layout.h. * trans-common.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. * trans-const.c: Include stor-layout.h. * trans-decl.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include attribs.h. * trans-expr.c: Include stringpool.h. * trans-intrinsic.c: Include stringpool.h. Include tree-nested.h. Include stor-layout.h. * trans-io.c: Include stringpool.h. Include stor-layout.h. * trans-openmp.c: Include stringpool.h. * trans-stmt.c: Include stringpool.h. * trans-types.c: Include stor-layout.h. Include stringpool.h. * trans.c: Include stringpool.h. go/ChangeLog * go-backend.c: Include stor-layout.h. * go-gcc.cc: Include stringpool.h. Include stor-layout.h. Include varasm.h. * go-lang.c: Include stor-layout.h. java/ChangeLog * builtins.c: Include stor-layout.h. Include stringpool.h. * class.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. * constants.c: Include stringpool.h. Include stor-layout.h. * decl.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. * except.c: Include stringpool.h. Include stor-layout.h. * expr.c: Include stringpool.h. Include stor-layout.h. * jcf-parse.c: Include stringpool.h. * mangle.c: Include stringpool.h. * resource.c: Include stringpool.h. Include stor-layout.h. * typeck.c: Include stor-layout.h. Include stringpool.h. * verify-glue.c: Include stringpool.h. lto/ChangeLog * lto-lang.c: Include stringpool.h. Include stor-layout.h. * lto-partition.c: Include gcc-symtab.h. * lto.c: Include stor-layout.h. objc/ChangeLog * objc-act.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. * objc-encoding.c: Include stringpool.h. Include stor-layout.h. * objc-gnu-runtime-abi-01.c: Include stringpool.h. * objc-next-runtime-abi-01.c: Include stringpool.h. * objc-next-runtime-abi-02.c: Include stringpool.h. * objc-runtime-shared-support.c: Include stringpool.h. testsuite/ChangeLog * gcc.dg/plugin/selfassign.c: Include stringpool.h. * gcc.dg/plugin/start_unit_plugin.c: Likewise. From-SVN: r205023
2013-11-19 13:31:09 +01:00
#include "stor-layout.h"
#include "varasm.h"
dojump.h: New header file. 2015-10-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> * dojump.h: New header file. * explow.h: Likewise. * expr.h: Remove includes. Move expmed.c prototypes to expmed.h. Move dojump.c prototypes to dojump.h. Move alias.c prototypes to alias.h. Move explow.c prototypes to explow.h. Move calls.c prototypes to calls.h. Move emit-rtl.c prototypes to emit-rtl.h. Move varasm.c prototypes to varasm.h. Move stmt.c prototypes to stmt.h. (saved_pending_stack_adjust): Move to dojump.h. (adjust_address): Move to explow.h. (adjust_address_nv): Move to emit-rtl.h. (adjust_bitfield_address): Likewise. (adjust_bitfield_address_size): Likewise. (adjust_bitfield_address_nv): Likewise. (adjust_automodify_address_nv): Likewise. * explow.c (expr_size): Move to expr.c. (int_expr_size): Likewise. (tree_expr_size): Likewise. Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h statistics.h stmt.h varasm.h. * genemit.c (main): Generate includes statistics.h, real.h, fixed-value.h, insn-config.h, expmed.h, dojump.h, explow.h, emit-rtl.h, stmt.h. * genopinit.c (main): Generate includes hashtab.h, hard-reg-set.h, function.h, statistics.h, real.h, fixed-value.h, expmed.h, dojump.h, explow.h, emit-rtl.h, stmt.h. * genoutput.c (main): Generate includes hashtab.h, statistics.h, real.h, fixed-value.h, expmed.h, dojump.h, explow.h, emit-rtl.h, stmt.h. * genemit.c (open_base_files): Generate includes flags.h, statistics.h, real.h, fixed-value.h, tree.h, expmed.h, dojump.h, explow.h, calls.h, emit-rtl.h, varasm.h, stmt.h. * config/tilepro/gen-mul-tables.cc: Generate includes hashtab.h, hash-set.h, vec.h, machmode.h, tm.h, hard-reg-set.h, input.h, function.h, rtl.h, flags.h, statistics.h, double-int.h, real.h, fixed-value.h, alias.h, wide-int.h, inchash.h, tree.h, insn-config.h, expmed.h, dojump.h, explow.h, calls.h, emit-rtl.h, varasm.h, stmt.h. * config/tilegx/mul-tables.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h function.h hard-reg-set.h hash-set.h hashtab.h inchash.h input.h insn-config.h machmode.h real.h rtl.h statistics.h stmt.h symtab.h tm.h tree.h varasm.h vec.h wide-int.h. * rtlhooks.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h function.h hard-reg-set.h hash-set.h hashtab.h inchash.h input.h insn-config.h machmode.h real.h statistics.h stmt.h tree.h varasm.h vec.h wide-int.h. * cfgloopanal.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h inchash.h insn-config.h real.h statistics.h stmt.h tree.h varasm.h wide-int.h. * loop-iv.c: Likewise. * lra-assigns.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h inchash.h real.h statistics.h stmt.h tree.h varasm.h wide-int.h. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * bt-load.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h inchash.h insn-config.h real.h statistics.h stmt.h tree.h varasm.h wide-int.h. * hw-doloop.c: Likewise. * ira-color.c: Likewise. * ira-emit.c: Likewise. * loop-doloop.c: Likewise. * loop-invariant.c: Likewise. * reload.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h inchash.h real.h rtl.h statistics.h stmt.h tree.h varasm.h wide-int.h. * caller-save.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h inchash.h real.h statistics.h stmt.h tree.h varasm.h wide-int.h. * combine-stack-adj.c: Likewise. * cse.c: Likewise. * ddg.c: Likewise. * ifcvt.c: Likewise. * ira-costs.c: Likewise. * jump.c: Likewise. * lra-coalesce.c: Likewise. * lra-spills.c: Likewise. * profile.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h insn-config.h real.h statistics.h stmt.h varasm.h wide-int.h. * lra.c: Include alias.h calls.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h real.h statistics.h stmt.h varasm.h. * config/sh/sh_treg_combine.cc: Include alias.h calls.h dojump.h double-int.h explow.h expmed.h fixed-value.h flags.h real.h statistics.h stmt.h varasm.h wide-int.h. * reorg.c: Include alias.h calls.h dojump.h double-int.h explow.h expmed.h fixed-value.h inchash.h real.h statistics.h stmt.h tree.h varasm.h wide-int.h. * reload1.c: Include alias.h calls.h dojump.h double-int.h explow.h expmed.h fixed-value.h real.h rtl.h statistics.h stmt.h varasm.h. * config/tilegx/tilegx.c: Include alias.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h real.h statistics.h stmt.h. * config/tilepro/tilepro.c: Likewise. * config/mmix/mmix.c: Include alias.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h real.h statistics.h stmt.h. * config/pdp11/pdp11.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/lm32/lm32.c: Include alias.h dojump.h double-int.h emit-rtl.h explow.h expmed.h fixed-value.h real.h statistics.h stmt.h varasm.h. * tree-chkp.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h function.h hard-reg-set.h hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h tm.h. * cilk-common.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h function.h hard-reg-set.h hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h tm.h varasm.h. * rtl-chkp.c: Likewise. * tree-chkp-opt.c: Likewise. * config/arm/arm-builtins.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h function.h hard-reg-set.h hashtab.h insn-config.h real.h statistics.h stmt.h varasm.h. * ipa-icf.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h. * tree-vect-data-refs.c: Likewise. * graphite-sese-to-poly.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h varasm.h. * internal-fn.c: Likewise. * ipa-icf-gimple.c: Likewise. * lto-section-out.c: Likewise. * tree-data-ref.c: Likewise. * tree-nested.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tsan.c: Likewise. * targhooks.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h statistics.h stmt.h. * config/sh/sh-mem.cc: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h statistics.h stmt.h varasm.h. * loop-unroll.c: Likewise. * ubsan.c: Likewise. * tree-ssa-loop-prefetch.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h hashtab.h real.h rtl.h statistics.h stmt.h varasm.h. * dse.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h function.h hashtab.h statistics.h stmt.h varasm.h. * tree-switch-conversion.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h. * generic-match-head.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h varasm.h. * gimple-match-head.c: Likewise. * lto-cgraph.c: Likewise. * lto-section-in.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * tree-affine.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-if-conv.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-generic.c: Likewise. * tree-sra.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h insn-config.h real.h rtl.h stmt.h varasm.h. * stor-layout.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h insn-config.h real.h statistics.h stmt.h. * varasm.c: Likewise. * coverage.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h insn-config.h real.h statistics.h stmt.h varasm.h. * init-regs.c: Likewise. * ira.c: Likewise. * omp-low.c: Likewise. * stack-ptr-mod.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-complex.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h insn-config.h rtl.h statistics.h stmt.h varasm.h. * dwarf2cfi.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h insn-config.h statistics.h stmt.h varasm.h. * shrink-wrap.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h real.h rtl.h statistics.h stmt.h. * recog.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h real.h rtl.h statistics.h stmt.h varasm.h. * tree-ssa-phiopt.c: Likewise. * config/darwin.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h real.h statistics.h stmt.h. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * optabs.c: Likewise. * passes.c: Likewise. * simplify-rtx.c: Likewise. * stmt.c: Likewise. * toplev.c: Likewise. * var-tracking.c: Likewise. * gcse.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h real.h statistics.h stmt.h varasm.h. * lower-subreg.c: Likewise. * postreload-gcse.c: Likewise. * ree.c: Likewise. * reginfo.c: Likewise. * store-motion.c: Likewise. * combine.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h real.h stmt.h varasm.h. * emit-rtl.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h statistics.h stmt.h. * dojump.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h statistics.h stmt.h varasm.h. * except.c: Likewise. * explow.c: Likewise. * tree-dfa.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h insn-config.h real.h rtl.h statistics.h stmt.h varasm.h. * gimple-fold.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h insn-config.h real.h rtl.h statistics.h varasm.h. * tree-ssa-structalias.c: Likewise. * cfgexpand.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h insn-config.h real.h statistics.h. * calls.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h insn-config.h real.h statistics.h stmt.h. * bb-reorder.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h insn-config.h real.h statistics.h stmt.h varasm.h. * cfgbuild.c: Likewise. * function.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h real.h rtl.h statistics.h stmt.h. * cfgrtl.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h real.h rtl.h statistics.h stmt.h varasm.h. * dbxout.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h real.h statistics.h stmt.h. * auto-inc-dec.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h real.h statistics.h stmt.h varasm.h. * cprop.c: Likewise. * modulo-sched.c: Likewise. * postreload.c: Likewise. * ccmp.c: Include calls.h dojump.h emit-rtl.h explow.h fixed-value.h flags.h function.h hard-reg-set.h hashtab.h insn-config.h real.h statistics.h stmt.h varasm.h. * gimple-ssa-strength-reduction.c: Include calls.h dojump.h emit-rtl.h explow.h fixed-value.h flags.h hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h varasm.h. * tree-ssa-loop-ivopts.c: Include calls.h dojump.h emit-rtl.h explow.h fixed-value.h flags.h hashtab.h real.h rtl.h statistics.h stmt.h varasm.h. * expmed.c: Include calls.h dojump.h emit-rtl.h explow.h fixed-value.h function.h hard-reg-set.h hashtab.h real.h statistics.h stmt.h varasm.h. * target-globals.c: Include calls.h dojump.h emit-rtl.h explow.h fixed-value.h function.h hashtab.h real.h statistics.h stmt.h varasm.h. * tree-ssa-address.c: Include calls.h dojump.h emit-rtl.h explow.h fixed-value.h hashtab.h real.h statistics.h stmt.h varasm.h. * cfgcleanup.c: Include calls.h dojump.h explow.h expmed.h fixed-value.h function.h real.h statistics.h stmt.h varasm.h. * alias.c: Include calls.h dojump.h explow.h expmed.h fixed-value.h insn-config.h real.h statistics.h stmt.h. * dwarf2out.c: Include calls.h dojump.h explow.h expmed.h fixed-value.h statistics.h stmt.h. * config/nvptx/nvptx.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h hard-reg-set.h insn-config.h real.h statistics.h stmt.h varasm.h. * gimplify.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h rtl.h statistics.h. * asan.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h. * ipa-devirt.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h varasm.h. * ipa-polymorphic-call.c: Likewise. * config/aarch64/aarch64.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h statistics.h stmt.h. * config/c6x/c6x.c: Likewise. * config/aarch64/aarch64-builtins.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h flags.h hashtab.h insn-config.h real.h statistics.h stmt.h varasm.h. * ipa-prop.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h insn-config.h real.h rtl.h statistics.h stmt.h varasm.h. * ipa-split.c: Likewise. * tree-eh.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-vrp.c: Likewise. * config/nds32/nds32-cost.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h insn-config.h real.h statistics.h stmt.h. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/cris/cris.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h real.h statistics.h. * config/alpha/alpha.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h real.h statistics.h stmt.h. * config/arm/arm.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/pa/pa.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/cr16/cr16.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h real.h statistics.h stmt.h varasm.h. * config/msp430/msp430.c: Likewise. * predict.c: Likewise. * value-prof.c: Likewise. * config/epiphany/epiphany.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h hashtab.h statistics.h stmt.h. * config/microblaze/microblaze.c: Likewise. * config/nios2/nios2.c: Likewise. * config/rs6000/rs6000.c: Likewise. * tree.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h insn-config.h real.h rtl.h statistics.h stmt.h. * cgraph.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h insn-config.h real.h statistics.h stmt.h. * fold-const.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h insn-config.h real.h statistics.h stmt.h varasm.h. * tree-inline.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h real.h rtl.h statistics.h stmt.h varasm.h. * builtins.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h real.h statistics.h stmt.h. * config/arc/arc.c: Include dojump.h emit-rtl.h explow.h expmed.h fixed-value.h statistics.h stmt.h. * config/visium/visium.c: Include dojump.h emit-rtl.h explow.h expmed.h stmt.h. java/ * builtins.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h fixed-value.h function.h hard-reg-set.h hashtab.h insn-config.h real.h statistics.h stmt.h varasm.h. From-SVN: r219655
2015-01-15 14:28:42 +01:00
#include "flags.h"
#include "explow.h"
#include "calls.h"
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
#include "expr.h"
#include "output.h"
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
#include "reload.h"
common.opt (main_input_filename, [...]): New Variable entries. * common.opt (main_input_filename, main_input_basename, main_input_baselength): New Variable entries. From toplev.c. * final.c (output_quoted_string): Move from toplev.c. * output.h (output_quoted_string): Move from toplev.h. * opts-global.c (read_cmdline_options): Use gcc_options pointer to access main_input_filename, main_input_baselength and main_input_basename. * targhooks.c: Include intl.h and opts.h. (option_affects_pch_p, default_get_pch_validity): Move from toplev.c. * targhooks.h (option_affects_pch_p, default_get_pch_validity): Move from toplev.h. * toplev.c (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (output_quoted_string): Move to final.c. (warn_deprecated_use): Move to tree.c. (option_affects_pch_p, default_get_pch_validity, pch_option_mismatch, default_pch_valid_p): Move to targhooks.c. * toplev.h (skip_leading_substring): Move to tree-dump.c. (warn_deprecated_use): Move to tree.h. (output_quoted_string): Move to output.h. (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (default_get_pch_validity, default_pch_valid_p): Move to targhooks.c. * tree-dump.c (skip_leading_substring): Move from toplev.h. * tree.c (warn_deprecated_use): Move from toplev.c. * tree.h (warn_deprecated_use): Move from toplev.h. * c-typeck.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/cris/cris.c, config/crx/crx.c, config/fr30/fr30.c, config/frv/frv.c, config/h8300/h8300.c, config/ia64/ia64.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mep/mep.c, config/microblaze/microblaze.c, config/mips/mips.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/pa/pa.c, config/pdp11/pdp11.c, config/picochip/picochip.c, config/s390/s390.c, config/score/score.c, config/sh/sh.c, config/sparc/sparc.c, config/spu/spu.c, config/stormy16/stormy16.c, config/v850/v850.c, config/vax/vax.c, config/xtensa/xtensa.c, gimple-low.c, graphite-sese-to-poly.c, plugin.c, tree-cfg.c, tree-inline.c, varasm.c, xcoffout.c: Don't include toplev.h. * Makefile.in (c-typeck.o, tree-inline.o, tree-cfg.o, gimple-low.o, graphite-sese-to-poly.o, targhooks.o, plugin.o, varasm.o, xcoffout.o): Update dependencies. * config/arm/t-arm (arm.o): Update dependencies. * config/spu/t-spu-elf (spu.o): Update dependencies. cp: * cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h. * Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o): Update dependencies. java: * jcf-parse.c: Don't include toplev.h. * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h. From-SVN: r167329
2010-12-01 14:46:36 +01:00
#include "intl.h"
#include "opts.h"
gimple-expr.h (create_tmp_var_name, [...]): Relocate prototypes from gimple.h. 2013-11-12 Andrew MacLeod <amacleod@redhat.com> * gimple-expr.h (create_tmp_var_name, create_tmp_var_raw, create_tmp_var, create_tmp_reg, mark_addressable, is_gimple_reg_rhs): Relocate prototypes from gimple.h. * gimplify.h: New File. Relocate some prototypes from gimple.h here. (gimple_predicate, enum fallback, enum gimplify_status): Relocate from gimple.h. * gimple.h: Move some prototypes to gimplify.h. (gimple_predicate, enum fallback, enum gimplify_status): Move to gimplify.h. (gimple_do_not_emit_location_p, gimple_set_do_not_emit_location): Relocate from gimpify.c. * gimple-expr.c (remove_suffix, tmp_var_id_num, create_tmp_var_name, create_tmp_var_raw, create_tmp_var, create_tmp_reg, mark_addressable, is_gimple_reg_rhs) Relocate from gimplify.c. * gimplify.c (mark_addressable): Move to gimple-expr.c. (gimple_seq_add_stmt_without_update): Move to gimple.c. (remove_suffix, tmp_var_id_num, create_tmp_var_name, create_tmp_var_raw, create_tmp_var, create_tmp_reg, is_gimple_reg_rhs): Move to gimple-expr.c. (should_carry_location_p): Move to gimple.c. (gimple_do_not_emit_location_p, gimple_set_do_not_emit_location): Move to gimple.h. (annotate_one_with_location, annotate_all_with_location_after, annotate_all_with_location): Move to gimple.c. (compare_case_labels, sort_case_labels, preprocess_case_label_vec_for_gimple): Move to gimple.c. (rhs_predicate_for): Make static. (gimplify_assign): Relocate from gimple.c. * gimple.c (gimplify_assign): Move to gimplify.c. (gimple_seq_add_stmt_without_update, should_carry_location_p, annotate_one_with_location, annotate_all_with_location_after, annotate_all_with_location, compare_case_labels, sort_case_labels, preprocess_case_label_vec_for_gimple): Relocate from gimplify.c. * tree.h (unshare_expr, unshare_expr_without_location, mark_addressable): Move prototypes to gimplify.h. * Makefile.in (GTFILES): gimple-expr.c now has the GTY tag for tmp_var_id_num * asan.c: Include gimplify.h rather than gimple.h. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * dwarf2out.c: Dont include gimple.h. * fold-const.c: Include gimplify.h rather than gimple.h. * function.c: Likewise. * gimple-fold.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-sese-to-poly.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa.c: Likewise. * langhooks.c: Dont include gimple.h. * loop-init.c: Include gimplify.h rather than gimple.h. * omp-low.c: Likewise. * sese.c: Likewise. * stor-layout.c: Likewise. * targhooks.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-complex.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa.c: Likewise. * tree-switch-conversio: Likewise.n.c * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. * tsan.c: Likewise. * value-prof.c: Likewise. * config/aarch64/aarch64.c: Include gimplify.h instead of gimple.h. * config/alpha/alpha.c: Likewise. * config/darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/xtensa/xtensa.c: Likewise. * ada/gcc-interface/trans.c: Include gimplify.h. * c/c-typeck.c: Include gimplify.h. * c-family/c-common.c: Include gimplify.h. * c-family/c-gimplify.c: Likewise. * c-family/cilk.c: Likewise. * c-family/c-omp.c: Include gimple-expr.h instead of gimple.h. * c-family/c-ubsan.c: Don't include gimple.h. * cp/class.c: Include gimplify.h. * cp/cp-gimplify.c: Likewise. * cp/error.c: Likewise. * cp/init.c: Likewise. * cp/optimize.c: Likewise. * cp/pt.c: Likewise. * cp/semantics.c: Likewise. * cp/tree.c: Likewise. * cp/vtable-class-hierarchy.c: Likewise. * cp/decl2.c: Don't include gimple.h. * cp/except.c: Likewise. * cp/method.c: Include pointer-set.h instead of gimple.h. * fortran/f95-lang.c: Don't include gimple.h. * fortran/trans-array.c: Include gimple-expr.h instead of gimple.h. * fortran/trans.c: Likewise. * fortran/trans-decl.c: Likewise. * fortran/trans-expr.c: Include gimplify.h. * fortran/trans-openmp.c: Likewise. * go/go-lang.c: Include gimplify.h. * java/java-gimplify.c: Include gimplify.h. * objc/objc-act.c: Include gimplify.h. From-SVN: r204717
2013-11-12 21:26:43 +01:00
#include "gimplify.h"
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... 2009-05-14 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... (GO_IF_LEGITIMATE_ADDRESS): ... this. * ira-conflicts.c (get_dup_num): Use address_operand. * targhooks.c (default_legitimate_address_p): New. * targhooks.h (default_legitimate_address_p): New. * reload.c (strict_memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * recog.c (memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * target.h (struct target): Add legitimate_address_p. * target-def.h (TARGET_LEGITIMATE_ADDRESS_P): New. (TARGET_INITIALIZER): Include it. * config/alpha/alpha.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/alpha/alpha-protos.h (alpha_legitimate_address_p): Remove. * config/alpha/alpha.c (alpha_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/frv/frv.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_address_p): Rename to... (frv_legitimate_address_p_1): ... this. * config/frv/frv.c (frv_legitimate_address_p): Forward to... (frv_legitimate_address_p_1): ... the renamed old frv_legitimate_address_p. * config/frv/predicates.md: Adjust calls to frv_legitimate_address_p. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/s390.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/s390/s390-protos.h (legitimate_address_p): Remove. * config/s390/s390.c (legitimate_address_p): Rename to... (s390_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/constraints.md ("e"): Call strict_memory_address_p. * config/m32c/m32c.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m32c/m32c-protos.h (m32c_legitimate_address_p): Remove. * config/m32c/m32c.c (m32c_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/spu/spu.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/spu/spu-protos.h (spu_legitimate_address): Remove. * config/spu/spu.c (spu_legitimate_address): Rename to... (spu_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/sparc/sparc.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/sparc/sparc-protos.h (legitimate_address_p): Remove. * config/sparc/sparc.c (legitimate_address_p): Rename to... (sparc_legitimate_address_p): ... this, make static and return bool. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/i386/i386.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/i386/i386-protos.h (legitimate_address_p): Remove. * config/i386/i386.c (legitimate_address_p): Rename to... (ix86_legitimate_address_p): ... this, make static. (constant_address_p): Move after it, adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/avr/avr.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/avr/avr-protos.h (legitimate_address_p): Remove. * config/avr/avr.c (legitimate_address_p): Rename to... (avr_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/crx/crx.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/crx/crx-protos.h (crx_legitimate_address_p): Remove. * config/crx/crx.c (crx_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/xtensa/xtensa.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/xtensa/xtensa-protos.h (xtensa_legitimate_address_p): Remove. * config/xtensa/xtensa.c (xtensa_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/stormy16/stormy16.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/stormy16/stormy16-protos.h (xstormy16_legitimate_address_p): Remove. * config/stormy16/stormy16.c (xstormy16_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68hc11/m68hc11.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_go_if_legitimate_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_go_if_legitimate_address): Rename to... (m68hc11_legitimate_address_p): ... this, make static. (go_if_legitimate_address_internal): Rename to... (m68hc11_legitimate_address_p_1): ... this. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/iq2000/iq2000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/iq2000/iq2000-protos.h (iq2000_legitimate_address_p): Remove. * config/iq2000/iq2000.c (iq2000_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mn10300/mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mn10300/mn10300-protos.h (legitimate_address_p): Remove. * config/mn10300/mn10300.c (legitimate_address_p): Rename to... (mn10300_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68k/m68k.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68k/m68k-protos.h (m68k_legitimate_address_p): Remove. * config/m68k/m68k.c (m68k_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_FLAG, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Delete. (INT_REG_OK_FOR_BASE_P, INT_REG_OK_FOR_INDEX_P): Move above. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/rs6000/rs6000-protos.h (rs6000_legitimate_address): Remove. * config/rs6000/rs6000.c (rs6000_legitimate_address): Rename to... (rs6000_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. (REG_MODE_OK_FOR_BASE_P): Delete. (rs6000_legitimize_reload_address): Use INT_REG_OK_FOR_BASE_P. * config/picochip/picochip.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/picochip/picochip-protos.h (picochip_legitimate_address_p): Delete. * config/picochip/picochip.c (picochip_legitimate_address_p): Make static, adjust types. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/score/score.c (score_address_p): Rename to... (score_legitimate_address_p): ... this. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score3.c (score3_address_p): Rename to... (score3_legitimate_address_p): ... this. * config/score/score7.c (score7_address_p): Rename to... (score7_legitimate_address_p): ... this. * config/arm/arm.h (ARM_GO_IF_LEGITIMATE_ADDRESS, THUMB2_GO_IF_LEGITIMATE_ADDRESS, THUMB1_GO_IF_LEGITIMATE_ADDRESS, GO_IF_LEGITIMATE_ADDRESS): Delete. * config/arm/arm-protos.h (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Delete. (arm_legitimate_address_p): Rename to... (arm_legitimate_address_outer_p): ... this. * config/arm/constraints.md ("Uq"): Adjust call. * config/arm/predicates.md (arm_extendqisi_mem_op): Likewise. * config/arm/arm.c (arm_legitimate_address_p): New, rename old one to... (arm_legitimate_address_outer_p): ... this. (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mips/mips-protos.h (mips_legitimate_address_p): Remove. * config/mips/mips.c (mips_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/vax/vax.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/vax/vax-protos.h (legitimate_address_p): Remove. * config/vax/vax.c (legitimate_address_p): Rename to... (vax_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/h8300/h8300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/h8300/h8300-protos.h (h8300_legitimate_address_p): Remove. * config/h8300/h8300.c (h8300_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mmix/mmix.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mmix/mmix-protos.h (mmix_legitimize_address): Remove. * config/mmix/mmix.c (mmix_legitimate_address): Rename to... (mmix_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/bfin/bfin.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_address_p): Remove. * config/bfin/bfin.c (bfin_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. From-SVN: r147534
2009-05-14 15:42:45 +02:00
bool
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_legitimate_address_p (machine_mode mode ATTRIBUTE_UNUSED,
tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... 2009-05-14 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... (GO_IF_LEGITIMATE_ADDRESS): ... this. * ira-conflicts.c (get_dup_num): Use address_operand. * targhooks.c (default_legitimate_address_p): New. * targhooks.h (default_legitimate_address_p): New. * reload.c (strict_memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * recog.c (memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * target.h (struct target): Add legitimate_address_p. * target-def.h (TARGET_LEGITIMATE_ADDRESS_P): New. (TARGET_INITIALIZER): Include it. * config/alpha/alpha.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/alpha/alpha-protos.h (alpha_legitimate_address_p): Remove. * config/alpha/alpha.c (alpha_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/frv/frv.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_address_p): Rename to... (frv_legitimate_address_p_1): ... this. * config/frv/frv.c (frv_legitimate_address_p): Forward to... (frv_legitimate_address_p_1): ... the renamed old frv_legitimate_address_p. * config/frv/predicates.md: Adjust calls to frv_legitimate_address_p. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/s390.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/s390/s390-protos.h (legitimate_address_p): Remove. * config/s390/s390.c (legitimate_address_p): Rename to... (s390_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/constraints.md ("e"): Call strict_memory_address_p. * config/m32c/m32c.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m32c/m32c-protos.h (m32c_legitimate_address_p): Remove. * config/m32c/m32c.c (m32c_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/spu/spu.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/spu/spu-protos.h (spu_legitimate_address): Remove. * config/spu/spu.c (spu_legitimate_address): Rename to... (spu_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/sparc/sparc.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/sparc/sparc-protos.h (legitimate_address_p): Remove. * config/sparc/sparc.c (legitimate_address_p): Rename to... (sparc_legitimate_address_p): ... this, make static and return bool. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/i386/i386.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/i386/i386-protos.h (legitimate_address_p): Remove. * config/i386/i386.c (legitimate_address_p): Rename to... (ix86_legitimate_address_p): ... this, make static. (constant_address_p): Move after it, adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/avr/avr.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/avr/avr-protos.h (legitimate_address_p): Remove. * config/avr/avr.c (legitimate_address_p): Rename to... (avr_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/crx/crx.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/crx/crx-protos.h (crx_legitimate_address_p): Remove. * config/crx/crx.c (crx_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/xtensa/xtensa.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/xtensa/xtensa-protos.h (xtensa_legitimate_address_p): Remove. * config/xtensa/xtensa.c (xtensa_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/stormy16/stormy16.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/stormy16/stormy16-protos.h (xstormy16_legitimate_address_p): Remove. * config/stormy16/stormy16.c (xstormy16_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68hc11/m68hc11.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_go_if_legitimate_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_go_if_legitimate_address): Rename to... (m68hc11_legitimate_address_p): ... this, make static. (go_if_legitimate_address_internal): Rename to... (m68hc11_legitimate_address_p_1): ... this. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/iq2000/iq2000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/iq2000/iq2000-protos.h (iq2000_legitimate_address_p): Remove. * config/iq2000/iq2000.c (iq2000_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mn10300/mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mn10300/mn10300-protos.h (legitimate_address_p): Remove. * config/mn10300/mn10300.c (legitimate_address_p): Rename to... (mn10300_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68k/m68k.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68k/m68k-protos.h (m68k_legitimate_address_p): Remove. * config/m68k/m68k.c (m68k_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_FLAG, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Delete. (INT_REG_OK_FOR_BASE_P, INT_REG_OK_FOR_INDEX_P): Move above. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/rs6000/rs6000-protos.h (rs6000_legitimate_address): Remove. * config/rs6000/rs6000.c (rs6000_legitimate_address): Rename to... (rs6000_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. (REG_MODE_OK_FOR_BASE_P): Delete. (rs6000_legitimize_reload_address): Use INT_REG_OK_FOR_BASE_P. * config/picochip/picochip.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/picochip/picochip-protos.h (picochip_legitimate_address_p): Delete. * config/picochip/picochip.c (picochip_legitimate_address_p): Make static, adjust types. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/score/score.c (score_address_p): Rename to... (score_legitimate_address_p): ... this. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score3.c (score3_address_p): Rename to... (score3_legitimate_address_p): ... this. * config/score/score7.c (score7_address_p): Rename to... (score7_legitimate_address_p): ... this. * config/arm/arm.h (ARM_GO_IF_LEGITIMATE_ADDRESS, THUMB2_GO_IF_LEGITIMATE_ADDRESS, THUMB1_GO_IF_LEGITIMATE_ADDRESS, GO_IF_LEGITIMATE_ADDRESS): Delete. * config/arm/arm-protos.h (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Delete. (arm_legitimate_address_p): Rename to... (arm_legitimate_address_outer_p): ... this. * config/arm/constraints.md ("Uq"): Adjust call. * config/arm/predicates.md (arm_extendqisi_mem_op): Likewise. * config/arm/arm.c (arm_legitimate_address_p): New, rename old one to... (arm_legitimate_address_outer_p): ... this. (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mips/mips-protos.h (mips_legitimate_address_p): Remove. * config/mips/mips.c (mips_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/vax/vax.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/vax/vax-protos.h (legitimate_address_p): Remove. * config/vax/vax.c (legitimate_address_p): Rename to... (vax_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/h8300/h8300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/h8300/h8300-protos.h (h8300_legitimate_address_p): Remove. * config/h8300/h8300.c (h8300_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mmix/mmix.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mmix/mmix-protos.h (mmix_legitimize_address): Remove. * config/mmix/mmix.c (mmix_legitimate_address): Rename to... (mmix_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/bfin/bfin.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_address_p): Remove. * config/bfin/bfin.c (bfin_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. From-SVN: r147534
2009-05-14 15:42:45 +02:00
rtx addr ATTRIBUTE_UNUSED,
bool strict ATTRIBUTE_UNUSED)
{
#ifdef GO_IF_LEGITIMATE_ADDRESS
/* Defer to the old implementation using a goto. */
if (strict)
return strict_memory_address_p (mode, addr);
else
return memory_address_p (mode, addr);
#else
gcc_unreachable ();
#endif
}
void
default_external_libcall (rtx fun ATTRIBUTE_UNUSED)
{
#ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
alloc-pool.c, [...]: Add missing whitespace before "(". gcc/ * alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c, cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c, cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c, combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c, dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, errors.c, except.c, expmed.c, expr.c, file-find.c, final.c, fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c, gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c, genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c, genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c, gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c, gimple.h, godump.c, graphite-clast-to-gimple.c, graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c, graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c, hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c, lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c, mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c, pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c, predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c, profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c, reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c, statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h, system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c, tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h, tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c, tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c, tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c, tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c, varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing whitespace before "(". From-SVN: r203004
2013-09-28 10:42:34 +02:00
ASM_OUTPUT_EXTERNAL_LIBCALL (asm_out_file, fun);
#endif
}
int
default_unspec_may_trap_p (const_rtx x, unsigned flags)
{
int i;
/* Any floating arithmetic may trap. */
if ((SCALAR_FLOAT_MODE_P (GET_MODE (x)) && flag_trapping_math))
return 1;
for (i = 0; i < XVECLEN (x, 0); ++i)
{
if (may_trap_p_1 (XVECEXP (x, 0, i), flags))
return 1;
}
return 0;
}
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
expr.c (store_constructor): Use promote_decl_mode. 2009-04-17 Paolo Bonzini <bonzini@gnu.org> * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * explow.c (promote_function_mode): Just call the target hook. * targhooks.c (default_promote_function_mode, default_promote_function_mode_always_promote): New. * targhooks.h (default_promote_function_mode, default_promote_function_mode_always_promote): Declare. * target.h (promote_function_args, promote_function_return): Remove. (promote_function_mode): New. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): New. (TARGET_CALLS): Adjust. * system.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, PROMOTE_FUNCTION_MODE): Poison. * config/s390/s390.h (PROMOTE_FUNCTION_MODE): Move... * config/s390/s390.c (s390_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sparc/sparc.h (PROMOTE_FUNCTION_MODE): Move... * config/sparc/sparc.c (sparc_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sh/sh-protos.h (sh_promote_function_mode): New. * config/sh/sh.c (sh_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/cris/cris.h (PROMOTE_FUNCTION_MODE): Move... * config/cris/cris.c (cris_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/mmix/mmix.h (PROMOTE_FUNCTION_MODE): Move... * config/mmix/mmix.c (mmix_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/arm/arm.h (PROMOTE_FUNCTION_MODE): Move... * config/arm/arm.c (arm_promote_function_mode): ... here, without complex type handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/pa/pa.c (pa_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/alpha/alpha.c (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): Define equivalently. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/picochip/picochip.c: Likewise. * config/arc/arc.c: Likewise. * config/mcore/mcore.c: Likewise. * config/score/score.c: Likewise. * config/mips/mips.c: Likewise. * config/bfin/bfin.c: Likewise. * config/ia64/ia64.c: Likewise (disabled though). * config/frv/frv.h: Remove pointless remark. * doc/tm.texi (PROMOTE_FUNCTION_MODE, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Consolidate into... (TARGET_PROMOTE_FUNCTION_MODE): ... this. From-SVN: r150336
2009-08-02 00:03:34 +02:00
default_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode,
expr.c (store_constructor): Use promote_decl_mode. 2009-04-17 Paolo Bonzini <bonzini@gnu.org> * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * explow.c (promote_function_mode): Just call the target hook. * targhooks.c (default_promote_function_mode, default_promote_function_mode_always_promote): New. * targhooks.h (default_promote_function_mode, default_promote_function_mode_always_promote): Declare. * target.h (promote_function_args, promote_function_return): Remove. (promote_function_mode): New. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): New. (TARGET_CALLS): Adjust. * system.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, PROMOTE_FUNCTION_MODE): Poison. * config/s390/s390.h (PROMOTE_FUNCTION_MODE): Move... * config/s390/s390.c (s390_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sparc/sparc.h (PROMOTE_FUNCTION_MODE): Move... * config/sparc/sparc.c (sparc_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sh/sh-protos.h (sh_promote_function_mode): New. * config/sh/sh.c (sh_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/cris/cris.h (PROMOTE_FUNCTION_MODE): Move... * config/cris/cris.c (cris_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/mmix/mmix.h (PROMOTE_FUNCTION_MODE): Move... * config/mmix/mmix.c (mmix_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/arm/arm.h (PROMOTE_FUNCTION_MODE): Move... * config/arm/arm.c (arm_promote_function_mode): ... here, without complex type handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/pa/pa.c (pa_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/alpha/alpha.c (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): Define equivalently. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/picochip/picochip.c: Likewise. * config/arc/arc.c: Likewise. * config/mcore/mcore.c: Likewise. * config/score/score.c: Likewise. * config/mips/mips.c: Likewise. * config/bfin/bfin.c: Likewise. * config/ia64/ia64.c: Likewise (disabled though). * config/frv/frv.h: Remove pointless remark. * doc/tm.texi (PROMOTE_FUNCTION_MODE, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Consolidate into... (TARGET_PROMOTE_FUNCTION_MODE): ... this. From-SVN: r150336
2009-08-02 00:03:34 +02:00
int *punsignedp ATTRIBUTE_UNUSED,
const_tree funtype ATTRIBUTE_UNUSED,
int for_return ATTRIBUTE_UNUSED)
{
if (type != NULL_TREE && for_return == 2)
return promote_mode (type, mode, punsignedp);
expr.c (store_constructor): Use promote_decl_mode. 2009-04-17 Paolo Bonzini <bonzini@gnu.org> * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * explow.c (promote_function_mode): Just call the target hook. * targhooks.c (default_promote_function_mode, default_promote_function_mode_always_promote): New. * targhooks.h (default_promote_function_mode, default_promote_function_mode_always_promote): Declare. * target.h (promote_function_args, promote_function_return): Remove. (promote_function_mode): New. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): New. (TARGET_CALLS): Adjust. * system.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, PROMOTE_FUNCTION_MODE): Poison. * config/s390/s390.h (PROMOTE_FUNCTION_MODE): Move... * config/s390/s390.c (s390_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sparc/sparc.h (PROMOTE_FUNCTION_MODE): Move... * config/sparc/sparc.c (sparc_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sh/sh-protos.h (sh_promote_function_mode): New. * config/sh/sh.c (sh_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/cris/cris.h (PROMOTE_FUNCTION_MODE): Move... * config/cris/cris.c (cris_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/mmix/mmix.h (PROMOTE_FUNCTION_MODE): Move... * config/mmix/mmix.c (mmix_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/arm/arm.h (PROMOTE_FUNCTION_MODE): Move... * config/arm/arm.c (arm_promote_function_mode): ... here, without complex type handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/pa/pa.c (pa_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/alpha/alpha.c (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): Define equivalently. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/picochip/picochip.c: Likewise. * config/arc/arc.c: Likewise. * config/mcore/mcore.c: Likewise. * config/score/score.c: Likewise. * config/mips/mips.c: Likewise. * config/bfin/bfin.c: Likewise. * config/ia64/ia64.c: Likewise (disabled though). * config/frv/frv.h: Remove pointless remark. * doc/tm.texi (PROMOTE_FUNCTION_MODE, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Consolidate into... (TARGET_PROMOTE_FUNCTION_MODE): ... this. From-SVN: r150336
2009-08-02 00:03:34 +02:00
return mode;
}
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
expr.c (store_constructor): Use promote_decl_mode. 2009-04-17 Paolo Bonzini <bonzini@gnu.org> * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * explow.c (promote_function_mode): Just call the target hook. * targhooks.c (default_promote_function_mode, default_promote_function_mode_always_promote): New. * targhooks.h (default_promote_function_mode, default_promote_function_mode_always_promote): Declare. * target.h (promote_function_args, promote_function_return): Remove. (promote_function_mode): New. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): New. (TARGET_CALLS): Adjust. * system.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, PROMOTE_FUNCTION_MODE): Poison. * config/s390/s390.h (PROMOTE_FUNCTION_MODE): Move... * config/s390/s390.c (s390_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sparc/sparc.h (PROMOTE_FUNCTION_MODE): Move... * config/sparc/sparc.c (sparc_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sh/sh-protos.h (sh_promote_function_mode): New. * config/sh/sh.c (sh_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/cris/cris.h (PROMOTE_FUNCTION_MODE): Move... * config/cris/cris.c (cris_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/mmix/mmix.h (PROMOTE_FUNCTION_MODE): Move... * config/mmix/mmix.c (mmix_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/arm/arm.h (PROMOTE_FUNCTION_MODE): Move... * config/arm/arm.c (arm_promote_function_mode): ... here, without complex type handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/pa/pa.c (pa_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/alpha/alpha.c (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): Define equivalently. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/picochip/picochip.c: Likewise. * config/arc/arc.c: Likewise. * config/mcore/mcore.c: Likewise. * config/score/score.c: Likewise. * config/mips/mips.c: Likewise. * config/bfin/bfin.c: Likewise. * config/ia64/ia64.c: Likewise (disabled though). * config/frv/frv.h: Remove pointless remark. * doc/tm.texi (PROMOTE_FUNCTION_MODE, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Consolidate into... (TARGET_PROMOTE_FUNCTION_MODE): ... this. From-SVN: r150336
2009-08-02 00:03:34 +02:00
default_promote_function_mode_always_promote (const_tree type,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode,
expr.c (store_constructor): Use promote_decl_mode. 2009-04-17 Paolo Bonzini <bonzini@gnu.org> * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * expr.c (store_constructor): Use promote_decl_mode. Remove now write-only variable unsignedp. (expand_expr_real_1): Use promote_decl_mode. * expr.h (promote_function_mode, promote_decl_mode): New. (promote_mode): Remove last argument. * function.c (assign_temp): Drop last argument of promote_mode. (assign_parm_find_data_types): Use promote_function_mode. (assign_parm_setup_reg): Likewise. (expand_function_end): Use promote_function_mode. * calls.c (initialize_argument_information): Use promote_function_mode. (precompute_arguments): Use promote_mode instead of checking if only PROMOTE_FUNCTION_MODE is defined. (expand_call): When making sibcall decisions, use promote_function_mode. Below, remove an if for targetm.calls.promote_function_return and and use promote_function_mode. (emit_library_call_value_1): Use promote_function_mode, fix bug where promote_mode was passed FOR_CALL == 0 for a return value in an assertion. * cfgexpand.c (expand_one_register_var): Use promote_decl_mode. * explow.c (promote_function_mode, promote_decl_mode): New. (promote_mode): Keep only the FOR_CALL == 0 case. * combine.c (setup_incoming_promotion): Remove test of promote_function_args. Use promote_function_mode. * stmt.c (expand_value_return): Use promote_decl_mode. (expand_decl): Use promote_decl_mode. * explow.c (promote_function_mode): Just call the target hook. * targhooks.c (default_promote_function_mode, default_promote_function_mode_always_promote): New. * targhooks.h (default_promote_function_mode, default_promote_function_mode_always_promote): Declare. * target.h (promote_function_args, promote_function_return): Remove. (promote_function_mode): New. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): New. (TARGET_CALLS): Adjust. * system.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, PROMOTE_FUNCTION_MODE): Poison. * config/s390/s390.h (PROMOTE_FUNCTION_MODE): Move... * config/s390/s390.c (s390_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sparc/sparc.h (PROMOTE_FUNCTION_MODE): Move... * config/sparc/sparc.c (sparc_promote_function_mode): ... here, with pointer handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/sh/sh-protos.h (sh_promote_function_mode): New. * config/sh/sh.c (sh_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/cris/cris.h (PROMOTE_FUNCTION_MODE): Move... * config/cris/cris.c (cris_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/mmix/mmix.h (PROMOTE_FUNCTION_MODE): Move... * config/mmix/mmix.c (mmix_promote_function_mode): ... here. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS): Remove. * config/arm/arm.h (PROMOTE_FUNCTION_MODE): Move... * config/arm/arm.c (arm_promote_function_mode): ... here, without complex type handling. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/pa/pa.c (pa_promote_function_mode): New. (TARGET_PROMOTE_FUNCTION_MODE): Define. (TARGET_PROMOTE_FUNCTION_RETURN): Remove. * config/alpha/alpha.c (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove. (TARGET_PROMOTE_FUNCTION_MODE): Define equivalently. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/picochip/picochip.c: Likewise. * config/arc/arc.c: Likewise. * config/mcore/mcore.c: Likewise. * config/score/score.c: Likewise. * config/mips/mips.c: Likewise. * config/bfin/bfin.c: Likewise. * config/ia64/ia64.c: Likewise (disabled though). * config/frv/frv.h: Remove pointless remark. * doc/tm.texi (PROMOTE_FUNCTION_MODE, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Consolidate into... (TARGET_PROMOTE_FUNCTION_MODE): ... this. From-SVN: r150336
2009-08-02 00:03:34 +02:00
int *punsignedp,
const_tree funtype ATTRIBUTE_UNUSED,
int for_return ATTRIBUTE_UNUSED)
{
return promote_mode (type, mode, punsignedp);
}
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
default_cc_modes_compatible (machine_mode m1, machine_mode m2)
{
if (m1 == m2)
return m1;
return VOIDmode;
}
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
bool
arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arm/pe.c (arm_dllexport_p, arm_dllimport_p, arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport, arm_mark_dllimport, arm_pe_encode_section_info, arm_pe_unique_section): Use ISO-C function declarations. * config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored): Likewise. * config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning. * config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before defining. * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise. * config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise. (register_move_cost): Use ISO-C function declarations. * config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings. * config/score/score-protos.h (score_declare_object): Add ATTRIBUTE_PRINTF_4. * config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * final.c (profile_function): Avoid empty if-bodies. * calls.c (must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Constify. * config/alpha/alpha-protos.h (function_value): Likewise. * config/alpha/alpha.c (alpha_return_in_memory, alpha_pass_by_reference, function_value, unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arm/arm-protos.h (arm_return_in_memory, arm_pad_arg_upward, arm_function_value): Likewise. * config/arm/arm.c (arm_pass_by_reference, arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, arm_function_value, arm_return_in_memory, arm_pad_arg_upward): Likewise. * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise. * config/avr/avr-protos.h (avr_function_value): Likewise. * config/avr/avr.c (avr_return_in_memory, gas_output_limited_string, gas_output_ascii, avr_function_value, avr_return_in_memory): Likewise. * config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise. * config/bfin/bfin.c (bfin_pass_by_reference, bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/cris/cris.c (cris_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS): Likewise. * config/crx/crx.c (crx_return_in_memory): Likewise. * config/darwin.c (function_base, machopic_function_base_name): Likewise. * config/fr30/fr30.c (fr30_must_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/frv/frv.c (frv_must_pass_in_stack): Likewise. * config/h8300/h8300.c (h8300_return_in_memory): Likewise. * config/i386/i386-protos.h (ix86_return_in_memory, ix86_sol10_return_in_memory): Likewise. * config/i386/i386.c (ix86_function_value, ix86_function_sseregparm, ix86_must_pass_in_stack, type_natural_mode, classify_argument, examine_argument, construct_container, ix86_pass_by_reference, function_value_32, function_value_64, ix86_function_value_1, return_in_memory_32, return_in_memory_64, return_in_memory_ms_64, ix86_return_in_memory, ix86_sol10_return_in_memory, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/ia64/ia64-protos.h (ia64_function_value, ia64_hpux_function_arg_padding): Likewise. * config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory, ia64_function_value, bundle_state_hash, bundle_state_eq_p, ia64_hpux_function_arg_padding): Likewise. * config/iq2000/iq2000-protos.h (function_arg, iq2000_function_value): Likewise. * config/iq2000/iq2000.c (iq2000_return_in_memory, iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg, iq2000_function_value): Likewise. * config/m32c/m32c-protos.h (m32c_function_value, m32c_promote_function_return): Likewise. * config/m32c/m32c.c (m32c_pass_by_reference, m32c_promote_prototypes, m32c_promote_function_return, m32c_function_value): Likewise. * config/m32r/m32r.c (m32r_return_in_memory, m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, m32r_in_small_data_p): Likewise. * config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding): Likewise. * config/m68hc11/m68hc11.c (m68hc11_return_in_memory, m68hc11_function_arg_padding): Likewise. * config/m68k/m68k-protos.h (m68k_function_value): Likewise. * config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES, m68k_function_value): Likewise. * config/mcore/mcore-protos.h (mcore_num_arg_regs, mcore_function_value): Likewise. * config/mcore/mcore.c (handle_structs_in_regs, mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mcore_num_arg_regs, mcore_function_value): Likewise. * config/mips/mips-protos.h (mips_pad_arg_upward, mips_function_value): Likewise. * config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb, mips_return_in_memory, mips_pass_by_reference, mips_callee_copies, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward, mips_function_value): Likewise. * config/mmix/mmix-protos.h (mmix_function_outgoing_value): Likewise. * config/mmix/mmix.c (mmix_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value, mmix_encode_section_info): Likewise. * config/mn10300/mn10300-protos.h (mn10300_function_value): Likewise. * config/mn10300/mn10300.c (mn10300_return_in_memory, mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, mn10300_function_value): Likewise. * config/mt/mt-protos.h (mt_function_value): Likewise. * config/mt/mt.c (mt_pass_by_reference, mt_function_value, mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/pa/pa-protos.h (function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pa/pa.c (pa_pass_by_reference, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise. * config/rs6000/rs6000-protos.h (rs6000_function_value, function_arg_padding): Likewise. * config/rs6000/rs6000.c (rs6000_return_in_memory, rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg, rs6000_pass_by_reference, rs6000_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_padding, altivec_expand_dst_builtin, altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins, altivec_init_builtins, rs6000_common_init_builtins, rs6000_function_value): Likewise. * s390/s390-protos.h (s390_function_value): Likewise. * config/s390/s390.c (s390_function_arg_size, s390_pass_by_reference, s390_return_in_memory, s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/score/score-protos.h (score_function_value): Likewise. * config/score/score.c (score_arg_partial_bytes, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, score_return_in_memory, score_pass_by_reference, score_add_offset, score_function_value): Likewise. * config/sh/sh-protos.h (sh_attr_renesas_p, sh_promote_prototypes): Likewise. * config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference, sh_callee_copies, sh_promote_prototypes, shcompact_byref, sh_attr_renesas_p): Likewise. * config/sparc/sparc-protos.h (function_value, function_arg_padding): Likewise. * config/sparc/sparc.c (sparc_promote_prototypes, sparc_return_in_memory, sparc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_record_value_2, function_arg_record_value_1, function_arg_record_value, function_arg_record_value, function_arg_padding, function_value): Likewise. * config/spu/spu-protos.h (spu_function_value): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory, spu_function_value): Likewise. * config/stormy16/stormy16-protos.h (xstormy16_function_value): Likewise. * config/stormy16/stormy16.c (xstormy16_return_in_memory, xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/v850/v850.c (v850_return_in_memory, v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise. * config/xtensa/xtensa.c (xtensa_return_in_msb, xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * explow.c (promote_mode, hard_function_value): Likewise. * expr.h (hard_function_value, promote_mode): Likewise. * function.c (aggregate_value_p): Likewise. * hooks.c (hook_bool_const_tree_true): New. * hooks.h (hook_bool_const_tree_true): New. * sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_RETURN_IN_MSB): Likewise. * target.h (promote_function_args, promote_function_return, promote_prototypes, return_in_memory, return_in_msb, pass_by_reference, must_pass_in_stack, callee_copies, function_value): Likewise. * targhooks.c (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * targhooks.h (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * tree-ssa-structalias.c (const_equiv_class_label_t): New. (equiv_class_label_hash, equiv_class_label_eq): Constify. * tree-vectorizer.c (bb_in_loop_p): Likewise. * tree.c (needs_to_live_in_memory): Likewise. * tree.h (struct tree_type, needs_to_live_in_memory, aggregate_value_p, must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Likewise. * vmsdbgout.c (write_debug_addr, write_debug_delta4, write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg, lookup_filename): Likewise. From-SVN: r127743
2007-08-23 17:49:56 +02:00
default_return_in_memory (const_tree type,
const_tree fntype ATTRIBUTE_UNUSED)
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
{
return (TYPE_MODE (type) == BLKmode);
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
}
tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. 2009-05-04 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. * gcc/defaults.h (LEGITIMIZE_ADDRESS): Delete. * gcc/explow.c (memory_address): Use target hook. * gcc/targhooks.c (default_legitimize_address): New. * gcc/targhooks.h (default_legitimize_address): New. * gcc/target.h (legitimize_address): New. * gcc/target-def.h (TARGET_LEGITIMIZE_ADDRESS): New. (TARGET_INITIALIZER): Include it. * gcc/system.h (LEGITIMIZE_ADDRESS): Poison. * config/bfin/bfin-protos.h (legitimize_address): Remove. * config/bfin/bfin.c (legitimize_address): Remove. * config/bfin/bfin.h (LEGITIMIZE_ADDRESS): Remove. * config/m68hc11/m68hc11-protos.h (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Remove. * gcc/config/arm/arm.h (LEGITIMIZE_ADDRESS, ARM_LEGITIMIZE_ADDRESS, THUMB_LEGITIMIZE_ADDRESS, THUMB2_LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32c/m32c.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sparc/sparc.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32r/m32r.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/i386/i386.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sh/sh.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/avr/avr.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/iq2000/iq2000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mn10300/mn10300.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68k/m68k.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/score/score.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/pa/pa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mips/mips.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/alpha/alpha.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/frv/frv.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/spu/spu.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/xtensa/xtensa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/cris/cris.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/rs6000/rs6000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/picochip/picochip.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390-protos.h (legitimize_address): Delete. * gcc/config/m32c/m32c-protos.h (m32c_legitimize_address): Delete. * gcc/config/sparc/sparc-protos.h (legitimize_address): Delete. * gcc/config/i386/i386-protos.h (legitimize_address): Delete. * gcc/config/avr/avr-protos.h (legitimize_address): Delete. * gcc/config/mn10300/mn10300-protos.h (legitimize_address): Delete. * gcc/config/score/score-protos.h (score_legitimize_address): Delete. * gcc/config/arm/arm-protos.h (arm_legitimize_address, (thumb_legitimize_address): Delete. * gcc/config/pa/pa-protos.h (hppa_legitimize_address): Delete. * gcc/config/mips/mips-protos.h (mips_legitimize_address): Delete. * gcc/config/alpha/alpha-protos.h (alpha_legitimize_address): Delete. * gcc/config/frv/frv-protos.h (frv_legitimize_address): Delete. * gcc/config/spu/spu-protos.h (spu_legitimize_address): Delete. * gcc/config/xtensa/xtensa-protos.h (xtensa_legitimize_address): Delete. * gcc/config/rs6000/rs6000-protos.h (rs6000_legitimize_address): Delete. * config/arm/arm.c (arm_legitimize_address): Maybe call Thumb version. * config/m32c/m32c.c (m32c_legitimize_address): Standardize. * config/m32r/m32r.c (m32r_legitimize_address): New. * config/m68k/m68k.c (m68k_legitimize_address): New. * config/score/score.c (score_legitimize_address): Standardize. * config/score/score3.c (score3_legitimize_address): Standardize. * config/score/score3.h (score3_legitimize_address): Adjust. * config/score/score7.c (score7_legitimize_address): Standardize. * config/score/score7.h (score7_legitimize_address): Adjust. * config/sh/sh.c (sh_legitimize_address): New. * config/iq2000/iq2000.c (iq2000_legitimize_address): New. * gcc/config/s390/s390.c (legitimize_address): Rename to... (s390_legitimize_address): ... this. * gcc/config/sparc/sparc.c (legitimize_address): Rename to... (sparc_legitimize_address): ... this. * gcc/config/i386/i386.c (legitimize_address): Rename to... (ix86_legitimize_address): ... this. * gcc/config/avr/avr.c (legitimize_address): Rename to... (avr_legitimize_address): ... this. * gcc/config/mn10300/mn10300.c (legitimize_address): Rename to... (mn10300_legitimize_address): ... this. * config/alpha/alpha.c (alpha_legitimize_address): Wrap... (alpha_legitimize_address_1): ... the old alpha_legitimize_address. (alpha_expand_mov): Adjust call. * config/frv/frv.c (frv_legitimize_address): Return x on failure. * config/spu/spu.c (spu_legitimize_address): Likewise. * config/xtensa/xtensa.c (xtensa_legitimize_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_address): Likewise. From-SVN: r147098
2009-05-04 14:52:41 +02:00
rtx
default_legitimize_address (rtx x, rtx orig_x ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode ATTRIBUTE_UNUSED)
tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. 2009-05-04 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (LEGITIMIZE_ADDRESS): Revise documentation. * gcc/defaults.h (LEGITIMIZE_ADDRESS): Delete. * gcc/explow.c (memory_address): Use target hook. * gcc/targhooks.c (default_legitimize_address): New. * gcc/targhooks.h (default_legitimize_address): New. * gcc/target.h (legitimize_address): New. * gcc/target-def.h (TARGET_LEGITIMIZE_ADDRESS): New. (TARGET_INITIALIZER): Include it. * gcc/system.h (LEGITIMIZE_ADDRESS): Poison. * config/bfin/bfin-protos.h (legitimize_address): Remove. * config/bfin/bfin.c (legitimize_address): Remove. * config/bfin/bfin.h (LEGITIMIZE_ADDRESS): Remove. * config/m68hc11/m68hc11-protos.h (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_legitimize_address): Remove. * config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Remove. * gcc/config/arm/arm.h (LEGITIMIZE_ADDRESS, ARM_LEGITIMIZE_ADDRESS, THUMB_LEGITIMIZE_ADDRESS, THUMB2_LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32c/m32c.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sparc/sparc.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m32r/m32r.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/i386/i386.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/sh/sh.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/avr/avr.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/iq2000/iq2000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mn10300/mn10300.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/m68k/m68k.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/score/score.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/pa/pa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/mips/mips.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/alpha/alpha.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/frv/frv.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/spu/spu.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/xtensa/xtensa.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/cris/cris.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/rs6000/rs6000.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/picochip/picochip.h (LEGITIMIZE_ADDRESS): Delete. * gcc/config/s390/s390-protos.h (legitimize_address): Delete. * gcc/config/m32c/m32c-protos.h (m32c_legitimize_address): Delete. * gcc/config/sparc/sparc-protos.h (legitimize_address): Delete. * gcc/config/i386/i386-protos.h (legitimize_address): Delete. * gcc/config/avr/avr-protos.h (legitimize_address): Delete. * gcc/config/mn10300/mn10300-protos.h (legitimize_address): Delete. * gcc/config/score/score-protos.h (score_legitimize_address): Delete. * gcc/config/arm/arm-protos.h (arm_legitimize_address, (thumb_legitimize_address): Delete. * gcc/config/pa/pa-protos.h (hppa_legitimize_address): Delete. * gcc/config/mips/mips-protos.h (mips_legitimize_address): Delete. * gcc/config/alpha/alpha-protos.h (alpha_legitimize_address): Delete. * gcc/config/frv/frv-protos.h (frv_legitimize_address): Delete. * gcc/config/spu/spu-protos.h (spu_legitimize_address): Delete. * gcc/config/xtensa/xtensa-protos.h (xtensa_legitimize_address): Delete. * gcc/config/rs6000/rs6000-protos.h (rs6000_legitimize_address): Delete. * config/arm/arm.c (arm_legitimize_address): Maybe call Thumb version. * config/m32c/m32c.c (m32c_legitimize_address): Standardize. * config/m32r/m32r.c (m32r_legitimize_address): New. * config/m68k/m68k.c (m68k_legitimize_address): New. * config/score/score.c (score_legitimize_address): Standardize. * config/score/score3.c (score3_legitimize_address): Standardize. * config/score/score3.h (score3_legitimize_address): Adjust. * config/score/score7.c (score7_legitimize_address): Standardize. * config/score/score7.h (score7_legitimize_address): Adjust. * config/sh/sh.c (sh_legitimize_address): New. * config/iq2000/iq2000.c (iq2000_legitimize_address): New. * gcc/config/s390/s390.c (legitimize_address): Rename to... (s390_legitimize_address): ... this. * gcc/config/sparc/sparc.c (legitimize_address): Rename to... (sparc_legitimize_address): ... this. * gcc/config/i386/i386.c (legitimize_address): Rename to... (ix86_legitimize_address): ... this. * gcc/config/avr/avr.c (legitimize_address): Rename to... (avr_legitimize_address): ... this. * gcc/config/mn10300/mn10300.c (legitimize_address): Rename to... (mn10300_legitimize_address): ... this. * config/alpha/alpha.c (alpha_legitimize_address): Wrap... (alpha_legitimize_address_1): ... the old alpha_legitimize_address. (alpha_expand_mov): Adjust call. * config/frv/frv.c (frv_legitimize_address): Return x on failure. * config/spu/spu.c (spu_legitimize_address): Likewise. * config/xtensa/xtensa.c (xtensa_legitimize_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_address): Likewise. From-SVN: r147098
2009-05-04 14:52:41 +02:00
{
return x;
}
bool
default_legitimize_address_displacement (rtx *disp ATTRIBUTE_UNUSED,
rtx *offset ATTRIBUTE_UNUSED,
machine_mode mode ATTRIBUTE_UNUSED)
{
return false;
}
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
rtx
default_expand_builtin_saveregs (void)
{
error ("__builtin_saveregs not supported by this target");
return const0_rtx;
}
void
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
default_setup_incoming_varargs (cumulative_args_t ca ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode ATTRIBUTE_UNUSED,
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
tree type ATTRIBUTE_UNUSED,
int *pretend_arg_size ATTRIBUTE_UNUSED,
int second_time ATTRIBUTE_UNUSED)
{
}
/* The default implementation of TARGET_BUILTIN_SETJMP_FRAME_VALUE. */
rtx
default_builtin_setjmp_frame_value (void)
{
return virtual_stack_vars_rtx;
}
/* Generic hook that takes a CUMULATIVE_ARGS pointer and returns false. */
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
bool
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
hook_bool_CUMULATIVE_ARGS_false (cumulative_args_t ca ATTRIBUTE_UNUSED)
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
{
return false;
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
}
bool
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
default_pretend_outgoing_varargs_named (cumulative_args_t ca ATTRIBUTE_UNUSED)
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
{
return (targetm.calls.setup_incoming_varargs
!= default_setup_incoming_varargs);
targhooks.c: New file. * targhooks.c: New file. * targhooks.h: New file. * Makefile.in: Add targhooks.o support. (function.o): Depend on$(TARGET_H). (stmt.o): Likewise. (combine.o): Depend on $(TREE_H) and $(TARGET_H). * builtins.c (apply_args_size, expand_builtin_apply_args_1, expand_builtin_apply): Convert to calls.struct_value_rtx hook. (expand_builtin_saveregs): Convert to calls.expand_builtin_saveregs hook. * c-decl.c (start_decl): Handle new calls.promote_prototypes hook here, instead of ... (get_parm_info) ... here. (store_parm_decls_oldstyle): Convert to calls.promote_prototypes hook. (finish_function): Handle calls.promote_prototypes hook here too. * c-typeck.c (convert_arguments): Convert to calls.promote_prototypes hook. (c_convert_parm_for_inlining): Likewise. * calls.c (initialize_argument_information): Convert to calls.promote_function_args hook. (expand_call): Convert to calls.struct_value_rtx, calls.strict_argument_naming, calls.pretend_outgoing_varargs_named, and calls.promote_function_return hooks. Pass fndecl to aggregate_value_p. Initialize CUMULATIVE_ARGS before calling hooks, so they can use that. (emit_library_call_value_1): Likewise. * combine.c (setup_incoming_promotions): Convert to calls.promote_function_args hook. * emit-rtl.c: Convert to calls.struct_value_rtx hook. * expr.c (expand_assignment): Pass call to aggregate_value_p. (expand_expr): Likewise. * expr.h: Remove support for SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, RETURN_IN_MEMORY macro defaults. * final.c (profile_function): Convert to calls.struct_value_rtx hook. * function.c (aggregate_value_p): Accept function type tree as second parameter; try to deduce fntype from it. Convert to calls.return_in_memory hook. (assign_parms): Convert to calls.setup_incoming_varargs, calls.strict_argument_naming, calls.promote_function_args, calls.pretend_outgoing_varargs_named hooks. Pass fndecl to aggregate_value_p. (expand_function_start): Likewise. Convert to calls.struct_value_rtx hook. (expand_function_end): Convert to calls.promote_function_return hook. (allocate_struct_function): Pass fndecl to aggregate_value_p. * hard-reg-set.h: Update comments to new hook names. * integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p. * reg-stack.c (stack_result): Likewise. * rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete. * stmt.c (expand_value_return): Convert to calls.promote_function_return hook. * target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY, TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS, TARGET_STRICT_ARGUMENT_NAMING, TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS. * target.h: Likewise. * tree.h (aggregate_value_p): Also takes a tree to deduce function attributes from (for target hooks). * doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM, STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING, EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS, STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert to hooks. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function to aggregate_value_p. * config/arm/arm.c (arm_init_cumulative_args, arm_output_mi_thunk): Likewise. * config/i386/i386.c (ix86_return_pops_args, x86_this_parameter): Likewise. * config/mips/mips.c (mips_save_reg_p, mips_expand_prologue, mips_can_use_return_insn): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/s390/s390.c (s390_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to aggregate_value_p. * config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass function to aggregate_value_p. * objc/objc-act.c (generate_struct_by_value_array): Pass NULL to aggregate_value_p. * config/sh/sh-protos.h (sh_builtin_saveregs): Remove. (sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg, sh_function_arg_advance, sh_pass_in_reg_p): New. * config/sh/sh.c (sh_handle_renesas_attribute, sh_promote_prototypes, sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs, sh_setup_incoming_varargs, sh_strict_argument_naming, sh_pretend_outgoing_varargs_named): New decls. (targetm): Add new hooks. (calc_live_regs): Save MACL and MACH if the function has the renesas attribute. (sh_expand_prologue): Support renesas attribute. (sh_builtin_saveregs): Make static. (sh_build_va_list): Support renesas attribute. (sh_va_start): Likewise. (sh_va_arg): Likewise. (sh_promote_prototypes): New. (sh_function_arg): New, moved from sh.h. Support renesas attribute. (sh_function_arg_advance): Likewise. (sh_return_in_memory): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named): Likewise. (sh_struct_value_rtx): New. (sh_attribute): Add renesas attribute. (sh_handle_renesas_attribute): New. (sh_attr_renesas_p, sh_cfun_attr_renesas_p): New. (sh_ms_bitfield_layout_p): Support renesas attribute also. (sh_output_mi_thunk): Pass function to aggregate_value_p. * config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for -mhitachi. (STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to target hooks. (sh_args): Add renesas_abi flag. (INIT_CUMULATIVE_ARGS): Set it. Pass fndecl to aggregate_value_p. (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c. (PASS_IN_REG_P): Support renesas attribute. Pass DF and TF on the stack for the renesas abi. (STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED, SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS, PROMOTE_PROTOTYPES): Moved to sh.c. * config/sh/sh.md (call): Set call cookie to indicate renesas calls. * decl.c (finish_function): Pass fndecl to aggregate_value_p. * misc.c (default_pass_by_ref): Convert to calls.return_in_memory hook. From-SVN: r71048
2003-09-04 05:18:05 +02:00
}
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
default_eh_return_filter_mode (void)
{
return targetm.unwind_word_mode ();
}
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
libgcc2.h (word_type): Type definition removed. 2007-07-06 Andreas Krebbel <krebbel1@de.ibm.com> * libgcc2.h (word_type): Type definition removed. (cmp_return_type, shift_count_type): Type definitions added. (__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter replaced with shift_count_type. (__cmpdi2, __ucmpdi2): word_type of return type replaced with cmp_return_type. * libgcc2.c (__udivmoddi4, __moddi3): Type of local variable c changed from word_type to Wtype. (__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter replaced with shift_count_type. (__cmpdi2, __ucmpdi2): word_type of return type replaced with cmp_return_type. * c-common.c (handle_mode_attribute): Handling for libgcc_cmp_return and libgcc_shift_count attribute added. * target-def.h (TARGET_LIBGCC_CMP_RETURN_MODE, TARGET_LIBGCC_SHIFT_COUNT_MODE): New target hooks defined. (TARGET_INITIALIZER): New target hooks added. * targhooks.c (default_libgcc_cmp_return_mode, default_libgcc_shift_count_mode): Default implementations for the new target hooks added. * targhooks.h (default_libgcc_cmp_return_mode, default_libgcc_shift_count_mode): Function prototypes added. * target.h (struct gcc_target): Fields for the new target hooks added. * optabs.c (expand_binop): Use shift_count_mode when expanding shift as library call. (prepare_cmp_insn): Use cmp_return_mode when expanding comparison as library call. * doc/tm.texi (TARGET_LIBGCC_CMP_RETURN_MODE, TARGET_LIBGCC_SHIFT_COUNT_MODE): Documentation added. * config/s390/s390.c (s390_libgcc_cmp_return_mode, s390_libgcc_shift_count_mode): Functions added. (TARGET_LIBGCC_CMP_RETURN_MODE, TARGET_LIBGCC_SHIFT_COUNT_MODE): Target hooks defined. From-SVN: r126410
2007-07-06 12:47:31 +02:00
default_libgcc_cmp_return_mode (void)
{
return word_mode;
}
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
libgcc2.h (word_type): Type definition removed. 2007-07-06 Andreas Krebbel <krebbel1@de.ibm.com> * libgcc2.h (word_type): Type definition removed. (cmp_return_type, shift_count_type): Type definitions added. (__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter replaced with shift_count_type. (__cmpdi2, __ucmpdi2): word_type of return type replaced with cmp_return_type. * libgcc2.c (__udivmoddi4, __moddi3): Type of local variable c changed from word_type to Wtype. (__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter replaced with shift_count_type. (__cmpdi2, __ucmpdi2): word_type of return type replaced with cmp_return_type. * c-common.c (handle_mode_attribute): Handling for libgcc_cmp_return and libgcc_shift_count attribute added. * target-def.h (TARGET_LIBGCC_CMP_RETURN_MODE, TARGET_LIBGCC_SHIFT_COUNT_MODE): New target hooks defined. (TARGET_INITIALIZER): New target hooks added. * targhooks.c (default_libgcc_cmp_return_mode, default_libgcc_shift_count_mode): Default implementations for the new target hooks added. * targhooks.h (default_libgcc_cmp_return_mode, default_libgcc_shift_count_mode): Function prototypes added. * target.h (struct gcc_target): Fields for the new target hooks added. * optabs.c (expand_binop): Use shift_count_mode when expanding shift as library call. (prepare_cmp_insn): Use cmp_return_mode when expanding comparison as library call. * doc/tm.texi (TARGET_LIBGCC_CMP_RETURN_MODE, TARGET_LIBGCC_SHIFT_COUNT_MODE): Documentation added. * config/s390/s390.c (s390_libgcc_cmp_return_mode, s390_libgcc_shift_count_mode): Functions added. (TARGET_LIBGCC_CMP_RETURN_MODE, TARGET_LIBGCC_SHIFT_COUNT_MODE): Target hooks defined. From-SVN: r126410
2007-07-06 12:47:31 +02:00
default_libgcc_shift_count_mode (void)
{
return word_mode;
}
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
default_unwind_word_mode (void)
{
return word_mode;
}
/* The default implementation of TARGET_SHIFT_TRUNCATION_MASK. */
unsigned HOST_WIDE_INT
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_shift_truncation_mask (machine_mode mode)
{
return SHIFT_COUNT_TRUNCATED ? GET_MODE_BITSIZE (mode) - 1 : 0;
}
re PR tree-optimization/23109 (compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)) gcc: 2006-01-11 Paolo Bonzini <bonzini@gnu.org> PR tree-optimization/23109 PR tree-optimization/23948 PR tree-optimization/24123 * Makefile.in (tree-ssa-math-opts.o): Adjust dependencies. * tree-cfg.c (single_noncomplex_succ): New. * tree-flow.h (single_noncomplex_succ): Declare it. * tree-ssa-math-opts.c (enum place_reciprocal): Remove. * tree-ssa-math-opts.c (enum place_reciprocal): Remove. (struct occurrence, occ_head, occ_pool, is_divide_by, compute_merit, insert_bb, register_division_in, insert_reciprocals, replace_reciprocal, free_bb): New. (execute_cse_reciprocals_1): Rewritten. (execute_cse_reciprocals): Adjust calls to execute_cse_reciprocals_1. Do not commit any edge insertion. Always compute dominators and create the allocation pool. * target-def.h (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL): New. * target.h (struct gcc_target): Add min_divistions_for_recip_mul. * targhooks.c (default_min_divistions_for_recip_mul): New. * targhooks.h (default_min_divistions_for_recip_mul): New prototype. * passes.c (init_optimization_passes): Run recip after tree loop optimizations. * doc/tm.texi (Misc): Document TARGET_MIN_DIVISIONS_FOR_RECIP_MUL. gcc/testsuite: 2006-01-11 Paolo Bonzini <bonzini@gnu.org> PR tree-optimization/23109 PR tree-optimization/23948 PR tree-optimization/24123 * gcc.dg/tree-ssa/recip-3.c, gcc.dg/tree-ssa/recip-4.c, gcc.dg/tree-ssa/recip-5.c, gcc.dg/tree-ssa/recip-6.c, gcc.dg/tree-ssa/recip-7.c, gcc.dg/tree-ssa/pr23109.c, g++.dg/tree-ssa/pr23948.C: New testcases. * gcc.dg/tree-ssa/recip-2.c, gcc.dg/tree-ssa/pr23234.c: Provide three divisions in order to do the optimization. From-SVN: r109578
2006-01-11 14:02:18 +01:00
/* The default implementation of TARGET_MIN_DIVISIONS_FOR_RECIP_MUL. */
unsigned int
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_min_divisions_for_recip_mul (machine_mode mode ATTRIBUTE_UNUSED)
re PR tree-optimization/23109 (compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)) gcc: 2006-01-11 Paolo Bonzini <bonzini@gnu.org> PR tree-optimization/23109 PR tree-optimization/23948 PR tree-optimization/24123 * Makefile.in (tree-ssa-math-opts.o): Adjust dependencies. * tree-cfg.c (single_noncomplex_succ): New. * tree-flow.h (single_noncomplex_succ): Declare it. * tree-ssa-math-opts.c (enum place_reciprocal): Remove. * tree-ssa-math-opts.c (enum place_reciprocal): Remove. (struct occurrence, occ_head, occ_pool, is_divide_by, compute_merit, insert_bb, register_division_in, insert_reciprocals, replace_reciprocal, free_bb): New. (execute_cse_reciprocals_1): Rewritten. (execute_cse_reciprocals): Adjust calls to execute_cse_reciprocals_1. Do not commit any edge insertion. Always compute dominators and create the allocation pool. * target-def.h (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL): New. * target.h (struct gcc_target): Add min_divistions_for_recip_mul. * targhooks.c (default_min_divistions_for_recip_mul): New. * targhooks.h (default_min_divistions_for_recip_mul): New prototype. * passes.c (init_optimization_passes): Run recip after tree loop optimizations. * doc/tm.texi (Misc): Document TARGET_MIN_DIVISIONS_FOR_RECIP_MUL. gcc/testsuite: 2006-01-11 Paolo Bonzini <bonzini@gnu.org> PR tree-optimization/23109 PR tree-optimization/23948 PR tree-optimization/24123 * gcc.dg/tree-ssa/recip-3.c, gcc.dg/tree-ssa/recip-4.c, gcc.dg/tree-ssa/recip-5.c, gcc.dg/tree-ssa/recip-6.c, gcc.dg/tree-ssa/recip-7.c, gcc.dg/tree-ssa/pr23109.c, g++.dg/tree-ssa/pr23948.C: New testcases. * gcc.dg/tree-ssa/recip-2.c, gcc.dg/tree-ssa/pr23234.c: Provide three divisions in order to do the optimization. From-SVN: r109578
2006-01-11 14:02:18 +01:00
{
return have_insn_for (DIV, mode) ? 3 : 2;
}
/* The default implementation of TARGET_MODE_REP_EXTENDED. */
int
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_mode_rep_extended (machine_mode mode ATTRIBUTE_UNUSED,
machine_mode mode_rep ATTRIBUTE_UNUSED)
{
return UNKNOWN;
}
/* Generic hook that takes a CUMULATIVE_ARGS pointer and returns true. */
bool
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
hook_bool_CUMULATIVE_ARGS_true (cumulative_args_t a ATTRIBUTE_UNUSED)
{
return true;
}
/* Return machine mode for non-standard suffix
or VOIDmode if non-standard suffixes are unsupported. */
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
default_mode_for_suffix (char suffix ATTRIBUTE_UNUSED)
{
return VOIDmode;
}
/* The generic C++ ABI specifies this is a 64-bit value. */
tree
default_cxx_guard_type (void)
{
return long_long_integer_type_node;
}
/* Returns the size of the cookie to use when allocating an array
whose elements have the indicated TYPE. Assumes that it is already
known that a cookie is needed. */
tree
default_cxx_get_cookie_size (tree type)
{
tree cookie_size;
/* We need to allocate an additional max (sizeof (size_t), alignof
(true_type)) bytes. */
tree sizetype_size;
tree type_align;
sizetype_size = size_in_bytes (sizetype);
type_align = size_int (TYPE_ALIGN_UNIT (type));
2014-05-06 18:25:05 +02:00
if (tree_int_cst_lt (type_align, sizetype_size))
cookie_size = sizetype_size;
else
cookie_size = type_align;
return cookie_size;
}
target.h (struct gcc_target): Add calls.pass_by_reference. * target.h (struct gcc_target): Add calls.pass_by_reference. * target-def.h (TARGET_PASS_BY_REFERENCE): New. * function.c (pass_by_reference): Use the hook. * system.h (FUNCTION_ARG_PASS_BY_REFERENCE): Poison. * targhooks.c, targhooks.h (hook_pass_by_reference_false): New. (hook_pass_by_reference_must_pass_in_stack): New. * config/alpha/alpha.c (function_arg): Don't query pass-by-ref. (alpha_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/alpha/alpha.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/arc/arc.c (arc_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/arc/arc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/arm/arm-protos.h (arm_function_arg_pass_by_reference): Remove. * config/arm/arm.c (TARGET_PASS_BY_REFERENCE): New. (arm_pass_by_reference): Rename from arm_function_arg_pass_by_reference. * config/arm/arm.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/c4x/c4x.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/cris/cris.c (cris_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/cris/cris.h (FUNCTION_ARG): Don't query pass-by-ref. (FUNCTION_INCOMING_ARG, FUNCTION_ARG_ADVANCE): Likewise. (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/fr30/fr30.c (TARGET_PASS_BY_REFERENCE): New. * config/fr30/fr30.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/frv/frv-protos.h (frv_function_arg_pass_by_reference): Kill. * config/frv/frv.c (TARGET_PASS_BY_REFERENCE): New. (frv_function_arg_pass_by_reference): Remove. * config/frv/frv.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/i386/i386-protos.h (function_arg_pass_by_reference): Remove. * config/i386/i386.c (TARGET_PASS_BY_REFERENCE): New. (ix86_pass_by_reference): Rename from function_arg_pass_by_reference. * config/i386/i386.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ia64/ia64-protos.h (ia64_function_arg_pass_by_reference): Kill. * config/ia64/ia64.c (TARGET_PASS_BY_REFERENCE): New. (ia64_pass_by_reference): Rename from ia64_function_arg_pass_by_reference. * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ip2k/ip2k.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/iq2000/iq2000-protos.h (function_arg_pass_by_reference): Kill. * config/iq2000/iq2000.c (TARGET_PASS_BY_REFERENCE): New. (iq2000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/iq2000/iq2000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/m32r/m32r-protos.h (m32r_pass_by_reference): Remove. * config/m32r/m32r.c (TARGET_PASS_BY_REFERENCE): New. (m32r_pass_by_reference): Adjust prototype. Make static. Handle mode sizes correctly. * config/m32r/m32r.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c (m68hc11_function_arg_pass_by_reference): Remove. * config/m68hc11/m68hc11.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mcore/mcore.c (TARGET_PASS_BY_REFERENCE): New. * config/mcore/mcore.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/mips/mips-protos.h (function_arg_pass_by_reference): Remove. * config/mips/mips.c (TARGET_PASS_BY_REFERENCE): New. (mips_va_arg): Use pass_by_reference. (mips_pass_by_reference): Rename from function_arg_pass_by_reference. Handle mode sizes correctly. * config/mips/mips.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mmix/mmix-protos.h (mmix_function_arg_pass_by_reference): Kill. * config/mmix/mmix.c (TARGET_PASS_BY_REFERENCE): New. (mmix_pass_by_reference): Rename from mmix_function_arg_pass_by_reference. * config/mmix/mmix.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/mn10300/mn10300.c (TARGET_PASS_BY_REFERENCE): New. (mn10300_pass_by_reference): New. * config/mn10300/mn10300.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/pa/pa.c (pa_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/pa/pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/rs6000/rs6000-protos.h (function_arg_pass_by_reference): Kill. * config/rs6000/rs6000.c (TARGET_PASS_BY_REFERENCE): New. (rs6000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/rs6000/rs6000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/s390/s390-protos.h (s390_function_arg_pass_by_reference): Kill. * config/s390/s390.c (TARGET_PASS_BY_REFERENCE): New. (s390_pass_by_reference): Rename from s390_function_arg_pass_by_reference. (s390_function_arg_advance): Don't query pass-by-ref. (s390_function_arg): Likewise. (s390_gimplify_va_arg): Use pass_by_reference. (s390_call_saved_register_used): Likewise. * config/s390/s390.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/sh/sh.c (TARGET_PASS_BY_REFERENCE): New. (shcompact_byref, sh_pass_by_reference): New. * config/sh/sh.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (SHCOMPACT_BYREF): Remove. * config/sparc/sparc-protos.h (function_arg_pass_by_reference): Kill. * config/sparc/sparc.c (TARGET_PASS_BY_REFERENCE): New. (sparc_pass_by_reference): Rename from function_arg_pass_by_reference. (sparc_gimplify_va_arg): Use pass_by_reference. * config/sparc/sparc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/stormy16/stormy16.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/v850/v850.c (TARGET_PASS_BY_REFERENCE): New. (v850_pass_by_reference): New. * config/v850/v850.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * doc/tm.texi (TARGET_PASS_BY_REFERENCE): Update from FUNCTION_ARG_PASS_BY_REFERENCE docs. From-SVN: r84672
2004-07-14 08:24:27 +02:00
/* Return true if a parameter must be passed by reference. This version
of the TARGET_PASS_BY_REFERENCE hook uses just MUST_PASS_IN_STACK. */
bool
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
hook_pass_by_reference_must_pass_in_stack (cumulative_args_t c ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode ATTRIBUTE_UNUSED, const_tree type ATTRIBUTE_UNUSED,
target.h (struct gcc_target): Add calls.pass_by_reference. * target.h (struct gcc_target): Add calls.pass_by_reference. * target-def.h (TARGET_PASS_BY_REFERENCE): New. * function.c (pass_by_reference): Use the hook. * system.h (FUNCTION_ARG_PASS_BY_REFERENCE): Poison. * targhooks.c, targhooks.h (hook_pass_by_reference_false): New. (hook_pass_by_reference_must_pass_in_stack): New. * config/alpha/alpha.c (function_arg): Don't query pass-by-ref. (alpha_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/alpha/alpha.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/arc/arc.c (arc_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/arc/arc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/arm/arm-protos.h (arm_function_arg_pass_by_reference): Remove. * config/arm/arm.c (TARGET_PASS_BY_REFERENCE): New. (arm_pass_by_reference): Rename from arm_function_arg_pass_by_reference. * config/arm/arm.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/c4x/c4x.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/cris/cris.c (cris_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/cris/cris.h (FUNCTION_ARG): Don't query pass-by-ref. (FUNCTION_INCOMING_ARG, FUNCTION_ARG_ADVANCE): Likewise. (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/fr30/fr30.c (TARGET_PASS_BY_REFERENCE): New. * config/fr30/fr30.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/frv/frv-protos.h (frv_function_arg_pass_by_reference): Kill. * config/frv/frv.c (TARGET_PASS_BY_REFERENCE): New. (frv_function_arg_pass_by_reference): Remove. * config/frv/frv.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/i386/i386-protos.h (function_arg_pass_by_reference): Remove. * config/i386/i386.c (TARGET_PASS_BY_REFERENCE): New. (ix86_pass_by_reference): Rename from function_arg_pass_by_reference. * config/i386/i386.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ia64/ia64-protos.h (ia64_function_arg_pass_by_reference): Kill. * config/ia64/ia64.c (TARGET_PASS_BY_REFERENCE): New. (ia64_pass_by_reference): Rename from ia64_function_arg_pass_by_reference. * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/ip2k/ip2k.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/iq2000/iq2000-protos.h (function_arg_pass_by_reference): Kill. * config/iq2000/iq2000.c (TARGET_PASS_BY_REFERENCE): New. (iq2000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/iq2000/iq2000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/m32r/m32r-protos.h (m32r_pass_by_reference): Remove. * config/m32r/m32r.c (TARGET_PASS_BY_REFERENCE): New. (m32r_pass_by_reference): Adjust prototype. Make static. Handle mode sizes correctly. * config/m32r/m32r.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c (m68hc11_function_arg_pass_by_reference): Remove. * config/m68hc11/m68hc11.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mcore/mcore.c (TARGET_PASS_BY_REFERENCE): New. * config/mcore/mcore.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/mips/mips-protos.h (function_arg_pass_by_reference): Remove. * config/mips/mips.c (TARGET_PASS_BY_REFERENCE): New. (mips_va_arg): Use pass_by_reference. (mips_pass_by_reference): Rename from function_arg_pass_by_reference. Handle mode sizes correctly. * config/mips/mips.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): Don't reference pass-by-ref. * config/mmix/mmix-protos.h (mmix_function_arg_pass_by_reference): Kill. * config/mmix/mmix.c (TARGET_PASS_BY_REFERENCE): New. (mmix_pass_by_reference): Rename from mmix_function_arg_pass_by_reference. * config/mmix/mmix.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/mn10300/mn10300.c (TARGET_PASS_BY_REFERENCE): New. (mn10300_pass_by_reference): New. * config/mn10300/mn10300.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/pa/pa.c (pa_pass_by_reference): New. (TARGET_PASS_BY_REFERENCE): New. * config/pa/pa.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * config/rs6000/rs6000-protos.h (function_arg_pass_by_reference): Kill. * config/rs6000/rs6000.c (TARGET_PASS_BY_REFERENCE): New. (rs6000_pass_by_reference): Rename from function_arg_pass_by_reference. * config/rs6000/rs6000.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/s390/s390-protos.h (s390_function_arg_pass_by_reference): Kill. * config/s390/s390.c (TARGET_PASS_BY_REFERENCE): New. (s390_pass_by_reference): Rename from s390_function_arg_pass_by_reference. (s390_function_arg_advance): Don't query pass-by-ref. (s390_function_arg): Likewise. (s390_gimplify_va_arg): Use pass_by_reference. (s390_call_saved_register_used): Likewise. * config/s390/s390.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/sh/sh.c (TARGET_PASS_BY_REFERENCE): New. (shcompact_byref, sh_pass_by_reference): New. * config/sh/sh.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (SHCOMPACT_BYREF): Remove. * config/sparc/sparc-protos.h (function_arg_pass_by_reference): Kill. * config/sparc/sparc.c (TARGET_PASS_BY_REFERENCE): New. (sparc_pass_by_reference): Rename from function_arg_pass_by_reference. (sparc_gimplify_va_arg): Use pass_by_reference. * config/sparc/sparc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/stormy16/stormy16.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * config/v850/v850.c (TARGET_PASS_BY_REFERENCE): New. (v850_pass_by_reference): New. * config/v850/v850.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. (FUNCTION_ARG_CALLEE_COPIES): True. * doc/tm.texi (TARGET_PASS_BY_REFERENCE): Update from FUNCTION_ARG_PASS_BY_REFERENCE docs. From-SVN: r84672
2004-07-14 08:24:27 +02:00
bool named_arg ATTRIBUTE_UNUSED)
{
return targetm.calls.must_pass_in_stack (mode, type);
}
function.c (reference_callee_copied): New. * function.c (reference_callee_copied): New. (assign_parm_setup_reg): Use it. * calls.c (initialize_argument_information): Likewise. (emit_library_call_value_1): Likewise. * function.h (reference_callee_copied): Declare. * target.h (struct gcc_target): Add callee_copies. * target-def.h (TARGET_CALLEE_COPIES): New. (TARGET_PASS_BY_REFERENCE): Update default. * expr.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * targhooks.c (hook_callee_copies_named): New. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Rename from hook_pass_by_reference_false. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): New. * targhooks.h: Update decls. * config/arc/arc.c (TARGET_CALLEE_COPIES): New. * config/arc/arc.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/frv/frv-protos.h (frv_function_arg_callee_copies): Remove. * config/frv/frv.c (frv_function_arg_callee_copies): Remove. * config/frv/frv.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/iq2000/iq2000.c (TARGET_CALLEE_COPIES): New. * config/iq2000/iq2000.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/m68hc11/m68hc11.c (TARGET_CALLEE_COPIES): New. * config/m68hc11/m68hc11.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mips/mips.c (TARGET_CALLEE_COPIES): New. (mips_callee_copies): New. * config/mips/mips.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mmix/mmix.c (TARGET_CALLEE_COPIES): New. * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mn10300/mn10300.c (TARGET_CALLEE_COPIES): New. * config/mn10300/mn10300.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/pa/pa.c (TARGET_CALLEE_COPIES): New. * config/pa/pa.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/sh/sh.c (sh_callee_copies): New. (TARGET_CALLEE_COPIES): New. * config/sh/sh.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/v850/v850.c (TARGET_CALLEE_COPIES): New. * config/v850/v850.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * doc/tm.texi (TARGET_CALLEE_COPIES): Replace documentation for FUNCTION_ARG_CALLEE_COPIES. * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Update. From-SVN: r87195
2004-09-08 20:45:21 +02:00
/* Return true if a parameter follows callee copies conventions. This
version of the hook is true for all named arguments. */
bool
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
hook_callee_copies_named (cumulative_args_t ca ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode ATTRIBUTE_UNUSED,
arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arm/pe.c (arm_dllexport_p, arm_dllimport_p, arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport, arm_mark_dllimport, arm_pe_encode_section_info, arm_pe_unique_section): Use ISO-C function declarations. * config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored): Likewise. * config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning. * config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before defining. * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise. * config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise. (register_move_cost): Use ISO-C function declarations. * config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings. * config/score/score-protos.h (score_declare_object): Add ATTRIBUTE_PRINTF_4. * config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * final.c (profile_function): Avoid empty if-bodies. * calls.c (must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Constify. * config/alpha/alpha-protos.h (function_value): Likewise. * config/alpha/alpha.c (alpha_return_in_memory, alpha_pass_by_reference, function_value, unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arm/arm-protos.h (arm_return_in_memory, arm_pad_arg_upward, arm_function_value): Likewise. * config/arm/arm.c (arm_pass_by_reference, arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, arm_function_value, arm_return_in_memory, arm_pad_arg_upward): Likewise. * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise. * config/avr/avr-protos.h (avr_function_value): Likewise. * config/avr/avr.c (avr_return_in_memory, gas_output_limited_string, gas_output_ascii, avr_function_value, avr_return_in_memory): Likewise. * config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise. * config/bfin/bfin.c (bfin_pass_by_reference, bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/cris/cris.c (cris_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS): Likewise. * config/crx/crx.c (crx_return_in_memory): Likewise. * config/darwin.c (function_base, machopic_function_base_name): Likewise. * config/fr30/fr30.c (fr30_must_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/frv/frv.c (frv_must_pass_in_stack): Likewise. * config/h8300/h8300.c (h8300_return_in_memory): Likewise. * config/i386/i386-protos.h (ix86_return_in_memory, ix86_sol10_return_in_memory): Likewise. * config/i386/i386.c (ix86_function_value, ix86_function_sseregparm, ix86_must_pass_in_stack, type_natural_mode, classify_argument, examine_argument, construct_container, ix86_pass_by_reference, function_value_32, function_value_64, ix86_function_value_1, return_in_memory_32, return_in_memory_64, return_in_memory_ms_64, ix86_return_in_memory, ix86_sol10_return_in_memory, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/ia64/ia64-protos.h (ia64_function_value, ia64_hpux_function_arg_padding): Likewise. * config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory, ia64_function_value, bundle_state_hash, bundle_state_eq_p, ia64_hpux_function_arg_padding): Likewise. * config/iq2000/iq2000-protos.h (function_arg, iq2000_function_value): Likewise. * config/iq2000/iq2000.c (iq2000_return_in_memory, iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg, iq2000_function_value): Likewise. * config/m32c/m32c-protos.h (m32c_function_value, m32c_promote_function_return): Likewise. * config/m32c/m32c.c (m32c_pass_by_reference, m32c_promote_prototypes, m32c_promote_function_return, m32c_function_value): Likewise. * config/m32r/m32r.c (m32r_return_in_memory, m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, m32r_in_small_data_p): Likewise. * config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding): Likewise. * config/m68hc11/m68hc11.c (m68hc11_return_in_memory, m68hc11_function_arg_padding): Likewise. * config/m68k/m68k-protos.h (m68k_function_value): Likewise. * config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES, m68k_function_value): Likewise. * config/mcore/mcore-protos.h (mcore_num_arg_regs, mcore_function_value): Likewise. * config/mcore/mcore.c (handle_structs_in_regs, mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mcore_num_arg_regs, mcore_function_value): Likewise. * config/mips/mips-protos.h (mips_pad_arg_upward, mips_function_value): Likewise. * config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb, mips_return_in_memory, mips_pass_by_reference, mips_callee_copies, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward, mips_function_value): Likewise. * config/mmix/mmix-protos.h (mmix_function_outgoing_value): Likewise. * config/mmix/mmix.c (mmix_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value, mmix_encode_section_info): Likewise. * config/mn10300/mn10300-protos.h (mn10300_function_value): Likewise. * config/mn10300/mn10300.c (mn10300_return_in_memory, mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, mn10300_function_value): Likewise. * config/mt/mt-protos.h (mt_function_value): Likewise. * config/mt/mt.c (mt_pass_by_reference, mt_function_value, mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/pa/pa-protos.h (function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pa/pa.c (pa_pass_by_reference, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise. * config/rs6000/rs6000-protos.h (rs6000_function_value, function_arg_padding): Likewise. * config/rs6000/rs6000.c (rs6000_return_in_memory, rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg, rs6000_pass_by_reference, rs6000_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_padding, altivec_expand_dst_builtin, altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins, altivec_init_builtins, rs6000_common_init_builtins, rs6000_function_value): Likewise. * s390/s390-protos.h (s390_function_value): Likewise. * config/s390/s390.c (s390_function_arg_size, s390_pass_by_reference, s390_return_in_memory, s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/score/score-protos.h (score_function_value): Likewise. * config/score/score.c (score_arg_partial_bytes, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, score_return_in_memory, score_pass_by_reference, score_add_offset, score_function_value): Likewise. * config/sh/sh-protos.h (sh_attr_renesas_p, sh_promote_prototypes): Likewise. * config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference, sh_callee_copies, sh_promote_prototypes, shcompact_byref, sh_attr_renesas_p): Likewise. * config/sparc/sparc-protos.h (function_value, function_arg_padding): Likewise. * config/sparc/sparc.c (sparc_promote_prototypes, sparc_return_in_memory, sparc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_record_value_2, function_arg_record_value_1, function_arg_record_value, function_arg_record_value, function_arg_padding, function_value): Likewise. * config/spu/spu-protos.h (spu_function_value): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory, spu_function_value): Likewise. * config/stormy16/stormy16-protos.h (xstormy16_function_value): Likewise. * config/stormy16/stormy16.c (xstormy16_return_in_memory, xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/v850/v850.c (v850_return_in_memory, v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise. * config/xtensa/xtensa.c (xtensa_return_in_msb, xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * explow.c (promote_mode, hard_function_value): Likewise. * expr.h (hard_function_value, promote_mode): Likewise. * function.c (aggregate_value_p): Likewise. * hooks.c (hook_bool_const_tree_true): New. * hooks.h (hook_bool_const_tree_true): New. * sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_RETURN_IN_MSB): Likewise. * target.h (promote_function_args, promote_function_return, promote_prototypes, return_in_memory, return_in_msb, pass_by_reference, must_pass_in_stack, callee_copies, function_value): Likewise. * targhooks.c (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * targhooks.h (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * tree-ssa-structalias.c (const_equiv_class_label_t): New. (equiv_class_label_hash, equiv_class_label_eq): Constify. * tree-vectorizer.c (bb_in_loop_p): Likewise. * tree.c (needs_to_live_in_memory): Likewise. * tree.h (struct tree_type, needs_to_live_in_memory, aggregate_value_p, must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Likewise. * vmsdbgout.c (write_debug_addr, write_debug_delta4, write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg, lookup_filename): Likewise. From-SVN: r127743
2007-08-23 17:49:56 +02:00
const_tree type ATTRIBUTE_UNUSED, bool named)
function.c (reference_callee_copied): New. * function.c (reference_callee_copied): New. (assign_parm_setup_reg): Use it. * calls.c (initialize_argument_information): Likewise. (emit_library_call_value_1): Likewise. * function.h (reference_callee_copied): Declare. * target.h (struct gcc_target): Add callee_copies. * target-def.h (TARGET_CALLEE_COPIES): New. (TARGET_PASS_BY_REFERENCE): Update default. * expr.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * targhooks.c (hook_callee_copies_named): New. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Rename from hook_pass_by_reference_false. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): New. * targhooks.h: Update decls. * config/arc/arc.c (TARGET_CALLEE_COPIES): New. * config/arc/arc.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/frv/frv-protos.h (frv_function_arg_callee_copies): Remove. * config/frv/frv.c (frv_function_arg_callee_copies): Remove. * config/frv/frv.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/iq2000/iq2000.c (TARGET_CALLEE_COPIES): New. * config/iq2000/iq2000.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/m68hc11/m68hc11.c (TARGET_CALLEE_COPIES): New. * config/m68hc11/m68hc11.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mips/mips.c (TARGET_CALLEE_COPIES): New. (mips_callee_copies): New. * config/mips/mips.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mmix/mmix.c (TARGET_CALLEE_COPIES): New. * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mn10300/mn10300.c (TARGET_CALLEE_COPIES): New. * config/mn10300/mn10300.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/pa/pa.c (TARGET_CALLEE_COPIES): New. * config/pa/pa.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/sh/sh.c (sh_callee_copies): New. (TARGET_CALLEE_COPIES): New. * config/sh/sh.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/v850/v850.c (TARGET_CALLEE_COPIES): New. * config/v850/v850.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * doc/tm.texi (TARGET_CALLEE_COPIES): Replace documentation for FUNCTION_ARG_CALLEE_COPIES. * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Update. From-SVN: r87195
2004-09-08 20:45:21 +02:00
{
return named;
}
final.c (output_asm_insn): Call targetm.asm_out.print_operand_punct_valid_p. * final.c (output_asm_insn): Call targetm.asm_out.print_operand_punct_valid_p. Update comments. (output_operand): Call targetm.asm_out.print_operand. Update comments. (output_address): Call targetm.asm_out.print_operand_address. Update comments. * target.h (struct gcc_target): Add print_operand, print_operand_address, and print_operand_punct_valid_p fields. * targhooks.h (default_print_operand): Declare. (default_print_operand_address): Declare. (default_print_operand_punct_valid_p): Declare. * targhooks.c (default_print_operand): Define. (default_print_operand_address): Define. (default_print_operand_punct_valid_p): Define. * target-def.h (TARGET_PRINT_OPERAND): Define if not defined. (TARGET_PRINT_OPERAND_ADDRESS): Likewise. (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Likewise. (TARGET_ASM_OUT): Add TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS, and TARGET_PRINT_OPERAND_PUNCT_VALID_P. * vmsdbgout.c (addr_const_to_string): Update comment. * config/i386/i386.c (print_operand): Rename to... (ix86_print_operand): ...this. Make static. (print_operand_address): Rename to... (ix86_print_operand_address): ...this. Make static. Call ix86_print_operand instead of PRINT_OPERAND. (ix86_print_operand_punct_valid_p): New function. (TARGET_PRINT_OPERAND): Define. (TARGET_PRINT_OPERAND_ADDRESS): Define. (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define. * config/i386/i386.h (HI_REGISTER_NAMES): Update comment. (PRINT_OPERAND_PUNCT_VALID_P): Delete. (PRINT_OPERAND): Delete. (PRINT_OPERAND_ADDRESS): Delete. * config/i386/i386-protos.h (print_operand): Delete prototype. (print_operand_address): Delete prototype. From-SVN: r160245
2010-06-04 03:49:15 +02:00
/* Emit to STREAM the assembler syntax for insn operand X. */
void
default_print_operand (FILE *stream ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
int code ATTRIBUTE_UNUSED)
{
#ifdef PRINT_OPERAND
PRINT_OPERAND (stream, x, code);
#else
gcc_unreachable ();
#endif
}
/* Emit to STREAM the assembler syntax for an insn operand whose memory
address is X. */
void
default_print_operand_address (FILE *stream ATTRIBUTE_UNUSED,
Machine modes for address printing. * final.c (output_asm_insn): Pass VOIDmode to output_address. (output_address): Add MODE argument. Pass to print_operand_address hook. * targhooks.c (default_print_operand_address): Add MODE argument. * targhooks.h (default_print_operand_address): Update prototype. * output.h (output_address): Update prototype. * target.def (print_operand_address): Add MODE argument. * config/vax/vax.c (print_operand_address): Pass VOIDmode to output_address. (print_operand): Pass access mode to output_address. * config/mcore/mcore.c (mcore_print_operand_address): Add MODE argument. (mcore_print_operand): Update calls to mcore_print_operand_address. * config/fr30/fr30.c (fr30_print_operand): Pass VOIDmode to output_address. * config/lm32/lm32.c (lm32_print_operand): Pass mode in calls to output_address. * config/tilegx/tilegx.c (output_memory_reference_mode): Remove global. (tilegx_print_operand): Don't set above global. Update calls to output_address. (tilegx_print_operand_address): Add MODE argument. Use instead of output_memory_reference_mode global. * config/frv/frv.c (frv_print_operand_address): Add MODE argument. (frv_print_operand): Pass mode to frv_print_operand_address calls. * config/mn10300/mn10300.c (mn10300_print_operand): Pass mode to output_address. * config/cris/cris.c (cris_print_operand_address): Add MODE argument. (cris_print_operand): Pass mode to output_address calls. * config/spu/spu.c (print_operand): Pass mode to output_address calls. * config/aarch64/aarch64.h (aarch64_print_operand) (aarch64_print_operand_address): Remove prototypes. * config/aarch64/aarch64.c (aarch64_memory_reference_mode): Delete global. (aarch64_print_operand): Make static. Update calls to output_address. (aarch64_print_operand_address): Add MODE argument. Use instead of aarch64_memory_reference_mode global. (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS): Define target hooks. * config/aarch64/aarch64.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS): Delete macro definitions. * config/pa/pa.c (pa_print_operand): Pass mode in output_address calls. * config/xtensa/xtensa.c (print_operand): Pass mode in output_address calls. * config/h8300/h8300.c (h8300_print_operand_address): Add MODE argument. (h83000_print_operand): Update calls to h8300_print_operand_address and output_address. * config/ia64/ia64.c (ia64_print_operand_address): Add MODE argument. * config/tilepro/tilepro.c (output_memory_reference_mode): Delete global. (tilepro_print_operand): Pass mode to output_address. (tilepro_print_operand_address): Add MODE argument. Use instead of output_memory_reference_mode. * config/nvptx/nvptx.c (output_decl_chunk, nvptx_assemble_integer) (nvptx_output_call_insn, nvptx_print_address_operand): Pass VOIDmode to output_address calls. (nvptx_print_operand_address): Add MODE argument. * config/alpha/alpha.c (print_operand): Pass mode argument in output_address calls. * config/m68k/m68k.c (print_operand): Pass mode argument in output_address call. * config/avr/avr.c (avr_print_operand_address): Add MODE argument. (avr_print_operand): Update calls to avr_print_operand_address. * config/sparc/sparc.c (sparc_print_operand_address): Add MODE argument. Update calls to output_address. (sparc_print_operand): Pass mode to output_address. * config/iq2000/iq2000.c (iq2000_print_operand_address): Add MODE argument. (iq2000_print_operand): Pass mode in output_address calls. * config/stormy16/stormy16.c (xstormy16_print_operand_address): Add MODE argument. (xstormy16_print_operand): Pass mode to xstormy16_print_operand_address calls. * config/mips/mips.c (mips_print_operand): Update calls to output_address. (mips_print_operand_address): Add MODE argument. * config/epiphany/epiphany.c (epiphany_print_operand): Update calls to output_address. (epiphany_print_operand_address): Add MODE argument. Add FIXME note. * config/pdp11/pdp11.c (pdp11_asm_print_operand): Update call to output_address. * config/rx/rx.c (rx_print_operand_address): Add MODE argument. (rx_print_operand): Update calls to output_address, rx_print_operand_address. * config/nds32/nds32.c (nds32_print_operand): Update calls to output_address. (nds32_print_operand_address): Add MODE argument. * config/rs6000/rs6000.c (print_operand): Pass mem mode to output_address calls. * config/c6x/c6x.c (print_address_offset): Pass mem mode to output_address call. (c6x_print_address_operand): Update calls to output_address. (c6x_print_operand_address): Pass mode to above. * config/v850/v850.c (v850_print_operand_address): Add MODE argument. (v850_print_operand): Pass mode to v850_print_operand_address, output_address. * config/mmix/mmix.c (mmix_print_operand_address): Add MODE argument. (mmix_print_operand): Pass mode in output_address calls. * config/sh/sh.c (sh_print_operand_address): Add MODE argument. (sh_print_operand): Pass mem mode to output_address, sh_print_operand_address. * config/cr16/cr16.c (cr16_print_operand_address): Add MODE argument. (cr16_print_operand): Pass mode to output_address, cr16_print_operand_address. * config/bfin/bfin.c (print_address_operand): Pass VOIDmode to output_address. * config/microblaze/microblaze.c (print_operand): Pass mode to output_address. * config/nios2/nios2.c (nios2_print_operand): Pass VOIDmode to output_address. (nios2_print_operand_address): Add MODE argument. Update call to nios2_print_operand_address. * config/s390/s390.c (print_operand): Pass mode to output_address. * config/m32c/m32c.c (m32c_print_operand_address): Add MODE argument. * config/arc/arc.c (arc_print_operand): Pass VOIDmode to output_address. * config/arm/arm.c (arm_print_operand_address): Add MODE argument. Use instead of output_memory_reference_mode. (output_memory_reference_mode): Delete global. (arm_print_operand): Pass mem mode to output_address. * config/m32r/m32r.c (m32r_print_operand_address): Add MODE argument. (m32r_print_operand): Pass mode to output_address. * config/msp430/msp430.c (msp430_print_operand_addr): Add MODE argument. (msp430_print_operand): Pass mode to msp430_print_operand_addr. * config/i386/i386.c (ix86_print_operand): Pass mode to output_address calls. (ix86_print_operand_address): Add MODE argument. From-SVN: r230016
2015-11-09 13:16:55 +01:00
machine_mode /*mode*/,
final.c (output_asm_insn): Call targetm.asm_out.print_operand_punct_valid_p. * final.c (output_asm_insn): Call targetm.asm_out.print_operand_punct_valid_p. Update comments. (output_operand): Call targetm.asm_out.print_operand. Update comments. (output_address): Call targetm.asm_out.print_operand_address. Update comments. * target.h (struct gcc_target): Add print_operand, print_operand_address, and print_operand_punct_valid_p fields. * targhooks.h (default_print_operand): Declare. (default_print_operand_address): Declare. (default_print_operand_punct_valid_p): Declare. * targhooks.c (default_print_operand): Define. (default_print_operand_address): Define. (default_print_operand_punct_valid_p): Define. * target-def.h (TARGET_PRINT_OPERAND): Define if not defined. (TARGET_PRINT_OPERAND_ADDRESS): Likewise. (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Likewise. (TARGET_ASM_OUT): Add TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS, and TARGET_PRINT_OPERAND_PUNCT_VALID_P. * vmsdbgout.c (addr_const_to_string): Update comment. * config/i386/i386.c (print_operand): Rename to... (ix86_print_operand): ...this. Make static. (print_operand_address): Rename to... (ix86_print_operand_address): ...this. Make static. Call ix86_print_operand instead of PRINT_OPERAND. (ix86_print_operand_punct_valid_p): New function. (TARGET_PRINT_OPERAND): Define. (TARGET_PRINT_OPERAND_ADDRESS): Define. (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define. * config/i386/i386.h (HI_REGISTER_NAMES): Update comment. (PRINT_OPERAND_PUNCT_VALID_P): Delete. (PRINT_OPERAND): Delete. (PRINT_OPERAND_ADDRESS): Delete. * config/i386/i386-protos.h (print_operand): Delete prototype. (print_operand_address): Delete prototype. From-SVN: r160245
2010-06-04 03:49:15 +02:00
rtx x ATTRIBUTE_UNUSED)
{
#ifdef PRINT_OPERAND_ADDRESS
PRINT_OPERAND_ADDRESS (stream, x);
#else
gcc_unreachable ();
#endif
}
/* Return true if CODE is a valid punctuation character for the
`print_operand' hook. */
bool
default_print_operand_punct_valid_p (unsigned char code ATTRIBUTE_UNUSED)
{
#ifdef PRINT_OPERAND_PUNCT_VALID_P
return PRINT_OPERAND_PUNCT_VALID_P (code);
#else
return false;
#endif
}
/* The default implementation of TARGET_MANGLE_ASSEMBLER_NAME. */
tree
default_mangle_assembler_name (const char *name ATTRIBUTE_UNUSED)
{
const char *skipped = name + (*name == '*' ? 1 : 0);
const char *stripped = targetm.strip_name_encoding (skipped);
if (*name != '*' && user_label_prefix[0])
stripped = ACONCAT ((user_label_prefix, stripped, NULL));
return get_identifier (stripped);
}
/* True if MODE is valid for the target. By "valid", we mean able to
be manipulated in non-trivial ways. In particular, this means all
the arithmetic is supported.
By default we guess this means that any C type is supported. If
we can't map the mode back to a type that would be available in C,
then reject it. Special case, here, is the double-word arithmetic
supported by optabs.c. */
bool
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_scalar_mode_supported_p (machine_mode mode)
{
int precision = GET_MODE_PRECISION (mode);
switch (GET_MODE_CLASS (mode))
{
case MODE_PARTIAL_INT:
case MODE_INT:
if (precision == CHAR_TYPE_SIZE)
return true;
if (precision == SHORT_TYPE_SIZE)
return true;
if (precision == INT_TYPE_SIZE)
return true;
if (precision == LONG_TYPE_SIZE)
return true;
if (precision == LONG_LONG_TYPE_SIZE)
return true;
if (precision == 2 * BITS_PER_WORD)
return true;
return false;
case MODE_FLOAT:
if (precision == FLOAT_TYPE_SIZE)
return true;
if (precision == DOUBLE_TYPE_SIZE)
return true;
if (precision == LONG_DOUBLE_TYPE_SIZE)
return true;
return false;
target-def.h (TARGET_DECIMAL_FLOAT_SUPPORTED_P): New. 2005-12-16 Jon Grimm <jgrimm2@us.ibm.com> Janis Johnson <janis187@us.ibm.com> Ben Elliston <bje@au.ibm.com> * target-def.h (TARGET_DECIMAL_FLOAT_SUPPORTED_P): New. (TARGET_INITIALIZER): Add TARGET_DECIMAL_FLOAT_P. * target.h (struct gcc_target): Add decimal_float_supported_p. * targhooks.c (default_scalar_mode_supported_p): Handle MODE_DECIMAL_FLOAT. * builtins.def: Add new builtins for 32, 64 and 128 bit variants of inf, nan, finite, isinf and isnan. * builtin-types.def (BT_DFLOAT32, BT_DFLOAT64, BT_DFLOAT128, BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR, BT_FN_DFLOAT32, BT_FN_DFLOAT64, BT_FN_DFLOAT128, BT_FN_INT_DFLOAT32, BT_FN_INT_DFLOAT64, BT_FN_INT_DFLOAT128, BT_FN_DFLOAT32_CONST_STRING, BT_FN_DFLOAT64_CONST_STRING, BT_FN_DFLOAT32_CONST_STRING, BT_FN_DFLOAT32_DFLOAT32, BT_FN_DFLOAT64_DFLOAT64, BT_FN_DFLOAT128_DFLOAT128): New. * c-decl.c (declspecs_add_type): Verify combos on type qualifiers. Pedwarn if decimal floating point types are used. Error if decimal floating point is not supported by the target. (finish_declspecs): Return type from DFP typespec_word. * c-typeck.c (c_common_type): Choose the decimal floating point type with the greater precision when determining a common type. (convert_arguments): Warn if there is a mismatch between argument and prototype for decimal float types. Warn of conversions with binary float types and of precision narrowing due to prototype. * c-parser.c (reswords): Add _Decimal32, _Decimal64, _Decimal128. (c_token_starts_typename): Handle RID_DFLOAT32/64/128. (c_token_starts_declspecs): Likewise. (c_parser_attributes): Likewise. * c-common.h (enum rid): Add new enumeration values RID_DFLOAT32, RID_DFLOAT64, RID_DFLOAT128. (T_D32, TEX_D32, T_D64, TEX_D64, T_D128, TEX_D128): New macros. * c-common.c (c_common_type_for_mode): Handle decimal float modes. (shorten_compare): Convert DFP/BFP operands to a common type. (c_common_modes_and_builtins): Register built-in decimal float types if the target supports them. (handle_mode_addtribute): Handle MODE_DECIMAL_FLOAT. * builtins.c (fold_builtin_1): Handle 32, 64 and 128 bit cases of inf, nan, finite, isinf and isnan builtins. * c-cppbuiltin.c (builtin_define_decimal_float_constants): New. (builtin_define_float_constants): Assert non-decimal radix. (c_cpp_builtins): Register built-in __DEC_EVAL_METHOD__ define. Call builtin_define_decimal_float_constants for each type. * c-lex.c (interpret_float): Decode decimal float types from CPP_N flags. Use real_from_string3, which can handle binary or decimal floats. * c-tree.h (enum c_typespec_keyword): Add cts_dfloat32, cts_dfloat64, cts_dfloat128. * tree.c (build_common_tree_nodes_2): Add decimal float types. * tree.h (enum tree_index): Add new enumeration values TI_DFLOAT32_TYPE, TI_DFLOAT64_TYPE, TI_DFLOAT128_TYPE, TI_DFLOAT32_PTR_TYPE, TI_DFLOAT64_PTR_TYPE, TI_DFLOAT128_PTR_TYPE. (dfloat32_type_node): New macro. (dfloat64_type_node, dfloat128_type_node): Likewise. (dfloat32_ptr_type_node, dfloat64_ptr_type_node): Likewise. (dfloat128_ptr_type_node): Likewise. * c-pretty-print.c (pp_c_floating_constant): Append 32, 64 and 128 bit decimal floating point types with "df", "dd" and "dl". * c-format.h (enum format_lengths): Add new enumeration values FMT_LEN_H, FMT_LEN_D and FMT_LEN_DD. * c-format.c (printf_length_specs, scanf_length_specs): Add entries for H, D, DD. (print_char_table, scan_char_table): Use new entries. (asm_fprintf_char_table, gcc_diag_char_table, gcc_cdiag_char_table, gcc_cxxdiag_char_table): Adjust for longer length arrays. * defaults.h (DECIMAL32_TYPE_SIZE): Define. (DECIMAL64_TYPE_SIZE): Likewise. (DECIMAL128_TYPE_SIZE): Likewise. (TARGET_DEC_EVAL_METHOD): Likewise. * doc/extend.texi (Decimal Float): New node. (Constructing Calls): Document decimal float built-ins. * doc/tm.texi: Document TARGET_DECIMAL_FLOAT_SUPPORTED_P hook. * Makefile.in (USER_H): Add $(srcdir)/ginclude/decfloat.h. * ginclude/decfloat.h: New file. Co-Authored-By: Ben Elliston <bje@au.ibm.com> Co-Authored-By: Janis Johnson <janis187@us.ibm.com> From-SVN: r108629
2005-12-16 07:38:26 +01:00
case MODE_DECIMAL_FLOAT:
c-common.h (enum rid): Add new enumeration values of RID_SAT, RID_FRACT, and RID_ACCUM. * c-common.h (enum rid): Add new enumeration values of RID_SAT, RID_FRACT, and RID_ACCUM. RID_SAT needs to be inserted before RID_ONEWAY, so that it can be checked in declspecs_add_type. (c_common_fixed_point_type_for_size): Declare. * c-parser.c (reswords): Add _Fract, _Accum, and _Sat. (c_token_starts_typename): Handle RID_FRACT, RID_ACCUM, and RID_SAT. (c_token_starts_declspecs): Likewise. (c_parser_declspecs): Likewise. (c_parser_attributes): Likewise. * c-tree.h (enum c_typespec_keyword): Add cts_fract and cts_accum. (c_declspecs): Add saturating_p. * c-decl.c (build_null_declspecs): Initialize saturating_p. (declspecs_add_type): Avoid using complex with _Fract, _Accum, or _Sat. Handle RID_SAT. Avoid using void, bool, char, int, float, double, _Decimal32, _Decimal64, _Decimal128, and complex with _Sat. Handle RID_FRACT and RID_ACCUM. Make sure _Sat is used with _Fract or _Accum. (finish_declspecs): Handle cts_fract and cts_accum. * c-common.c (fixed-value.h): New include. (constant_expression_warning): Handle FIXED_CST. (overflow_warning): Likewise. (warnings_for_convert_and_check): Likewise. (c_common_fixed_point_type_for_size): New. (c_common_type_for_mode): Handle fixed-point modes to return various saturating/non-saturating, signed/unsigned types. (c_common_signed_or_unsigned_type): Support fixed-point types. (shorten_compare): Check fixed-point zero. Handle FIXED_POINT_TYPE. (c_common_truthvalue_conversion): Handle FIXED_CST. Handle FIXED_POINT_TYPE. (c_common_nodes_and_builtins): Record builtin types for fixed-point types. (handle_mode_attribute): Handle fixed-point modes. Need to check if the signness of base type and fixed-point modes are consistent. (handle_vector_size_attribute): Handle fixed-point modes. (same_scalar_type_ignoring_signedness): Handle FIXED_POINT_TYPE. (warn_for_div_by_zero): Check fixed-point zero. * c-typeck.c (c_common_type): Check FIXED_POINT_TYPE. Build a common fixed-point type based on fbit, ibit, sign, and saturation. (build_unary_op): Allow FIXED_POINT_TYPE for CONVERT_EXPR, NEGATE_EXPR, TRUTH_NOT_EXPR, PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR, and POSTDECREMENT_EXPR. (convert_for_assignment): Support FIXED_POINT_TYPE. (digest_init): Handle FIXED_POINT_TYPE. (build_binary_op): Support FIXED_POINT_TYPE in *_DIV_EXPR, TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR, TRUTH_XOR_EXPR, RSHIFT_EXPR, LSHIFT_EXPR, EQ_EXPR, NE_EXPR, LE_EXPR, GE_EXPR, LT_EXPR, GT_EXPR. * target-def.h (TARGET_FIXED_POINT_SUPPORTED_P): New. (TARGET_INITIALIZER): Add TARGET_FIXED_POINT_SUPPORTED_P. * target.h (gcc_target): Add fixed_point_supported_p. * targhooks.c (default_scalar_mode_supported_p): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, and MODE_UACCUM. (default_fixed_point_supported_p): Define. * targhooks.h (default_fixed_point_supported_p): Declare. * doc/tm.texi (TARGET_FIXED_POINT_SUPPORTED_P): Add. * doc/install.texi (Configuration): Add --enable-fixed-point. * configure.ac (--enable-fixed-point): New to enable fixed-point arithmetic extension to C. For mips targets, we enable it by default. * configure, config.in: Regenerate. From-SVN: r127652
2007-08-21 00:26:47 +02:00
case MODE_FRACT:
case MODE_UFRACT:
case MODE_ACCUM:
case MODE_UACCUM:
target-def.h (TARGET_DECIMAL_FLOAT_SUPPORTED_P): New. 2005-12-16 Jon Grimm <jgrimm2@us.ibm.com> Janis Johnson <janis187@us.ibm.com> Ben Elliston <bje@au.ibm.com> * target-def.h (TARGET_DECIMAL_FLOAT_SUPPORTED_P): New. (TARGET_INITIALIZER): Add TARGET_DECIMAL_FLOAT_P. * target.h (struct gcc_target): Add decimal_float_supported_p. * targhooks.c (default_scalar_mode_supported_p): Handle MODE_DECIMAL_FLOAT. * builtins.def: Add new builtins for 32, 64 and 128 bit variants of inf, nan, finite, isinf and isnan. * builtin-types.def (BT_DFLOAT32, BT_DFLOAT64, BT_DFLOAT128, BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR, BT_FN_DFLOAT32, BT_FN_DFLOAT64, BT_FN_DFLOAT128, BT_FN_INT_DFLOAT32, BT_FN_INT_DFLOAT64, BT_FN_INT_DFLOAT128, BT_FN_DFLOAT32_CONST_STRING, BT_FN_DFLOAT64_CONST_STRING, BT_FN_DFLOAT32_CONST_STRING, BT_FN_DFLOAT32_DFLOAT32, BT_FN_DFLOAT64_DFLOAT64, BT_FN_DFLOAT128_DFLOAT128): New. * c-decl.c (declspecs_add_type): Verify combos on type qualifiers. Pedwarn if decimal floating point types are used. Error if decimal floating point is not supported by the target. (finish_declspecs): Return type from DFP typespec_word. * c-typeck.c (c_common_type): Choose the decimal floating point type with the greater precision when determining a common type. (convert_arguments): Warn if there is a mismatch between argument and prototype for decimal float types. Warn of conversions with binary float types and of precision narrowing due to prototype. * c-parser.c (reswords): Add _Decimal32, _Decimal64, _Decimal128. (c_token_starts_typename): Handle RID_DFLOAT32/64/128. (c_token_starts_declspecs): Likewise. (c_parser_attributes): Likewise. * c-common.h (enum rid): Add new enumeration values RID_DFLOAT32, RID_DFLOAT64, RID_DFLOAT128. (T_D32, TEX_D32, T_D64, TEX_D64, T_D128, TEX_D128): New macros. * c-common.c (c_common_type_for_mode): Handle decimal float modes. (shorten_compare): Convert DFP/BFP operands to a common type. (c_common_modes_and_builtins): Register built-in decimal float types if the target supports them. (handle_mode_addtribute): Handle MODE_DECIMAL_FLOAT. * builtins.c (fold_builtin_1): Handle 32, 64 and 128 bit cases of inf, nan, finite, isinf and isnan builtins. * c-cppbuiltin.c (builtin_define_decimal_float_constants): New. (builtin_define_float_constants): Assert non-decimal radix. (c_cpp_builtins): Register built-in __DEC_EVAL_METHOD__ define. Call builtin_define_decimal_float_constants for each type. * c-lex.c (interpret_float): Decode decimal float types from CPP_N flags. Use real_from_string3, which can handle binary or decimal floats. * c-tree.h (enum c_typespec_keyword): Add cts_dfloat32, cts_dfloat64, cts_dfloat128. * tree.c (build_common_tree_nodes_2): Add decimal float types. * tree.h (enum tree_index): Add new enumeration values TI_DFLOAT32_TYPE, TI_DFLOAT64_TYPE, TI_DFLOAT128_TYPE, TI_DFLOAT32_PTR_TYPE, TI_DFLOAT64_PTR_TYPE, TI_DFLOAT128_PTR_TYPE. (dfloat32_type_node): New macro. (dfloat64_type_node, dfloat128_type_node): Likewise. (dfloat32_ptr_type_node, dfloat64_ptr_type_node): Likewise. (dfloat128_ptr_type_node): Likewise. * c-pretty-print.c (pp_c_floating_constant): Append 32, 64 and 128 bit decimal floating point types with "df", "dd" and "dl". * c-format.h (enum format_lengths): Add new enumeration values FMT_LEN_H, FMT_LEN_D and FMT_LEN_DD. * c-format.c (printf_length_specs, scanf_length_specs): Add entries for H, D, DD. (print_char_table, scan_char_table): Use new entries. (asm_fprintf_char_table, gcc_diag_char_table, gcc_cdiag_char_table, gcc_cxxdiag_char_table): Adjust for longer length arrays. * defaults.h (DECIMAL32_TYPE_SIZE): Define. (DECIMAL64_TYPE_SIZE): Likewise. (DECIMAL128_TYPE_SIZE): Likewise. (TARGET_DEC_EVAL_METHOD): Likewise. * doc/extend.texi (Decimal Float): New node. (Constructing Calls): Document decimal float built-ins. * doc/tm.texi: Document TARGET_DECIMAL_FLOAT_SUPPORTED_P hook. * Makefile.in (USER_H): Add $(srcdir)/ginclude/decfloat.h. * ginclude/decfloat.h: New file. Co-Authored-By: Ben Elliston <bje@au.ibm.com> Co-Authored-By: Janis Johnson <janis187@us.ibm.com> From-SVN: r108629
2005-12-16 07:38:26 +01:00
return false;
default:
targhooks.c (default_unwind_emit, [...]): Use gcc_assert, gcc_unreachable & internal_error instead of abort. * targhooks.c (default_unwind_emit, default_scalar_mode_supported_p): Use gcc_assert, gcc_unreachable & internal_error instead of abort. * timevar.c (timevar_push, timevar_pop, timevar_start, timevar_stop): Likewise. * toplev.c (default_pch_valid_p): Likewise. * tracer.c (tail_duplicate): Likewise. * tree-alias-common.c (get_alias_var_decl, get_values_from_constructor, create_alias_var, delete_alias_vars, empty_points_to_set, same_points_to_set, ptr_may_alias_var): Likewise. * tree.c (tree_size, make_node_stat, copy_node_stat, build_int_cst_wide, integer_all_onesp, list_length, chainon, tree_node_structure, type_contains_placeholder_p, substitute_in_expr, substitute_placeholder_in_expr, tabilize_reference_1, build0_stat, build1_stat, build2_stat, build3_stat, build4_stat, is_attribute_p, lookup_attribute, type_hash_canon, host_integerp, iterative_hash_expr, build_method_type_directly, decl_type_context, get_callee_fndecl, get_set_constructor_bits, build_vector_type_for_mode, int_cst_value, tree_fold_gcd): Likewise. * tree-cfg.c (create_bb, make_ctrl_stmt_edges, make_exit_edges, make_cond_expr_edges, group_case_labels, tree_merge_blocks, cleanup_control_expr_graph, find_taken_edge, find_taken_edge_switch_expr, phi_alternatives_equal, is_ctrl_altering_stmt, disband_implicit_edges, set_bb_for_stmt, stmt_for_bsi, tree_find_edge_insert_loc, bsi_insert_on_edge_immediate, tree_split_edge, tree_verify_flow_info, thread_jumps, tree_redirect_edge_and_branch, tree_flow_call_edges_add): Likewise. * tree-chrec.c (chrec_fold_poly_cst, chrec_fold_plus_poly_poly, chrec_fold_multiply_poly_poly): Likewise. * tree-complex.c (extract_component, expand_complex_division, expand_complex_comparison, expand_complex_operations_1, build_replicated_const, expand_vector_operations_1): Likewise. * tree-data-ref.c (tree_fold_bezout, build_classic_dist_vector, build_classic_dir_vector): Likewise. * tree-dfa.c (compute_immediate_uses_for_phi, compute_immediate_uses_for_stmt, create_var_ann, create_stmt_ann, create_tree_ann, collect_dfa_stats, get_virtual_var): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-eh.c (record_stmt_eh_region, add_stmt_to_eh_region, record_in_finally_tree, replace_goto_queue_1, maybe_record_in_goto_queue, verify_norecord_switch_expr, do_return_redirection): Likewise. * tree-if-conv.c (tree_if_convert_stmt, tree_if_convert_cond_expr, add_to_dst_predicate_list, find_phi_replacement_condition, replace_phi_with_cond_modify_expr, get_loop_body_in_if_conv_order): Likewise. * tree-inline.c (remap_decl, remap_type, remap_decls, copy_body_r, initialize_inlined_parameters, declare_return_variable, estimate_num_insns_1, expand_call_inline, expand_calls_inline, optimize_inline_calls, copy_tree_r): Likewise. * tree-into-ssa.c (rewrite_initialize_block_local_data, rewrite_stmt, ssa_rewrite_stmt, rewrite_into_ssa): Likewise. * tree-iterator.c (alloc_stmt_list, tsi_link_before, tsi_link_after, tsi_split_statement_list_after, tsi_split_statement_list_before): Likewise. * tree-mudflap.c (mf_varname_tree): Likewise. * tree-nested.c (create_tmp_var_for, lookup_field_for_decl, lookup_tramp_for_decl, convert_all_function_calls): Likewise. * tree-optimize.c (tree_rest_of_compilation): Likewise. * tree-outof-ssa.c (create_temp, eliminate_build, eliminate_phi, coalesce_abnormal_edges, coalesce_ssa_name, eliminate_virtual_phis, free_temp_expr_table, add_dependance, finish_expr, rewrite_trees): Likewise. * tree-phinodes.c (resize_phi_node, add_phi_arg, remove_all_phi_nodes_for): Likewise. * tree-pretty-print.c (op_prio, print_call_name): Likewise. * tree-profile.c (tree_gen_interval_profiler, tree_gen_pow2_profiler, tree_gen_one_value_profiler, tree_gen_const_delta_profiler): Likewise. * tree-sra.c (type_can_instantiate_all_elements, sra_hash_tree, sra_elt_eq, sra_walk_expr, instantiate_missing_elements, generate_one_element_ref, generate_element_copy, generate_element_zero, scalarize_copy, scalarize_init, scalarize_ldst): Likewise. * tree-ssa-alias.c (delete_alias_info, group_aliases, may_alias_p, add_may_alias, add_pointed_to_expr, add_pointed_to_var, collect_points_to_info_r, get_tmt_for, get_ptr_info): Likewise. * tree-ssa.c (walk_use_def_chains, check_phi_redundancy): Likewise. * tree-ssa-ccp.c (dump_lattice_value, get_default_value, get_value, set_lattice_value, likely_value, ccp_visit_phi_node, visit_assignment, widen_bitfield, ccp_fold_builtin): Likewise. * tree-ssa-copy.c (may_propagate_copy, merge_alias_info, replace_exp_1, propagate_tree_value): Likewise. * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise. * tree-ssa-dce.c (set_control_dependence_map_bit, find_control_dependence, find_pdom, mark_operand_necessary, mark_stmt_if_obviously_necessary, mark_control_dependent_edges_necessary, remove_dead_stmt): Likewise. * tree-ssa-dom.c (dom_opt_initialize_block_local_data, simplify_switch_and_lookup_avail_expr, cprop_into_successor_phis, eliminate_redundant_computations, avail_expr_eq): Likewise. * tree-ssa-dse.c (fix_stmt_v_may_defs): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p, duplicate_blocks): Likewise. * tree-ssa-loop-im.c (for_each_index, set_level, is_call_clobbered_ref): Likewise. * tree-ssa-loop-ivopts.c (dump_use, divide, stmt_after_ip_normal_pos, stmt_after_increment, set_iv, contains_abnormal_ssa_name_p, find_interesting_uses_outer_or_nonlin, add_derived_ivs_candidates, peel_address, ptr_difference_cost, may_replace_final_value, determine_use_iv_cost, rewrite_use_nonlinear_expr, rewrite_use_outer, rewrite_use, rewrite_uses): Likewise. * tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa, check_loop_closed_ssa_use): Likewise. * tree-ssanames.c (make_ssa_name): Likewise. * tree-ssa-operands.c (finalize_ssa_defs, finalize_ssa_uses, finalize_ssa_v_must_defs, finalize_ssa_stmt_operands, get_stmt_operands, get_expr_operands, get_asm_expr_operands, get_indirect_ref_operands, add_stmt_operand): Likewise. * tree-ssa-pre.c (value_exists_in_set_bitmap, value_remove_from_set_bitmap, bitmap_insert_into_set, insert_into_set, phi_translate, valid_in_set, compute_antic, find_or_generate_expression, create_expression_by_pieces, insert_aux, create_value_expr_from, eliminate): Likewise. * tree-ssa-propagate.c (cfg_blocks_get): Likewise. * tree-ssa-threadupdate.c (remove_last_stmt_and_useless_edges): Likewise. * tree-tailcall.c (independent_of_stmt_p, adjust_return_value, eliminate_tail_call): Likewise. * tree-vectorizer.c (vect_create_index_for_array_ref, vect_align_data_ref, vect_create_data_ref, vect_create_destination_var, vect_get_vec_def_for_operand, vect_finish_stmt_generation, vect_transform_stmt, vect_transform_loop_bound, vect_transform_loop, vect_analyze_operations): Likewise. * tree-vn.c (vn_compute, set_value_handle, get_value_handle): Likewise. * tree-flow-inline.h (var_ann, get_var_ann, get_def_from_ptr, get_use_op_ptr, immediate_use, phi_ssa_name_p, bsi_start, bsi_after_labels, bsi_last): Likewise. * tree-ssa-live.c (var_union, change_partition_var, create_ssa_var_map, calculate_live_on_entry, root_var_init, type_var_init, add_coalesce, sort_coalesce_list, pop_best_coalesce): Likewise. * tree-ssa-live.h (partition_is_global, live_entry_blocks, tpa_find_tree): Likewise. (register_ssa_partition_check): Declare. (register_ssa_partition): use it. * tree-ssa-live.c: Include errors.h. (register_ssa_partition_check): New. * tree-ssa-operands.c: Include errors.h. * Makefile.in (tree-ssa-operands.o): Depend on errors.h. Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com> From-SVN: r87223
2004-09-09 09:54:12 +02:00
gcc_unreachable ();
}
}
function.c (reference_callee_copied): New. * function.c (reference_callee_copied): New. (assign_parm_setup_reg): Use it. * calls.c (initialize_argument_information): Likewise. (emit_library_call_value_1): Likewise. * function.h (reference_callee_copied): Declare. * target.h (struct gcc_target): Add callee_copies. * target-def.h (TARGET_CALLEE_COPIES): New. (TARGET_PASS_BY_REFERENCE): Update default. * expr.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * targhooks.c (hook_callee_copies_named): New. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Rename from hook_pass_by_reference_false. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): New. * targhooks.h: Update decls. * config/arc/arc.c (TARGET_CALLEE_COPIES): New. * config/arc/arc.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/frv/frv-protos.h (frv_function_arg_callee_copies): Remove. * config/frv/frv.c (frv_function_arg_callee_copies): Remove. * config/frv/frv.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/iq2000/iq2000.c (TARGET_CALLEE_COPIES): New. * config/iq2000/iq2000.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/m68hc11/m68hc11.c (TARGET_CALLEE_COPIES): New. * config/m68hc11/m68hc11.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mips/mips.c (TARGET_CALLEE_COPIES): New. (mips_callee_copies): New. * config/mips/mips.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mmix/mmix.c (TARGET_CALLEE_COPIES): New. * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mn10300/mn10300.c (TARGET_CALLEE_COPIES): New. * config/mn10300/mn10300.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/pa/pa.c (TARGET_CALLEE_COPIES): New. * config/pa/pa.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/sh/sh.c (sh_callee_copies): New. (TARGET_CALLEE_COPIES): New. * config/sh/sh.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/v850/v850.c (TARGET_CALLEE_COPIES): New. * config/v850/v850.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * doc/tm.texi (TARGET_CALLEE_COPIES): Replace documentation for FUNCTION_ARG_CALLEE_COPIES. * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Update. From-SVN: r87195
2004-09-08 20:45:21 +02:00
Remove LIBGCC2_HAS_?F_MODE target macros. This patch removes the LIBGCC2_HAS_{SF,DF,XF,TF}_MODE target macros, replacing them by predefines with -fbuilding-libgcc, together with a target hook that can influence those predefines when needed. The new default is that a floating-point mode is supported in libgcc if (a) it passes the scalar_mode_supported_p hook (otherwise it's not plausible for it to be supported in libgcc) and (b) it's one of those four modes (since those are the modes for which libgcc hardcodes the possibility of support). The target hook can override the default choice (in either direction) for modes that pass scalar_mode_supported_p (although overriding in the direction of returning true when the default would return false only makes sense if all relevant functions are specially defined in libgcc for that particular target). The previous default settings depended on various settings such as LIBGCC2_LONG_DOUBLE_TYPE_SIZE, as well as targets defining the above target macros if the default wasn't correct. The default scalar_mode_supported_p only declares a floating-point mode to be supported if it matches one of float / double / long double. This means that in most cases where a mode is only supported conditionally in libgcc (TFmode only supported if it's the mode of long double, most commonly), the default gets things right. Overrides were needed in the following cases: * SFmode would always have been supported in libgcc (the condition was BITS_PER_UNIT == 8, true for all current targets), but pdp11 defaults to 64-bit float, and in that case SFmode would fail scalar_mode_supported_p. I don't know if libgcc actually built for pdp11 (and the port may well no longer be being used), but this patch adds a scalar_mode_supported_p hook to it to ensure SFmode is treated as supported. * Certain i386 and ia64 targets need the new hook to match the existing cases for when XFmode or TFmode support is present in libgcc. For i386, the hook can always declare XFmode to be supported - the cases where it's not are the cases where long double is TFmode, in which case XFmode fails scalar_mode_supported_p[*] - but TFmode support needs to be conditional. (And of the targets not defining LIBGCC2_HAS_TF_MODE before this patch, some defined LONG_DOUBLE_TYPE_SIZE to 64, so ensuring LIBGCC2_HAS_TF_MODE would always be false, while others did not define it, so allowing it to be true in the -mlong-double-128 case. This patch matches that logic, although I suspect all the latter targets would have been broken if you tried to enable -mlong-double-128 by default, for lack of the soft-fp TFmode support in libgcc, which is separately configured.) [*] I don't know if it's deliberate not to support __float80 at all with -mlong-double-128. In order to implement the default version of the new hook, insn-modes.h was made to contain macros such as HAVE_TFmode for each machine mode, so the default hook can contain conditionals on whether XFmode and TFmode exist (to match the hardcoding of a list of modes in libgcc). This is also used in fortran/trans-types.c; previously it had a conditional on defined(LIBGCC2_HAS_TF_MODE) (a bit dubious, since it ignored the value of the macro), which is replaced by testing defined(HAVE_TFmode), in conjunction with requiring targetm.libgcc_floating_mode_supported_p. (Fortran is testing something stronger than that hook: not only is libgcc support required, but also libm or equivalent. Thus, it has a test for ENABLE_LIBQUADMATH_SUPPORT in the case that the mode is TFmode and that's not the same as any of the three standard types. The old and new tests are intended to accept exactly the same set of modes for all targets.) Apart from the four target macros eliminated by this patch, it gets us closer to eliminating LIBGCC2_LONG_DOUBLE_TYPE_SIZE as well, though a few more places using that macro need changing first. Bootstrapped with no regressions on x86_64-unknown-linux-gnu; also built cc1 for crosses to ia64-elf and pdp11-none as a minimal test of changes for those targets. gcc: * target.def (libgcc_floating_mode_supported_p): New hook. * targhooks.c (default_libgcc_floating_mode_supported_p): New function. * targhooks.h (default_libgcc_floating_mode_supported_p): Declare. * doc/tm.texi.in (LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_XF_MODE) (LIBGCC2_HAS_TF_MODE): Remove. (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): New @hook. * doc/tm.texi: Regenerate. * genmodes.c (emit_insn_modes_h): Define HAVE_%smode for each machine mode. * system.h (LIBGCC2_HAS_SF_MODE, LIBGCC2_HAS_DF_MODE) (LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE): Poison. * config/i386/cygming.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/darwin.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/djgpp.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/dragonfly.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/freebsd.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/gnu-user-common.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/i386-interix.h (IX86_NO_LIBGCC_TFMODE): Define. * config/i386/i386.c (ix86_libgcc_floating_mode_supported_p): New function. (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define. * config/i386/i386elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/lynx.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/netbsd-elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/netbsd64.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/nto.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/openbsd.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/rtemself.h (IX86_NO_LIBGCC_TFMODE): Define. * config/i386/sol2.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/vx-common.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/ia64/elf.h (IA64_NO_LIBGCC_TFMODE): Define. * config/ia64/freebsd.h (IA64_NO_LIBGCC_TFMODE): Define. * config/ia64/hpux.h (LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE): Remove. * config/ia64/ia64.c (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): New macro. (ia64_libgcc_floating_mode_supported_p): New function. * config/ia64/linux.h (LIBGCC2_HAS_TF_MODE): Remove. * config/ia64/vms.h (IA64_NO_LIBGCC_XFMODE) (IA64_NO_LIBGCC_TFMODE): Define. * config/msp430/msp430.h (LIBGCC2_HAS_DF_MODE): Remove. * config/pdp11/pdp11.c (TARGET_SCALAR_MODE_SUPPORTED_P): New macro. (pdp11_scalar_mode_supported_p): New function. * config/rl78/rl78.h (LIBGCC2_HAS_DF_MODE): Remove. * config/rx/rx.h (LIBGCC2_HAS_DF_MODE): Remove. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__ macros for floating-point modes. gcc/fortran: * trans-types.c (gfc_init_kinds): Check targetm.libgcc_floating_mode_supported_p for floating-point modes. Check HAVE_TFmode instead of LIBGCC2_HAS_TF_MODE. libgcc: * libgcc2.h (LIBGCC2_HAS_SF_MODE): Define using __LIBGCC_HAS_SF_MODE__. (LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__. (LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__. (LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__. * config/libbid/bid_gcc_intrinsics.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define. (LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__. (LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__. * fixed-bit.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define. (LIBGCC2_HAS_SF_MODE): Define using __LIBGCC_HAS_SF_MODE__. (LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__. From-SVN: r215215
2014-09-12 14:05:18 +02:00
/* Return true if libgcc supports floating-point mode MODE (known to
be supported as a scalar mode). */
bool
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_libgcc_floating_mode_supported_p (machine_mode mode)
Remove LIBGCC2_HAS_?F_MODE target macros. This patch removes the LIBGCC2_HAS_{SF,DF,XF,TF}_MODE target macros, replacing them by predefines with -fbuilding-libgcc, together with a target hook that can influence those predefines when needed. The new default is that a floating-point mode is supported in libgcc if (a) it passes the scalar_mode_supported_p hook (otherwise it's not plausible for it to be supported in libgcc) and (b) it's one of those four modes (since those are the modes for which libgcc hardcodes the possibility of support). The target hook can override the default choice (in either direction) for modes that pass scalar_mode_supported_p (although overriding in the direction of returning true when the default would return false only makes sense if all relevant functions are specially defined in libgcc for that particular target). The previous default settings depended on various settings such as LIBGCC2_LONG_DOUBLE_TYPE_SIZE, as well as targets defining the above target macros if the default wasn't correct. The default scalar_mode_supported_p only declares a floating-point mode to be supported if it matches one of float / double / long double. This means that in most cases where a mode is only supported conditionally in libgcc (TFmode only supported if it's the mode of long double, most commonly), the default gets things right. Overrides were needed in the following cases: * SFmode would always have been supported in libgcc (the condition was BITS_PER_UNIT == 8, true for all current targets), but pdp11 defaults to 64-bit float, and in that case SFmode would fail scalar_mode_supported_p. I don't know if libgcc actually built for pdp11 (and the port may well no longer be being used), but this patch adds a scalar_mode_supported_p hook to it to ensure SFmode is treated as supported. * Certain i386 and ia64 targets need the new hook to match the existing cases for when XFmode or TFmode support is present in libgcc. For i386, the hook can always declare XFmode to be supported - the cases where it's not are the cases where long double is TFmode, in which case XFmode fails scalar_mode_supported_p[*] - but TFmode support needs to be conditional. (And of the targets not defining LIBGCC2_HAS_TF_MODE before this patch, some defined LONG_DOUBLE_TYPE_SIZE to 64, so ensuring LIBGCC2_HAS_TF_MODE would always be false, while others did not define it, so allowing it to be true in the -mlong-double-128 case. This patch matches that logic, although I suspect all the latter targets would have been broken if you tried to enable -mlong-double-128 by default, for lack of the soft-fp TFmode support in libgcc, which is separately configured.) [*] I don't know if it's deliberate not to support __float80 at all with -mlong-double-128. In order to implement the default version of the new hook, insn-modes.h was made to contain macros such as HAVE_TFmode for each machine mode, so the default hook can contain conditionals on whether XFmode and TFmode exist (to match the hardcoding of a list of modes in libgcc). This is also used in fortran/trans-types.c; previously it had a conditional on defined(LIBGCC2_HAS_TF_MODE) (a bit dubious, since it ignored the value of the macro), which is replaced by testing defined(HAVE_TFmode), in conjunction with requiring targetm.libgcc_floating_mode_supported_p. (Fortran is testing something stronger than that hook: not only is libgcc support required, but also libm or equivalent. Thus, it has a test for ENABLE_LIBQUADMATH_SUPPORT in the case that the mode is TFmode and that's not the same as any of the three standard types. The old and new tests are intended to accept exactly the same set of modes for all targets.) Apart from the four target macros eliminated by this patch, it gets us closer to eliminating LIBGCC2_LONG_DOUBLE_TYPE_SIZE as well, though a few more places using that macro need changing first. Bootstrapped with no regressions on x86_64-unknown-linux-gnu; also built cc1 for crosses to ia64-elf and pdp11-none as a minimal test of changes for those targets. gcc: * target.def (libgcc_floating_mode_supported_p): New hook. * targhooks.c (default_libgcc_floating_mode_supported_p): New function. * targhooks.h (default_libgcc_floating_mode_supported_p): Declare. * doc/tm.texi.in (LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_XF_MODE) (LIBGCC2_HAS_TF_MODE): Remove. (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): New @hook. * doc/tm.texi: Regenerate. * genmodes.c (emit_insn_modes_h): Define HAVE_%smode for each machine mode. * system.h (LIBGCC2_HAS_SF_MODE, LIBGCC2_HAS_DF_MODE) (LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE): Poison. * config/i386/cygming.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/darwin.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/djgpp.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/dragonfly.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/freebsd.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/gnu-user-common.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/i386-interix.h (IX86_NO_LIBGCC_TFMODE): Define. * config/i386/i386.c (ix86_libgcc_floating_mode_supported_p): New function. (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define. * config/i386/i386elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/lynx.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/netbsd-elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/netbsd64.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/nto.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/openbsd.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/rtemself.h (IX86_NO_LIBGCC_TFMODE): Define. * config/i386/sol2.h (LIBGCC2_HAS_TF_MODE): Remove. * config/i386/vx-common.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define. * config/ia64/elf.h (IA64_NO_LIBGCC_TFMODE): Define. * config/ia64/freebsd.h (IA64_NO_LIBGCC_TFMODE): Define. * config/ia64/hpux.h (LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE): Remove. * config/ia64/ia64.c (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): New macro. (ia64_libgcc_floating_mode_supported_p): New function. * config/ia64/linux.h (LIBGCC2_HAS_TF_MODE): Remove. * config/ia64/vms.h (IA64_NO_LIBGCC_XFMODE) (IA64_NO_LIBGCC_TFMODE): Define. * config/msp430/msp430.h (LIBGCC2_HAS_DF_MODE): Remove. * config/pdp11/pdp11.c (TARGET_SCALAR_MODE_SUPPORTED_P): New macro. (pdp11_scalar_mode_supported_p): New function. * config/rl78/rl78.h (LIBGCC2_HAS_DF_MODE): Remove. * config/rx/rx.h (LIBGCC2_HAS_DF_MODE): Remove. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__ macros for floating-point modes. gcc/fortran: * trans-types.c (gfc_init_kinds): Check targetm.libgcc_floating_mode_supported_p for floating-point modes. Check HAVE_TFmode instead of LIBGCC2_HAS_TF_MODE. libgcc: * libgcc2.h (LIBGCC2_HAS_SF_MODE): Define using __LIBGCC_HAS_SF_MODE__. (LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__. (LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__. (LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__. * config/libbid/bid_gcc_intrinsics.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define. (LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__. (LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__. * fixed-bit.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define. (LIBGCC2_HAS_SF_MODE): Define using __LIBGCC_HAS_SF_MODE__. (LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__. From-SVN: r215215
2014-09-12 14:05:18 +02:00
{
switch (mode)
{
#ifdef HAVE_SFmode
case SFmode:
#endif
#ifdef HAVE_DFmode
case DFmode:
#endif
#ifdef HAVE_XFmode
case XFmode:
#endif
#ifdef HAVE_TFmode
case TFmode:
#endif
return true;
default:
return false;
}
}
/* Make some target macros useable by target-independent code. */
bool
targhook_words_big_endian (void)
{
return !!WORDS_BIG_ENDIAN;
}
bool
targhook_float_words_big_endian (void)
{
return !!FLOAT_WORDS_BIG_ENDIAN;
}
/* True if the target supports floating-point exceptions and rounding
modes. */
bool
default_float_exceptions_rounding_supported_p (void)
{
#ifdef HAVE_adddf3
return HAVE_adddf3;
#else
return false;
#endif
}
/* True if the target supports decimal floating point. */
bool
default_decimal_float_supported_p (void)
{
return ENABLE_DECIMAL_FLOAT;
}
c-common.h (enum rid): Add new enumeration values of RID_SAT, RID_FRACT, and RID_ACCUM. * c-common.h (enum rid): Add new enumeration values of RID_SAT, RID_FRACT, and RID_ACCUM. RID_SAT needs to be inserted before RID_ONEWAY, so that it can be checked in declspecs_add_type. (c_common_fixed_point_type_for_size): Declare. * c-parser.c (reswords): Add _Fract, _Accum, and _Sat. (c_token_starts_typename): Handle RID_FRACT, RID_ACCUM, and RID_SAT. (c_token_starts_declspecs): Likewise. (c_parser_declspecs): Likewise. (c_parser_attributes): Likewise. * c-tree.h (enum c_typespec_keyword): Add cts_fract and cts_accum. (c_declspecs): Add saturating_p. * c-decl.c (build_null_declspecs): Initialize saturating_p. (declspecs_add_type): Avoid using complex with _Fract, _Accum, or _Sat. Handle RID_SAT. Avoid using void, bool, char, int, float, double, _Decimal32, _Decimal64, _Decimal128, and complex with _Sat. Handle RID_FRACT and RID_ACCUM. Make sure _Sat is used with _Fract or _Accum. (finish_declspecs): Handle cts_fract and cts_accum. * c-common.c (fixed-value.h): New include. (constant_expression_warning): Handle FIXED_CST. (overflow_warning): Likewise. (warnings_for_convert_and_check): Likewise. (c_common_fixed_point_type_for_size): New. (c_common_type_for_mode): Handle fixed-point modes to return various saturating/non-saturating, signed/unsigned types. (c_common_signed_or_unsigned_type): Support fixed-point types. (shorten_compare): Check fixed-point zero. Handle FIXED_POINT_TYPE. (c_common_truthvalue_conversion): Handle FIXED_CST. Handle FIXED_POINT_TYPE. (c_common_nodes_and_builtins): Record builtin types for fixed-point types. (handle_mode_attribute): Handle fixed-point modes. Need to check if the signness of base type and fixed-point modes are consistent. (handle_vector_size_attribute): Handle fixed-point modes. (same_scalar_type_ignoring_signedness): Handle FIXED_POINT_TYPE. (warn_for_div_by_zero): Check fixed-point zero. * c-typeck.c (c_common_type): Check FIXED_POINT_TYPE. Build a common fixed-point type based on fbit, ibit, sign, and saturation. (build_unary_op): Allow FIXED_POINT_TYPE for CONVERT_EXPR, NEGATE_EXPR, TRUTH_NOT_EXPR, PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR, and POSTDECREMENT_EXPR. (convert_for_assignment): Support FIXED_POINT_TYPE. (digest_init): Handle FIXED_POINT_TYPE. (build_binary_op): Support FIXED_POINT_TYPE in *_DIV_EXPR, TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR, TRUTH_XOR_EXPR, RSHIFT_EXPR, LSHIFT_EXPR, EQ_EXPR, NE_EXPR, LE_EXPR, GE_EXPR, LT_EXPR, GT_EXPR. * target-def.h (TARGET_FIXED_POINT_SUPPORTED_P): New. (TARGET_INITIALIZER): Add TARGET_FIXED_POINT_SUPPORTED_P. * target.h (gcc_target): Add fixed_point_supported_p. * targhooks.c (default_scalar_mode_supported_p): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, and MODE_UACCUM. (default_fixed_point_supported_p): Define. * targhooks.h (default_fixed_point_supported_p): Declare. * doc/tm.texi (TARGET_FIXED_POINT_SUPPORTED_P): Add. * doc/install.texi (Configuration): Add --enable-fixed-point. * configure.ac (--enable-fixed-point): New to enable fixed-point arithmetic extension to C. For mips targets, we enable it by default. * configure, config.in: Regenerate. From-SVN: r127652
2007-08-21 00:26:47 +02:00
/* True if the target supports fixed-point arithmetic. */
bool
default_fixed_point_supported_p (void)
{
return ENABLE_FIXED_POINT;
}
/* True if the target supports GNU indirect functions. */
bool
default_has_ifunc_p (void)
{
return HAVE_GNU_INDIRECT_FUNCTION;
}
/* NULL if INSN insn is valid within a low-overhead loop, otherwise returns
an error message.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
This function checks whether a given INSN is valid within a low-overhead
loop. If INSN is invalid it returns the reason for that, otherwise it
returns NULL. A called function may clobber any special registers required
for low-overhead looping. Additionally, some targets (eg, PPC) use the count
register for branch on table instructions. We reject the doloop pattern in
these cases. */
const char *
Use rtx_insn for various target.def hooks gcc/ 2014-08-27 David Malcolm <dmalcolm@redhat.com> * target.def (unwind_emit): Strengthen param "insn" from rtx to rtx_insn *. (final_postscan_insn): Likewise. (adjust_cost): Likewise. (adjust_priority): Likewise. (variable_issue): Likewise. (macro_fusion_pair_p): Likewise. (dfa_post_cycle_insn): Likewise. (first_cycle_multipass_dfa_lookahead_guard): Likewise. (first_cycle_multipass_issue): Likewise. (dfa_new_cycle): Likewise. (adjust_cost_2): Likewise for params "insn" and "dep_insn". (speculate_insn): Likewise for param "insn". (gen_spec_check): Likewise for params "insn" and "label". (get_insn_spec_ds): Likewise for param "insn". (get_insn_checked_ds): Likewise. (dispatch_do): Likewise. (dispatch): Likewise. (cannot_copy_insn_p): Likewise. (invalid_within_doloop): Likewise. (legitimate_combined_insn): Likewise. (needed): Likewise. (after): Likewise. * doc/tm.texi: Automatically updated to reflect changes to target.def. * haifa-sched.c (choose_ready): Convert NULL_RTX to NULL when working with insn. (schedule_block): Likewise. (sched_init): Likewise. (sched_speculate_insn): Strengthen param "insn" from rtx to rtx_insn *. (ready_remove_first_dispatch): Convert NULL_RTX to NULL when working with insn. * hooks.c (hook_bool_rtx_true): Rename to... hook_bool_rtx_insn_true): ...this, and strengthen first param from rtx to rtx_insn *. (hook_constcharptr_const_rtx_null): Rename to... (hook_constcharptr_const_rtx_insn_null): ...this, and strengthen first param from const_rtx to const rtx_insn *. (hook_bool_rtx_int_false): Rename to... (hook_bool_rtx_insn_int_false): ...this, and strengthen first param from rtx to rtx_insn *. (hook_void_rtx_int): Rename to... (hook_void_rtx_insn_int): ...this, and strengthen first param from rtx to rtx_insn *. * hooks.h (hook_bool_rtx_true): Rename to... (hook_bool_rtx_insn_true): ...this, and strengthen first param from rtx to rtx_insn *. (hook_bool_rtx_int_false): Rename to... (hook_bool_rtx_insn_int_false): ...this, and strengthen first param from rtx to rtx_insn *. (hook_void_rtx_int): Rename to... (hook_void_rtx_insn_int): ...this, and strengthen first param from rtx to rtx_insn *. (hook_constcharptr_const_rtx_null): Rename to... (hook_constcharptr_const_rtx_insn_null): ...this, and strengthen first param from const_rtx to const rtx_insn *. * sched-deps.c (sched_macro_fuse_insns): Strengthen param "insn" and local "prev" from rtx to rtx_insn *. * sched-int.h (sched_speculate_insn): Strengthen first param from rtx to rtx_insn *. * sel-sched.c (create_speculation_check): Likewise for local "label". * targhooks.c (default_invalid_within_doloop): Strengthen param "insn" from const_rtx to const rtx_insn *. * targhooks.h (default_invalid_within_doloop): Strengthen param from const_rtx to const rtx_insn *. * config/alpha/alpha.c (alpha_cannot_copy_insn_p): Likewise. (alpha_adjust_cost): Likewise for params "insn", "dep_insn". * config/arc/arc.c (arc_sched_adjust_priority): Likewise for param "insn". (arc_invalid_within_doloop): Likewise, with const. * config/arm/arm.c (arm_adjust_cost): Likewise for params "insn", "dep". (arm_cannot_copy_insn_p): Likewise for param "insn". (arm_unwind_emit): Likewise. * config/bfin/bfin.c (bfin_adjust_cost): Likewise for params "insn", "dep_insn". * config/c6x/c6x.c (c6x_dfa_new_cycle): Likewise for param "insn". (c6x_variable_issue): Likewise. Removed now-redundant checked cast. (c6x_adjust_cost): Likewise for params "insn", "dep_insn". * config/epiphany/epiphany-protos.h (epiphany_mode_needed): Likewise for param "insn". (epiphany_mode_after): Likewise. * config/epiphany/epiphany.c (epiphany_adjust_cost): Likewise for params "insn", "dep_insn". (epiphany_mode_needed): Likewise for param "insn". (epiphany_mode_after): Likewise. * config/i386/i386-protos.h (i386_pe_seh_unwind_emit): Likewise. * config/i386/i386.c (ix86_legitimate_combined_insn): Likewise. (ix86_avx_u128_mode_needed): Likewise. (ix86_i387_mode_needed): Likewise. (ix86_mode_needed): Likewise. (ix86_avx_u128_mode_after): Likewise. (ix86_mode_after): Likewise. (ix86_adjust_cost): Likewise for params "insn", "dep_insn". (ix86_macro_fusion_pair_p): Likewise for params "condgen", "condjmp". (ix86_adjust_priority): Likewise for param "insn". (core2i7_first_cycle_multipass_issue): Likewise for param "insn". (do_dispatch): Likewise. (has_dispatch): Likewise. * config/i386/winnt.c (i386_pe_seh_unwind_emit): Likewise. * config/ia64/ia64.c (TARGET_INVALID_WITHIN_DOLOOP): Update to reflect renaming of default hook implementation from hook_constcharptr_const_rtx_null to hook_constcharptr_const_rtx_insn_null. (ia64_adjust_cost_2): Strengthen params "insn", "dep_insn" from rtx to rtx_insn *. (ia64_variable_issue): Likewise for param "insn". (ia64_first_cycle_multipass_dfa_lookahead_guard): Likewise. (ia64_dfa_new_cycle): Likewise. (ia64_get_insn_spec_ds): Likewise. (ia64_get_insn_checked_ds): Likewise. (ia64_speculate_insn): Likewise. (ia64_gen_spec_check): Likewise for params "insn", "label". (ia64_asm_unwind_emit): Likewise for param "insn". * config/m32r/m32r.c (m32r_adjust_priority): Likewise. * config/m68k/m68k.c (m68k_sched_adjust_cost): Likewise for params "insn", "def_insn". (m68k_sched_variable_issue): Likewise for param "insn". * config/mep/mep.c (mep_adjust_cost): Likewise for params "insn", "def_insn". * config/microblaze/microblaze.c (microblaze_adjust_cost): Likewise for params "insn", "dep". * config/mips/mips.c (mips_adjust_cost): Likewise. (mips_variable_issue): Likewise for param "insn". (mips_final_postscan_insn): Likewise. * config/mn10300/mn10300.c (mn10300_adjust_sched_cost): Likewise for params "insn", "dep". * config/pa/pa.c (pa_adjust_cost): Likewise for params "insn", "dep_insn". (pa_adjust_priority): Likewise for param "insn". * config/picochip/picochip.c (picochip_sched_adjust_cost): Likewise for params "insn", "dep_insn". * config/rs6000/rs6000.c (rs6000_variable_issue_1): Likewise for param "insn". (rs6000_variable_issue): Likewise. (rs6000_adjust_cost): Likewise for params "insn", "dep_insn". (rs6000_debug_adjust_cost): Likewise. (rs6000_adjust_priority): Likewise for param "insn". (rs6000_use_sched_lookahead_guard): Likewise. (get_next_active_insn): Likewise for return type and both params. (redefine_groups): Likewise for params "prev_head_insn", "tail" and locals "insn", "next_insn". (pad_groups): Likewise. * config/s390/s390.c (s390_adjust_priority): Likewise for param "insn". (s390_cannot_copy_insn_p): Likewise. (s390_sched_variable_issue): Likewise for third param, eliminating checked cast. (TARGET_INVALID_WITHIN_DOLOOP): Update to reflect renaming of default hook implementation from hook_constcharptr_const_rtx_null to hook_constcharptr_const_rtx_insn_null. * config/sh/sh.c (sh_cannot_copy_insn_p): Strengthen param "insn" from rtx to rtx_insn *. (sh_adjust_cost): Likewise for params "insn", "dep_insn". (sh_variable_issue): Likewise for param "insn". (sh_dfa_new_cycle): Likewise. (sh_mode_needed): Likewise. (sh_mode_after): Likewise. * config/sparc/sparc.c (supersparc_adjust_cost): Likewise for params "insn", "dep_insn". (hypersparc_adjust_cost): Likewise. (sparc_adjust_cost): Likewise. * config/spu/spu.c (spu_sched_variable_issue): Likewise for third param, eliminated checked cast. (spu_sched_adjust_cost): Likewise for first and third params. * config/tilegx/tilegx.c (tilegx_sched_adjust_cost): Strengthen params "insn" and "dep_insn" from rtx to rtx_insn *. * config/tilepro/tilepro.c (tilepro_sched_adjust_cost): Likewise. From-SVN: r214584
2014-08-27 21:34:13 +02:00
default_invalid_within_doloop (const rtx_insn *insn)
{
if (CALL_P (insn))
return "Function call in loop.";
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
cfgrtl.c (fixup_reorder_chain): Do not emit barriers to BB_FOOTER. * cfgrtl.c (fixup_reorder_chain): Do not emit barriers to BB_FOOTER. * postreload-gcse.c (bb_has_well_behaved_predecessors): Correct test for table jump at the end of a basic block using tablejump_p. * targhooks.c (default_invalid_within_doloop): Likewise. * config/rs6000/rs6000.c (TARGET_INVALID_WITHIN_DOLOOP): Remove target hook implementation that is identical to the default hook. (rs6000_invalid_within_doloop): Remove. * bb-reorder.c (fix_crossing_unconditional_branches): Remove set but unused variable from tablejump_p call. * rtl.def (JUMP_TABLE_DATA): New RTX_INSN object. * rtl.h (RTX_PREV, RTX_NEXT): Adjust for new JUMP_TABLE_DATA. (INSN_DELETED_P): Likewise. (emit_jump_table_data): New prototype. * gengtype.c (adjust_field_rtx_def): Handle JUMP_TABLE_DATA fields after 4th as unused. * print-rtl.c (print_rtl): Handle JUMP_TABLE_DATA. * sched-vis.c (print_insn): Likewise. * emit-rtl.c (active_insn_p): Consider JUMP_TABLE_DATA an active insn for compatibility with back ends that use next_active_insn to identify jump table data. (set_insn_deleted): Remove no longer useful JUMP_TABLE_DATA_P check. (remove_insn): Likewise. (emit_insn): Do not accept JUMP_TABLE_DATA objects in insn chains to be emitted. (emit_debug_insn, emit_jump_insn, emit_call_insn, emit_label): Idem. (emit_jump_table_data): New function. * cfgbuild.c (inside_basic_block_p): A JUMP_INSN is always inside a basic block, a JUMP_TABLE_DATA never is. (control_flow_insn_p): JUMP_TABLE_DATA is not a control flow insn. * cfgrtl.c (duplicate_insn_chain): Split handling of JUMP_TABLE_DATA off from code handling real insns. * final.c (get_attr_length_1): Simplify for JUMP_INSNs. * function.c (instantiate_virtual_regs): Remove JUMP_TABLE_DATA_P test, now redundant because JUMP_TABLE_DATA is not an INSN_P insn. * gcse.c (insert_insn_end_basic_block): Likewise, JUMP_TABLE_DATA_P is not a NONDEBUG_INSN_P. * ira-costs.c (scan_one_insn): Likewise. * jump.c (mark_all_labels): Likewise. (mark_jump_label_1): Likewise. * lra-eliminations.c (eliminate_regs_in_insn): Likewise. * lra.c (get_insn_freq): Expect all insns reaching here to be in a basic block. (check_rtl): Remove JUMP_TABLE_DATA_P test, not a NONDEBUG_INSN_P insn. * predict.c (expensive_function_p): Use FOR_BB_INSNS. * reload1.c (calculate_needs_all_insns): Call set_label_offsets for JUMP_TABLE_DATA_P insns. (calculate_elim_costs_all_insns): Likewise. (set_label_offsets): Recurse on the PATTERN of JUMP_TABLE_DATA insns. (elimination_costs_in_insn): Remove redundant JUMP_TABLE_DATA_P test. (delete_output_reload): Code style fixups. * reorg.c (dbr_schedule): Move JUMP_TABLE_DATA_P up to avoid setting insn flags on this non-insn. * sched-rgn.c (add_branch_dependences): Treat JUMP_TABLE_DATA insns as scheduling barriers, for pre-change compatibility. * stmt.c (emit_case_dispatch_table): Emit jump table data not as JUMP_INSN objects but instead as JUMP_TABLE_DATA objects. * config/alpha/alpha.c (alpha_does_function_need_gp): Remove redundant JUMP_TABLE_DATA_P test. * config/arm/arm.c (thumb_far_jump_used_p): Likewise. * config/frv/frv.c (frv_function_contains_far_jump): Likewise. (frv_for_each_packet): Likewise. * config/i386/i386.c (min_insn_size): Likewise. (ix86_avoid_jump_mispredicts): Likewise. * config/m32r/m32r.c (m32r_is_insn): Likewise. * config/mep/mep.c (mep_reorg_erepeat): Likewise. * config/mips/mips.c (USEFUL_INSN_P): Likewise. (mips16_insn_length): Robustify. (mips_has_long_branch_p): Remove redundant JUMP_TABLE_DATA_P test. (mips16_split_long_branches): Likewise. * config/pa/pa.c (pa_combine_instructions): Likewise. * config/rs6000/rs6000.c (get_next_active_insn): Treat JUMP_TABLE_DATA objects as active insns, like in active_insn_p. * config/s390/s390.c (s390_chunkify_start): Treat JUMP_TABLE_DATA as contributing to pool range lengths. * config/sh/sh.c (find_barrier): Restore check for ADDR_DIFF_VEC. Remove redundant JUMP_TABLE_DATA_P test. (sh_loop_align): Likewise. (split_branches): Likewise. (sh_insn_length_adjustment): Likewise. * config/spu/spu.c (get_branch_target): Likewise. From-SVN: r197266
2013-03-30 15:26:42 +01:00
if (tablejump_p (insn, NULL, NULL) || computed_jump_p (insn))
return "Computed branch in the loop.";
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
return NULL;
}
/* Mapping of builtin functions to vectorized variants. */
tree
Make builtin_vectorized_function take a combined_fn This patch replaces the fndecl argument to builtin_vectorized_function with a combined_fn and gets the vectoriser to call it for internal functions too. The patch also moves vectorisation of machine-specific built-ins to a new hook, builtin_md_vectorized_function. Tested on x86_64-linux-gnu, aarch64-linux-gnu, arm-linux-gnu and powerpc64-linux-gnu. gcc/ * target.def (builtin_vectorized_function): Take a combined_fn (in the form of an unsigned int) rather than a function decl. (builtin_md_vectorized_function): New. * targhooks.h (default_builtin_vectorized_function): Replace the fndecl argument with an unsigned int. (default_builtin_md_vectorized_function): Declare. * targhooks.c (default_builtin_vectorized_function): Replace the fndecl argument with an unsigned int. (default_builtin_md_vectorized_function): New function. * doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_MD_VECTORIZED_FUNCTION): New hook. * doc/tm.texi: Regenerate. * tree-vect-stmts.c (vectorizable_function): Update call to builtin_vectorized_function, also passing internal functions. Call builtin_md_vectorized_function for target-specific builtins. * config/aarch64/aarch64-protos.h (aarch64_builtin_vectorized_function): Replace fndecl argument with an unsigned int. * config/aarch64/aarch64-builtins.c: Include case-cfn-macros.h. (aarch64_builtin_vectorized_function): Update after above changes. Use CASE_CFN_*. * config/arm/arm-protos.h (arm_builtin_vectorized_function): Replace fndecl argument with an unsigned int. * config/arm/arm-builtins.c: Include case-cfn-macros.h (arm_builtin_vectorized_function): Update after above changes. Use CASE_CFN_*. * config/i386/i386.c: Include case-cfn-macros.h (ix86_veclib_handler): Take a combined_fn rather than a built_in_function. (ix86_veclibabi_svml, ix86_veclibabi_acml): Likewise. Use mathfn_built_in rather than calling builtin_decl_implicit directly. (ix86_builtin_vectorized_function) Update after above changes. Use CASE_CFN_*. * config/rs6000/rs6000.c: Include case-cfn-macros.h (rs6000_builtin_vectorized_libmass): Replace fndecl argument with a combined_fn. Use CASE_CFN_*. Use mathfn_built_in rather than calling builtin_decl_implicit directly. (rs6000_builtin_vectorized_function): Update after above changes. Use CASE_CFN_*. Move BUILT_IN_MD to... (rs6000_builtin_md_vectorized_function): ...this new function. (TARGET_VECTORIZE_BUILTIN_MD_VECTORIZED_FUNCTION): Define. From-SVN: r230491
2015-11-17 19:55:13 +01:00
default_builtin_vectorized_function (unsigned int, tree, tree)
{
return NULL_TREE;
}
/* Mapping of target builtin functions to vectorized variants. */
tree
default_builtin_md_vectorized_function (tree, tree, tree)
{
return NULL_TREE;
}
/* Vectorized conversion. */
tree
default_builtin_vectorized_conversion (unsigned int code ATTRIBUTE_UNUSED,
tree dest_type ATTRIBUTE_UNUSED,
tree src_type ATTRIBUTE_UNUSED)
{
return NULL_TREE;
}
/* Default vectorizer cost model values. */
int
tm.texi.in (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Document new arguments. * doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Document new arguments. * doc/tm.texi: Regenerate. * targhooks.c (default_builtin_vectorization_cost): Add new arguments. Handle unaligned store. * targhooks.h (default_builtin_vectorization_cost): Add new arguments. * target.def (builtin_vectorization_cost): Add new arguments. * target.h (enum vect_cost_for_stmt): Add unaligned_store. * tree-vect-loop-manip.c (vect_gen_niters_for_prolog_loop): Take number of iterations of prolog loop directly from LOOP_PEELING_FOR_ALIGNMENT. (vect_vfa_segment_size): Fix indentation. * tree-vectorizer.h (struct _vect_peel_info): New. (struct _vect_peel_extended_info): New. (struct _loop_vec_info): Add new field for peeling hash table and a macro for its access. (VECT_MAX_COST): Define. (vect_get_load_cost): Declare. (vect_get_store_cost, vect_get_known_peeling_cost, vect_get_single_scalar_iteraion_cost): Likewise. (vect_supportable_dr_alignment): Add new argument. * tree-vect-loop.c (new_loop_vec_info): Initialize peeling hash table field. (destroy_loop_vec_info): Free peeling hash table. (vect_analyze_loop_form): Update call to builtin_vectorization_cost. (vect_analyze_loop): Move vect_enhance_data_refs_alignment before vect_analyze_slp. Fix indentation. (vect_get_single_scalar_iteraion_cost): New function. (vect_get_known_peeling_cost): Likewise. (vect_estimate_min_profitable_iters): Rename byte_misalign to npeel. Call vect_get_single_scalar_iteraion_cost instead of cost_for_stmt per statement. Move outside cost calculation inside unknown peeling case. Call vect_get_known_peeling_cost for known amount of peeling. * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Add data reference to the print message of forced alignment. (vect_verify_datarefs_alignment): Update call to vect_supportable_dr_alignment. (vect_get_data_access_cost): New function. (vect_peeling_hash, vect_peeling_hash_eq, vect_peeling_hash_insert, vect_peeling_hash_get_most_frequent, vect_peeling_hash_get_lowest_cost, vect_peeling_hash_choose_best_peeling): Likewise. (vect_enhance_data_refs_alignment): Fix documentation. Use hash table to store all the accesses in the loop and find best possible access to align using peeling for known alignment case. For unknown alignment check if stores are preferred or if peeling is worthy. (vect_find_same_alignment_drs): Analyze pairs of loads too. (vect_supportable_dr_alignment): Add new argument and check aligned accesses according to it. * tree-vect-stmts.c (vect_get_stmt_cost): New function. (cost_for_stmt): Call vect_get_stmt_cost. (vect_model_simple_cost): Likewise. (vect_model_store_cost): Call vect_get_stmt_cost. Call vect_get_store_cost to calculate the cost of the statement. (vect_get_store_cost): New function. (vect_model_load_cost): Call vect_get_stmt_cost. Call vect_get_load_cost to calculate the cost of the statement. (vect_get_load_cost): New function. (vectorizable_store): Update call to vect_supportable_dr_alignment. (vectorizable_load): Likewise. * config/spu/spu.c (spu_builtin_vectorization_cost): Add new arguments. * config/i386/i386.c (ix86_builtin_vectorization_cost): Add new arguments. Handle unaligned store. * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): New. (rs6000_builtin_support_vector_misalignment): Return true for word and double word alignments for VSX. * tree-vect-slp.c (vect_build_slp_tree): Update calls to vect_supportable_dr_alignment and builtin_vectorization_cost. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r161797
2010-07-04 10:54:52 +02:00
default_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
tree vectype,
tm.texi.in (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Document new arguments. * doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Document new arguments. * doc/tm.texi: Regenerate. * targhooks.c (default_builtin_vectorization_cost): Add new arguments. Handle unaligned store. * targhooks.h (default_builtin_vectorization_cost): Add new arguments. * target.def (builtin_vectorization_cost): Add new arguments. * target.h (enum vect_cost_for_stmt): Add unaligned_store. * tree-vect-loop-manip.c (vect_gen_niters_for_prolog_loop): Take number of iterations of prolog loop directly from LOOP_PEELING_FOR_ALIGNMENT. (vect_vfa_segment_size): Fix indentation. * tree-vectorizer.h (struct _vect_peel_info): New. (struct _vect_peel_extended_info): New. (struct _loop_vec_info): Add new field for peeling hash table and a macro for its access. (VECT_MAX_COST): Define. (vect_get_load_cost): Declare. (vect_get_store_cost, vect_get_known_peeling_cost, vect_get_single_scalar_iteraion_cost): Likewise. (vect_supportable_dr_alignment): Add new argument. * tree-vect-loop.c (new_loop_vec_info): Initialize peeling hash table field. (destroy_loop_vec_info): Free peeling hash table. (vect_analyze_loop_form): Update call to builtin_vectorization_cost. (vect_analyze_loop): Move vect_enhance_data_refs_alignment before vect_analyze_slp. Fix indentation. (vect_get_single_scalar_iteraion_cost): New function. (vect_get_known_peeling_cost): Likewise. (vect_estimate_min_profitable_iters): Rename byte_misalign to npeel. Call vect_get_single_scalar_iteraion_cost instead of cost_for_stmt per statement. Move outside cost calculation inside unknown peeling case. Call vect_get_known_peeling_cost for known amount of peeling. * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Add data reference to the print message of forced alignment. (vect_verify_datarefs_alignment): Update call to vect_supportable_dr_alignment. (vect_get_data_access_cost): New function. (vect_peeling_hash, vect_peeling_hash_eq, vect_peeling_hash_insert, vect_peeling_hash_get_most_frequent, vect_peeling_hash_get_lowest_cost, vect_peeling_hash_choose_best_peeling): Likewise. (vect_enhance_data_refs_alignment): Fix documentation. Use hash table to store all the accesses in the loop and find best possible access to align using peeling for known alignment case. For unknown alignment check if stores are preferred or if peeling is worthy. (vect_find_same_alignment_drs): Analyze pairs of loads too. (vect_supportable_dr_alignment): Add new argument and check aligned accesses according to it. * tree-vect-stmts.c (vect_get_stmt_cost): New function. (cost_for_stmt): Call vect_get_stmt_cost. (vect_model_simple_cost): Likewise. (vect_model_store_cost): Call vect_get_stmt_cost. Call vect_get_store_cost to calculate the cost of the statement. (vect_get_store_cost): New function. (vect_model_load_cost): Call vect_get_stmt_cost. Call vect_get_load_cost to calculate the cost of the statement. (vect_get_load_cost): New function. (vectorizable_store): Update call to vect_supportable_dr_alignment. (vectorizable_load): Likewise. * config/spu/spu.c (spu_builtin_vectorization_cost): Add new arguments. * config/i386/i386.c (ix86_builtin_vectorization_cost): Add new arguments. Handle unaligned store. * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): New. (rs6000_builtin_support_vector_misalignment): Return true for word and double word alignments for VSX. * tree-vect-slp.c (vect_build_slp_tree): Update calls to vect_supportable_dr_alignment and builtin_vectorization_cost. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r161797
2010-07-04 10:54:52 +02:00
int misalign ATTRIBUTE_UNUSED)
{
unsigned elements;
switch (type_of_cost)
{
case scalar_stmt:
case scalar_load:
case scalar_store:
case vector_stmt:
case vector_load:
case vector_store:
case vec_to_scalar:
case scalar_to_vec:
case cond_branch_not_taken:
case vec_perm:
case vec_promote_demote:
return 1;
case unaligned_load:
tm.texi.in (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Document new arguments. * doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Document new arguments. * doc/tm.texi: Regenerate. * targhooks.c (default_builtin_vectorization_cost): Add new arguments. Handle unaligned store. * targhooks.h (default_builtin_vectorization_cost): Add new arguments. * target.def (builtin_vectorization_cost): Add new arguments. * target.h (enum vect_cost_for_stmt): Add unaligned_store. * tree-vect-loop-manip.c (vect_gen_niters_for_prolog_loop): Take number of iterations of prolog loop directly from LOOP_PEELING_FOR_ALIGNMENT. (vect_vfa_segment_size): Fix indentation. * tree-vectorizer.h (struct _vect_peel_info): New. (struct _vect_peel_extended_info): New. (struct _loop_vec_info): Add new field for peeling hash table and a macro for its access. (VECT_MAX_COST): Define. (vect_get_load_cost): Declare. (vect_get_store_cost, vect_get_known_peeling_cost, vect_get_single_scalar_iteraion_cost): Likewise. (vect_supportable_dr_alignment): Add new argument. * tree-vect-loop.c (new_loop_vec_info): Initialize peeling hash table field. (destroy_loop_vec_info): Free peeling hash table. (vect_analyze_loop_form): Update call to builtin_vectorization_cost. (vect_analyze_loop): Move vect_enhance_data_refs_alignment before vect_analyze_slp. Fix indentation. (vect_get_single_scalar_iteraion_cost): New function. (vect_get_known_peeling_cost): Likewise. (vect_estimate_min_profitable_iters): Rename byte_misalign to npeel. Call vect_get_single_scalar_iteraion_cost instead of cost_for_stmt per statement. Move outside cost calculation inside unknown peeling case. Call vect_get_known_peeling_cost for known amount of peeling. * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Add data reference to the print message of forced alignment. (vect_verify_datarefs_alignment): Update call to vect_supportable_dr_alignment. (vect_get_data_access_cost): New function. (vect_peeling_hash, vect_peeling_hash_eq, vect_peeling_hash_insert, vect_peeling_hash_get_most_frequent, vect_peeling_hash_get_lowest_cost, vect_peeling_hash_choose_best_peeling): Likewise. (vect_enhance_data_refs_alignment): Fix documentation. Use hash table to store all the accesses in the loop and find best possible access to align using peeling for known alignment case. For unknown alignment check if stores are preferred or if peeling is worthy. (vect_find_same_alignment_drs): Analyze pairs of loads too. (vect_supportable_dr_alignment): Add new argument and check aligned accesses according to it. * tree-vect-stmts.c (vect_get_stmt_cost): New function. (cost_for_stmt): Call vect_get_stmt_cost. (vect_model_simple_cost): Likewise. (vect_model_store_cost): Call vect_get_stmt_cost. Call vect_get_store_cost to calculate the cost of the statement. (vect_get_store_cost): New function. (vect_model_load_cost): Call vect_get_stmt_cost. Call vect_get_load_cost to calculate the cost of the statement. (vect_get_load_cost): New function. (vectorizable_store): Update call to vect_supportable_dr_alignment. (vectorizable_load): Likewise. * config/spu/spu.c (spu_builtin_vectorization_cost): Add new arguments. * config/i386/i386.c (ix86_builtin_vectorization_cost): Add new arguments. Handle unaligned store. * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): New. (rs6000_builtin_support_vector_misalignment): Return true for word and double word alignments for VSX. * tree-vect-slp.c (vect_build_slp_tree): Update calls to vect_supportable_dr_alignment and builtin_vectorization_cost. Co-Authored-By: Revital Eres <eres@il.ibm.com> From-SVN: r161797
2010-07-04 10:54:52 +02:00
case unaligned_store:
return 2;
case cond_branch_taken:
return 3;
case vec_construct:
elements = TYPE_VECTOR_SUBPARTS (vectype);
return elements / 2 + 1;
default:
gcc_unreachable ();
}
}
/* Reciprocal. */
tree
Add an rsqrt_optab and IFN_RSQRT internal function All current uses of builtin_reciprocal convert 1.0/sqrt into rsqrt. This patch adds an rsqrt optab and associated internal function for that instead. We can then pick up the vector forms of rsqrt automatically, fixing an AArch64 regression from my internal_fn patches. With that change, builtin_reciprocal only needs to handle target-specific built-in functions. I've restricted the hook to those since, if we need a reciprocal of another standard function later, I think there should be a strong preference for adding a new optab and internal function for it, rather than hiding the code in a backend. Three targets implement builtin_reciprocal: aarch64, i386 and rs6000. i386 and rs6000 already used the obvious rsqrt<mode>2 pattern names for the instructions, so they pick up the new code automatically. aarch64 needs a slight rename. mn10300 is unusual in that its native operation is rsqrt, and sqrt is approximated as 1.0/rsqrt. The port also uses rsqrt<mode>2 for the rsqrt pattern, so after the patch we now pick it up as a native operation. Two other ports define rsqrt patterns: sh and v850. AFAICT these patterns aren't currently used, but I think the patch does what the authors of the patterns would have expected. There's obviously some risk of fallout though. Tested on x86_64-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabihf (as a target without the hooks) and powerpc64-linux-gnu. gcc/ * internal-fn.def (RSQRT): New function. * optabs.def (rsqrt_optab): New optab. * doc/md.texi (rsqrtM2): Document. * target.def (builtin_reciprocal): Replace gcall argument with a function decl. Restrict hook to machine functions. * doc/tm.texi: Regenerate. * targhooks.h (default_builtin_reciprocal): Update prototype. * targhooks.c (default_builtin_reciprocal): Likewise. * tree-ssa-math-opts.c: Include internal-fn.h. (internal_fn_reciprocal): New function. (pass_cse_reciprocals::execute): Call it, and build a call to an internal function on success. Only call targetm.builtin_reciprocal for machine functions. * config/aarch64/aarch64-protos.h (aarch64_builtin_rsqrt): Remove second argument. * config/aarch64/aarch64-builtins.c (aarch64_expand_builtin_rsqrt): Rename aarch64_rsqrt_<mode>2 to rsqrt<mode>2. (aarch64_builtin_rsqrt): Remove md_fn argument and only handle machine functions. * config/aarch64/aarch64.c (use_rsqrt_p): New function. (aarch64_builtin_reciprocal): Replace gcall argument with a function decl. Use use_rsqrt_p. Remove optimize_size check. Only handle machine functions. Update call to aarch64_builtin_rsqrt. (aarch64_optab_supported_p): New function. (TARGET_OPTAB_SUPPORTED_P): Define. * config/aarch64/aarch64-simd.md (aarch64_rsqrt_<mode>2): Rename to... (rsqrt<mode>2): ...this. * config/i386/i386.c (use_rsqrt_p): New function. (ix86_builtin_reciprocal): Replace gcall argument with a function decl. Use use_rsqrt_p. Remove optimize_insn_for_size_p check. Only handle machine functions. (ix86_optab_supported_p): Handle rsqrt_optab. * config/rs6000/rs6000.c (TARGET_OPTAB_SUPPORTED_P): Define. (rs6000_builtin_reciprocal): Replace gcall argument with a function decl. Remove optimize_insn_for_size_p check. Only handle machine functions. (rs6000_optab_supported_p): New function. From-SVN: r231229
2015-12-03 15:31:55 +01:00
default_builtin_reciprocal (tree)
{
return NULL_TREE;
}
function.c (reference_callee_copied): New. * function.c (reference_callee_copied): New. (assign_parm_setup_reg): Use it. * calls.c (initialize_argument_information): Likewise. (emit_library_call_value_1): Likewise. * function.h (reference_callee_copied): Declare. * target.h (struct gcc_target): Add callee_copies. * target-def.h (TARGET_CALLEE_COPIES): New. (TARGET_PASS_BY_REFERENCE): Update default. * expr.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * targhooks.c (hook_callee_copies_named): New. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Rename from hook_pass_by_reference_false. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): New. * targhooks.h: Update decls. * config/arc/arc.c (TARGET_CALLEE_COPIES): New. * config/arc/arc.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/frv/frv-protos.h (frv_function_arg_callee_copies): Remove. * config/frv/frv.c (frv_function_arg_callee_copies): Remove. * config/frv/frv.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/iq2000/iq2000.c (TARGET_CALLEE_COPIES): New. * config/iq2000/iq2000.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/m68hc11/m68hc11.c (TARGET_CALLEE_COPIES): New. * config/m68hc11/m68hc11.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mips/mips.c (TARGET_CALLEE_COPIES): New. (mips_callee_copies): New. * config/mips/mips.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mmix/mmix.c (TARGET_CALLEE_COPIES): New. * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mn10300/mn10300.c (TARGET_CALLEE_COPIES): New. * config/mn10300/mn10300.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/pa/pa.c (TARGET_CALLEE_COPIES): New. * config/pa/pa.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/sh/sh.c (sh_callee_copies): New. (TARGET_CALLEE_COPIES): New. * config/sh/sh.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/v850/v850.c (TARGET_CALLEE_COPIES): New. * config/v850/v850.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * doc/tm.texi (TARGET_CALLEE_COPIES): Replace documentation for FUNCTION_ARG_CALLEE_COPIES. * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Update. From-SVN: r87195
2004-09-08 20:45:21 +02:00
bool
hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false (
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
cumulative_args_t ca ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode ATTRIBUTE_UNUSED,
arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arm/pe.c (arm_dllexport_p, arm_dllimport_p, arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport, arm_mark_dllimport, arm_pe_encode_section_info, arm_pe_unique_section): Use ISO-C function declarations. * config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored): Likewise. * config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning. * config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before defining. * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise. * config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise. (register_move_cost): Use ISO-C function declarations. * config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings. * config/score/score-protos.h (score_declare_object): Add ATTRIBUTE_PRINTF_4. * config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * final.c (profile_function): Avoid empty if-bodies. * calls.c (must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Constify. * config/alpha/alpha-protos.h (function_value): Likewise. * config/alpha/alpha.c (alpha_return_in_memory, alpha_pass_by_reference, function_value, unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arm/arm-protos.h (arm_return_in_memory, arm_pad_arg_upward, arm_function_value): Likewise. * config/arm/arm.c (arm_pass_by_reference, arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, arm_function_value, arm_return_in_memory, arm_pad_arg_upward): Likewise. * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise. * config/avr/avr-protos.h (avr_function_value): Likewise. * config/avr/avr.c (avr_return_in_memory, gas_output_limited_string, gas_output_ascii, avr_function_value, avr_return_in_memory): Likewise. * config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise. * config/bfin/bfin.c (bfin_pass_by_reference, bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/cris/cris.c (cris_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS): Likewise. * config/crx/crx.c (crx_return_in_memory): Likewise. * config/darwin.c (function_base, machopic_function_base_name): Likewise. * config/fr30/fr30.c (fr30_must_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/frv/frv.c (frv_must_pass_in_stack): Likewise. * config/h8300/h8300.c (h8300_return_in_memory): Likewise. * config/i386/i386-protos.h (ix86_return_in_memory, ix86_sol10_return_in_memory): Likewise. * config/i386/i386.c (ix86_function_value, ix86_function_sseregparm, ix86_must_pass_in_stack, type_natural_mode, classify_argument, examine_argument, construct_container, ix86_pass_by_reference, function_value_32, function_value_64, ix86_function_value_1, return_in_memory_32, return_in_memory_64, return_in_memory_ms_64, ix86_return_in_memory, ix86_sol10_return_in_memory, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/ia64/ia64-protos.h (ia64_function_value, ia64_hpux_function_arg_padding): Likewise. * config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory, ia64_function_value, bundle_state_hash, bundle_state_eq_p, ia64_hpux_function_arg_padding): Likewise. * config/iq2000/iq2000-protos.h (function_arg, iq2000_function_value): Likewise. * config/iq2000/iq2000.c (iq2000_return_in_memory, iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg, iq2000_function_value): Likewise. * config/m32c/m32c-protos.h (m32c_function_value, m32c_promote_function_return): Likewise. * config/m32c/m32c.c (m32c_pass_by_reference, m32c_promote_prototypes, m32c_promote_function_return, m32c_function_value): Likewise. * config/m32r/m32r.c (m32r_return_in_memory, m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, m32r_in_small_data_p): Likewise. * config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding): Likewise. * config/m68hc11/m68hc11.c (m68hc11_return_in_memory, m68hc11_function_arg_padding): Likewise. * config/m68k/m68k-protos.h (m68k_function_value): Likewise. * config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES, m68k_function_value): Likewise. * config/mcore/mcore-protos.h (mcore_num_arg_regs, mcore_function_value): Likewise. * config/mcore/mcore.c (handle_structs_in_regs, mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mcore_num_arg_regs, mcore_function_value): Likewise. * config/mips/mips-protos.h (mips_pad_arg_upward, mips_function_value): Likewise. * config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb, mips_return_in_memory, mips_pass_by_reference, mips_callee_copies, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward, mips_function_value): Likewise. * config/mmix/mmix-protos.h (mmix_function_outgoing_value): Likewise. * config/mmix/mmix.c (mmix_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value, mmix_encode_section_info): Likewise. * config/mn10300/mn10300-protos.h (mn10300_function_value): Likewise. * config/mn10300/mn10300.c (mn10300_return_in_memory, mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, mn10300_function_value): Likewise. * config/mt/mt-protos.h (mt_function_value): Likewise. * config/mt/mt.c (mt_pass_by_reference, mt_function_value, mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/pa/pa-protos.h (function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pa/pa.c (pa_pass_by_reference, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise. * config/rs6000/rs6000-protos.h (rs6000_function_value, function_arg_padding): Likewise. * config/rs6000/rs6000.c (rs6000_return_in_memory, rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg, rs6000_pass_by_reference, rs6000_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_padding, altivec_expand_dst_builtin, altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins, altivec_init_builtins, rs6000_common_init_builtins, rs6000_function_value): Likewise. * s390/s390-protos.h (s390_function_value): Likewise. * config/s390/s390.c (s390_function_arg_size, s390_pass_by_reference, s390_return_in_memory, s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/score/score-protos.h (score_function_value): Likewise. * config/score/score.c (score_arg_partial_bytes, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, score_return_in_memory, score_pass_by_reference, score_add_offset, score_function_value): Likewise. * config/sh/sh-protos.h (sh_attr_renesas_p, sh_promote_prototypes): Likewise. * config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference, sh_callee_copies, sh_promote_prototypes, shcompact_byref, sh_attr_renesas_p): Likewise. * config/sparc/sparc-protos.h (function_value, function_arg_padding): Likewise. * config/sparc/sparc.c (sparc_promote_prototypes, sparc_return_in_memory, sparc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_record_value_2, function_arg_record_value_1, function_arg_record_value, function_arg_record_value, function_arg_padding, function_value): Likewise. * config/spu/spu-protos.h (spu_function_value): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory, spu_function_value): Likewise. * config/stormy16/stormy16-protos.h (xstormy16_function_value): Likewise. * config/stormy16/stormy16.c (xstormy16_return_in_memory, xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/v850/v850.c (v850_return_in_memory, v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise. * config/xtensa/xtensa.c (xtensa_return_in_msb, xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * explow.c (promote_mode, hard_function_value): Likewise. * expr.h (hard_function_value, promote_mode): Likewise. * function.c (aggregate_value_p): Likewise. * hooks.c (hook_bool_const_tree_true): New. * hooks.h (hook_bool_const_tree_true): New. * sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_RETURN_IN_MSB): Likewise. * target.h (promote_function_args, promote_function_return, promote_prototypes, return_in_memory, return_in_msb, pass_by_reference, must_pass_in_stack, callee_copies, function_value): Likewise. * targhooks.c (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * targhooks.h (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * tree-ssa-structalias.c (const_equiv_class_label_t): New. (equiv_class_label_hash, equiv_class_label_eq): Constify. * tree-vectorizer.c (bb_in_loop_p): Likewise. * tree.c (needs_to_live_in_memory): Likewise. * tree.h (struct tree_type, needs_to_live_in_memory, aggregate_value_p, must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Likewise. * vmsdbgout.c (write_debug_addr, write_debug_delta4, write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg, lookup_filename): Likewise. From-SVN: r127743
2007-08-23 17:49:56 +02:00
const_tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
function.c (reference_callee_copied): New. * function.c (reference_callee_copied): New. (assign_parm_setup_reg): Use it. * calls.c (initialize_argument_information): Likewise. (emit_library_call_value_1): Likewise. * function.h (reference_callee_copied): Declare. * target.h (struct gcc_target): Add callee_copies. * target-def.h (TARGET_CALLEE_COPIES): New. (TARGET_PASS_BY_REFERENCE): Update default. * expr.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * targhooks.c (hook_callee_copies_named): New. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Rename from hook_pass_by_reference_false. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): New. * targhooks.h: Update decls. * config/arc/arc.c (TARGET_CALLEE_COPIES): New. * config/arc/arc.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/frv/frv-protos.h (frv_function_arg_callee_copies): Remove. * config/frv/frv.c (frv_function_arg_callee_copies): Remove. * config/frv/frv.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/iq2000/iq2000.c (TARGET_CALLEE_COPIES): New. * config/iq2000/iq2000.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/m68hc11/m68hc11.c (TARGET_CALLEE_COPIES): New. * config/m68hc11/m68hc11.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mips/mips.c (TARGET_CALLEE_COPIES): New. (mips_callee_copies): New. * config/mips/mips.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mmix/mmix.c (TARGET_CALLEE_COPIES): New. * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mn10300/mn10300.c (TARGET_CALLEE_COPIES): New. * config/mn10300/mn10300.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/pa/pa.c (TARGET_CALLEE_COPIES): New. * config/pa/pa.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/sh/sh.c (sh_callee_copies): New. (TARGET_CALLEE_COPIES): New. * config/sh/sh.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/v850/v850.c (TARGET_CALLEE_COPIES): New. * config/v850/v850.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * doc/tm.texi (TARGET_CALLEE_COPIES): Replace documentation for FUNCTION_ARG_CALLEE_COPIES. * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Update. From-SVN: r87195
2004-09-08 20:45:21 +02:00
{
return false;
}
bool
hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true (
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
cumulative_args_t ca ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode ATTRIBUTE_UNUSED,
arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arm/pe.c (arm_dllexport_p, arm_dllimport_p, arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport, arm_mark_dllimport, arm_pe_encode_section_info, arm_pe_unique_section): Use ISO-C function declarations. * config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored): Likewise. * config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning. * config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before defining. * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise. * config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise. (register_move_cost): Use ISO-C function declarations. * config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings. * config/score/score-protos.h (score_declare_object): Add ATTRIBUTE_PRINTF_4. * config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * final.c (profile_function): Avoid empty if-bodies. * calls.c (must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Constify. * config/alpha/alpha-protos.h (function_value): Likewise. * config/alpha/alpha.c (alpha_return_in_memory, alpha_pass_by_reference, function_value, unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arm/arm-protos.h (arm_return_in_memory, arm_pad_arg_upward, arm_function_value): Likewise. * config/arm/arm.c (arm_pass_by_reference, arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, arm_function_value, arm_return_in_memory, arm_pad_arg_upward): Likewise. * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise. * config/avr/avr-protos.h (avr_function_value): Likewise. * config/avr/avr.c (avr_return_in_memory, gas_output_limited_string, gas_output_ascii, avr_function_value, avr_return_in_memory): Likewise. * config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise. * config/bfin/bfin.c (bfin_pass_by_reference, bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/cris/cris.c (cris_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS): Likewise. * config/crx/crx.c (crx_return_in_memory): Likewise. * config/darwin.c (function_base, machopic_function_base_name): Likewise. * config/fr30/fr30.c (fr30_must_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/frv/frv.c (frv_must_pass_in_stack): Likewise. * config/h8300/h8300.c (h8300_return_in_memory): Likewise. * config/i386/i386-protos.h (ix86_return_in_memory, ix86_sol10_return_in_memory): Likewise. * config/i386/i386.c (ix86_function_value, ix86_function_sseregparm, ix86_must_pass_in_stack, type_natural_mode, classify_argument, examine_argument, construct_container, ix86_pass_by_reference, function_value_32, function_value_64, ix86_function_value_1, return_in_memory_32, return_in_memory_64, return_in_memory_ms_64, ix86_return_in_memory, ix86_sol10_return_in_memory, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/ia64/ia64-protos.h (ia64_function_value, ia64_hpux_function_arg_padding): Likewise. * config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory, ia64_function_value, bundle_state_hash, bundle_state_eq_p, ia64_hpux_function_arg_padding): Likewise. * config/iq2000/iq2000-protos.h (function_arg, iq2000_function_value): Likewise. * config/iq2000/iq2000.c (iq2000_return_in_memory, iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg, iq2000_function_value): Likewise. * config/m32c/m32c-protos.h (m32c_function_value, m32c_promote_function_return): Likewise. * config/m32c/m32c.c (m32c_pass_by_reference, m32c_promote_prototypes, m32c_promote_function_return, m32c_function_value): Likewise. * config/m32r/m32r.c (m32r_return_in_memory, m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, m32r_in_small_data_p): Likewise. * config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding): Likewise. * config/m68hc11/m68hc11.c (m68hc11_return_in_memory, m68hc11_function_arg_padding): Likewise. * config/m68k/m68k-protos.h (m68k_function_value): Likewise. * config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES, m68k_function_value): Likewise. * config/mcore/mcore-protos.h (mcore_num_arg_regs, mcore_function_value): Likewise. * config/mcore/mcore.c (handle_structs_in_regs, mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mcore_num_arg_regs, mcore_function_value): Likewise. * config/mips/mips-protos.h (mips_pad_arg_upward, mips_function_value): Likewise. * config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb, mips_return_in_memory, mips_pass_by_reference, mips_callee_copies, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward, mips_function_value): Likewise. * config/mmix/mmix-protos.h (mmix_function_outgoing_value): Likewise. * config/mmix/mmix.c (mmix_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value, mmix_encode_section_info): Likewise. * config/mn10300/mn10300-protos.h (mn10300_function_value): Likewise. * config/mn10300/mn10300.c (mn10300_return_in_memory, mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, mn10300_function_value): Likewise. * config/mt/mt-protos.h (mt_function_value): Likewise. * config/mt/mt.c (mt_pass_by_reference, mt_function_value, mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/pa/pa-protos.h (function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pa/pa.c (pa_pass_by_reference, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise. * config/rs6000/rs6000-protos.h (rs6000_function_value, function_arg_padding): Likewise. * config/rs6000/rs6000.c (rs6000_return_in_memory, rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg, rs6000_pass_by_reference, rs6000_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_padding, altivec_expand_dst_builtin, altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins, altivec_init_builtins, rs6000_common_init_builtins, rs6000_function_value): Likewise. * s390/s390-protos.h (s390_function_value): Likewise. * config/s390/s390.c (s390_function_arg_size, s390_pass_by_reference, s390_return_in_memory, s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/score/score-protos.h (score_function_value): Likewise. * config/score/score.c (score_arg_partial_bytes, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, score_return_in_memory, score_pass_by_reference, score_add_offset, score_function_value): Likewise. * config/sh/sh-protos.h (sh_attr_renesas_p, sh_promote_prototypes): Likewise. * config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference, sh_callee_copies, sh_promote_prototypes, shcompact_byref, sh_attr_renesas_p): Likewise. * config/sparc/sparc-protos.h (function_value, function_arg_padding): Likewise. * config/sparc/sparc.c (sparc_promote_prototypes, sparc_return_in_memory, sparc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_record_value_2, function_arg_record_value_1, function_arg_record_value, function_arg_record_value, function_arg_padding, function_value): Likewise. * config/spu/spu-protos.h (spu_function_value): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory, spu_function_value): Likewise. * config/stormy16/stormy16-protos.h (xstormy16_function_value): Likewise. * config/stormy16/stormy16.c (xstormy16_return_in_memory, xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/v850/v850.c (v850_return_in_memory, v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise. * config/xtensa/xtensa.c (xtensa_return_in_msb, xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * explow.c (promote_mode, hard_function_value): Likewise. * expr.h (hard_function_value, promote_mode): Likewise. * function.c (aggregate_value_p): Likewise. * hooks.c (hook_bool_const_tree_true): New. * hooks.h (hook_bool_const_tree_true): New. * sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_RETURN_IN_MSB): Likewise. * target.h (promote_function_args, promote_function_return, promote_prototypes, return_in_memory, return_in_msb, pass_by_reference, must_pass_in_stack, callee_copies, function_value): Likewise. * targhooks.c (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * targhooks.h (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * tree-ssa-structalias.c (const_equiv_class_label_t): New. (equiv_class_label_hash, equiv_class_label_eq): Constify. * tree-vectorizer.c (bb_in_loop_p): Likewise. * tree.c (needs_to_live_in_memory): Likewise. * tree.h (struct tree_type, needs_to_live_in_memory, aggregate_value_p, must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Likewise. * vmsdbgout.c (write_debug_addr, write_debug_delta4, write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg, lookup_filename): Likewise. From-SVN: r127743
2007-08-23 17:49:56 +02:00
const_tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
function.c (reference_callee_copied): New. * function.c (reference_callee_copied): New. (assign_parm_setup_reg): Use it. * calls.c (initialize_argument_information): Likewise. (emit_library_call_value_1): Likewise. * function.h (reference_callee_copied): Declare. * target.h (struct gcc_target): Add callee_copies. * target-def.h (TARGET_CALLEE_COPIES): New. (TARGET_PASS_BY_REFERENCE): Update default. * expr.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * targhooks.c (hook_callee_copies_named): New. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Rename from hook_pass_by_reference_false. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): New. * targhooks.h: Update decls. * config/arc/arc.c (TARGET_CALLEE_COPIES): New. * config/arc/arc.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/frv/frv-protos.h (frv_function_arg_callee_copies): Remove. * config/frv/frv.c (frv_function_arg_callee_copies): Remove. * config/frv/frv.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/iq2000/iq2000.c (TARGET_CALLEE_COPIES): New. * config/iq2000/iq2000.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/m68hc11/m68hc11.c (TARGET_CALLEE_COPIES): New. * config/m68hc11/m68hc11.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mips/mips.c (TARGET_CALLEE_COPIES): New. (mips_callee_copies): New. * config/mips/mips.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mmix/mmix.c (TARGET_CALLEE_COPIES): New. * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mn10300/mn10300.c (TARGET_CALLEE_COPIES): New. * config/mn10300/mn10300.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/pa/pa.c (TARGET_CALLEE_COPIES): New. * config/pa/pa.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/sh/sh.c (sh_callee_copies): New. (TARGET_CALLEE_COPIES): New. * config/sh/sh.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/v850/v850.c (TARGET_CALLEE_COPIES): New. * config/v850/v850.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * doc/tm.texi (TARGET_CALLEE_COPIES): Replace documentation for FUNCTION_ARG_CALLEE_COPIES. * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Update. From-SVN: r87195
2004-09-08 20:45:21 +02:00
{
return true;
}
target.h (targetm.calls.arg_partial_bytes): New. * target.h (targetm.calls.arg_partial_bytes): New. * target-def.h (TARGET_ARG_PARTIAL_BYTES): New. * calls.c (store_unaligned_arguments_into_pseudos): Update for partial in bytes. (load_register_parameters): Likewise. (store_one_arg): Likewise. (initialize_argument_information): Use targetm.calls.arg_partial_bytes. (emit_library_call_value_1): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. (emit_push_insn): Update for partial in bytes. * expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * function.c (assign_parm_find_entry_rtl): Use targetm.calls.arg_partial_bytes. Update for result in bytes. (locate_and_pad_parm): Update for partial in bytes. * system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison. * targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New. * targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare. * doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from FUNCTION_ARG_PARTIAL_NREGS. * config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h, config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h, config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h, config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/alpha/alpha.c (alpha_arg_partial_bytes): New. (TARGET_ARG_PARTIAL_BYTES): New. * config/alpha/alpha.h, config/alpha/unicosmk.h, config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/arm/arm.c (arm_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/cris/cris.c (cris_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from fr30_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30-protos.h: Update. * config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/frv/frv.c (frv_arg_partial_bytes): Rename from frv_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/frv/frv-protos.h: Update. * config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from ia64_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/ia64/ia64-protos.h: Update. * config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/iq2000/iq2000-protos.h: Update. * config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/m32r/m32r-protos.h: Update. * config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from mcore_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mcore/mcore-protos.h: Update. * config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mips/mips.c (mips_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mips/mips-protos.h: Update. * config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mn10300/mn10300-protos.h: Update. * config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/pa/pa.c (pa_arg_partial_bytes): Rename from function_arg_partial_nregs. Handle 32-bit. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa-protos.h: Update. * config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/rs6000/rs6000-protos.h: Update. * config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/sh/sh.c (sh_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc-protos.h: Update. * config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/v850/v850.c (v850_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/v850/v850-protos.h: Update. From-SVN: r92726
2004-12-30 04:08:18 +01:00
int
hook_int_CUMULATIVE_ARGS_mode_tree_bool_0 (
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
cumulative_args_t ca ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode ATTRIBUTE_UNUSED,
target.h (targetm.calls.arg_partial_bytes): New. * target.h (targetm.calls.arg_partial_bytes): New. * target-def.h (TARGET_ARG_PARTIAL_BYTES): New. * calls.c (store_unaligned_arguments_into_pseudos): Update for partial in bytes. (load_register_parameters): Likewise. (store_one_arg): Likewise. (initialize_argument_information): Use targetm.calls.arg_partial_bytes. (emit_library_call_value_1): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. (emit_push_insn): Update for partial in bytes. * expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * function.c (assign_parm_find_entry_rtl): Use targetm.calls.arg_partial_bytes. Update for result in bytes. (locate_and_pad_parm): Update for partial in bytes. * system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison. * targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New. * targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare. * doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from FUNCTION_ARG_PARTIAL_NREGS. * config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h, config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h, config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h, config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/alpha/alpha.c (alpha_arg_partial_bytes): New. (TARGET_ARG_PARTIAL_BYTES): New. * config/alpha/alpha.h, config/alpha/unicosmk.h, config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/arm/arm.c (arm_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/cris/cris.c (cris_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from fr30_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/fr30/fr30-protos.h: Update. * config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/frv/frv.c (frv_arg_partial_bytes): Rename from frv_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/frv/frv-protos.h: Update. * config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from ia64_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/ia64/ia64-protos.h: Update. * config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/iq2000/iq2000-protos.h: Update. * config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/m32r/m32r-protos.h: Update. * config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from mcore_function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mcore/mcore-protos.h: Update. * config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mips/mips.c (mips_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mips/mips-protos.h: Update. * config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/mn10300/mn10300-protos.h: Update. * config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/pa/pa.c (pa_arg_partial_bytes): Rename from function_arg_partial_nregs. Handle 32-bit. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/pa/pa-protos.h: Update. * config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/rs6000/rs6000-protos.h: Update. * config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ... * config/sh/sh.c (sh_arg_partial_bytes): ... here. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/sparc/sparc-protos.h: Update. * config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove. * config/v850/v850.c (v850_arg_partial_bytes): Rename from function_arg_partial_nregs. Adjust to return bytes. (TARGET_ARG_PARTIAL_BYTES): New. * config/v850/v850-protos.h: Update. From-SVN: r92726
2004-12-30 04:08:18 +01:00
tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
{
return 0;
}
void
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
default_function_arg_advance (cumulative_args_t ca ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode ATTRIBUTE_UNUSED,
const_tree type ATTRIBUTE_UNUSED,
bool named ATTRIBUTE_UNUSED)
{
gcc_unreachable ();
}
rtx
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
default_function_arg (cumulative_args_t ca ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode ATTRIBUTE_UNUSED,
const_tree type ATTRIBUTE_UNUSED,
bool named ATTRIBUTE_UNUSED)
{
gcc_unreachable ();
}
rtx
re PR middle-end/46500 (target.h includes tm.h) PR middle-end/46500 gcc: * doc/tm.texi.in: Update Copyright date. * doc/tm.texi: Regenerate. * targhooks.c (default_setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * targhooks.h (default_setup_incoming_varargs): Likewise. (default_pretend_outgoing_varargs_named): Likewise. (hook_pass_by_reference_must_pass_in_stack): Likewise. (hook_callee_copies_named): Likewise. (default_function_arg_advance): Likewise. (default_function_arg): Likewise. (default_function_incoming_arg): Likewise. (hook_bool_CUMULATIVE_ARGS_false): Likewise. (hook_bool_CUMULATIVE_ARGS_true): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Likewise. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Likewise. * target.def (pass_by_reference): Likewise. (setup_incoming_varargs, strict_argument_naming): Likewise. (pretend_outgoing_varargs_named, callee_copies): Likewise. (arg_partial_bytes, function_arg_advance, function_arg): Likewise. (function_incoming_arg): Likewise. * target.h: Don't include "tm.h" . (cumulative_args_t): New typedef. [GCC_TM_H] (get_cumulative_args): New static inline function. [GCC_TM_H] (pack_cumulative_args): Likewise. * config/alpha/alpha.c (alpha_function_arg): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (alpha_function_arg_advance, alpha_arg_partial_bytes): Likewise. (alpha_pass_by_reference, alpha_setup_incoming_varargs): Likewise. * config/frv/frv.c (frv_setup_incoming_varargs): Likewise. (frv_arg_partial_bytes, frv_function_arg): Likewise. (frv_function_incoming_arg, frv_function_arg_advance): Likewise. (frv_function_arg_1): Likewise. * config/s390/s390.c (s390_pass_by_reference): Likewise. (s390_function_arg_advance, s390_function_arg): Likewise. * config/m32c/m32c.c (m32c_function_arg): Likewise. (m32c_pass_by_reference, m32c_function_arg_advance): Likewise. (m32c_strict_argument_naming): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_function_arg): Likewise. (spu_function_arg_advance): Likewise. (spu_setup_incoming_varargs): Likewise. Make static. * config/spu/spu-protos.h (spu_setup_incoming_varargs): Remove prototype. * config/sparc/sparc.c (sparc_strict_argument_naming): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (sparc_pass_by_reference, sparc_function_arg_advance): Likewise. (sparc_function_arg, sparc_function_incoming_arg): Likewise. (sparc_arg_partial_bytes, sparc_function_arg_1): Likewise. * config/mep/mep.c (mep_setup_incoming_varargs): Likewise. (mep_pass_by_reference, mep_function_arg): Likewise. (mep_function_arg_advance): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. (m32r_pass_by_reference, m32r_arg_partial_bytes): Likewise. (m32r_function_arg, m32r_function_arg_advance): Likewise. * config/rx/rx.c (rx_function_arg, rx_function_arg_advance): Likewise. * config/i386/i386.c (ix86_function_arg_advance): Likewise. (ix86_function_arg, ix86_pass_by_reference): Likewise. (ix86_setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_setup_incoming_varargs): Likewise. (sh_strict_argument_naming): Likewise. (sh_pretend_outgoing_varargs_named, sh_pass_by_reference): Likewise. (sh_callee_copies, sh_arg_partial_bytes): Likewise. (sh_function_arg_advance, sh_function_arg): Likewise. * config/pdp11/pdp11.c (pdp11_function_arg): Likewise. (pdp11_function_arg_advance): Likewise. * config/microblaze/microblaze.c (microblaze_function_arg_advance): Likewise. (microblaze_function_arg, function_arg_partial_bytes): Likewise. * config/avr/avr.c (avr_function_arg): Likewise. (avr_function_arg_advance): Likewise. * config/xtensa/xtensa.c (xtensa_function_arg_advance): Likewise. (xtensa_function_arg, xtensa_function_incoming_arg): Likewise. (xtensa_function_arg_1): Likewise. * config/stormy16/stormy16.c (xstormy16_function_arg_advance): Likewise. (xstormy16_function_arg): Likewise. * config/fr30/fr30.c (fr30_setup_incoming_varargs): Likewise. (fr30_arg_partial_bytes, fr30_function_arg): Likewise. (fr30_function_arg_advance): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. (lm32_function_arg, lm32_function_arg_advance): Likewise. * config/moxie/moxie.c (moxie_setup_incoming_varargs): Likewise. (moxie_function_arg, moxie_function_arg_advance): Likewise. (moxie_pass_by_reference, moxie_arg_partial_bytes): Likewise. * config/cris/cris.c (cris_setup_incoming_varargs): Likewise. (cris_pass_by_reference, cris_arg_partial_bytes): Likewise. (cris_function_arg, cris_function_incoming_arg): Likewise. (cris_function_arg_advance, cris_function_arg_1): Likewise. * config/iq2000/iq2000.c (iq2000_setup_incoming_varargs): Likewise. (iq2000_pass_by_reference, iq2000_arg_partial_bytes): Likewise. (iq2000_function_arg, iq2000_function_arg_advance): Likewise. * config/mn10300/mn10300.c (mn10300_pass_by_reference): Likewise. (mn10300_function_arg, mn10300_function_arg_advance): Likewise. (mn10300_arg_partial_bytes): Likewise. * config/ia64/ia64.c (ia64_setup_incoming_varargs): Likewise. (ia64_arg_partial_bytes, ia64_function_arg): Likewise. (ia64_function_incoming_arg, ia64_function_arg_advance): Likewise. (ia64_function_arg_1): Likewise. * config/m68k/m68k.c (m68k_function_arg_advance): Likewise. (m68k_function_arg): Likewise. * config/rs6000/rs6000.c (rs6000_function_arg_advance): Likewise. (rs6000_function_arg, setup_incoming_varargs): Likewise. (rs6000_pass_by_reference, rs6000_arg_partial_bytes): Likewise. * config/picochip/picochip.c (picochip_arg_partial_bytes): Likewise. (picochip_function_arg, picochip_incoming_function_arg): Likewise. (picochip_arg_advance): Likewise. * config/mcore/mcore.c (mcore_setup_incoming_varargs): Likewise. (mcore_arg_partial_bytes, mcore_function_arg): Likewise. (mcore_function_arg_advance): Likewise. * config/score/score.c (score_pass_by_reference): Likewise. (score_function_arg_advance): Likewise. (score_arg_partial_bytes): Likewise. Make static. * config/score/score-protos.h (score_arg_partial_bytes): Don't declare. * config/arm/arm.c (arm_arg_partial_bytes): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (arm_function_arg, arm_function_arg_advance): Likewise. (arm_setup_incoming_varargs, arm_pass_by_reference): Likewise. * config/pa/pa.c (pa_pass_by_reference): Likewise. (pa_arg_partial_bytes, pa_function_arg_advance): Likewise. (pa_function_arg): Likewise. * config/mips/mips.c (mips_strict_argument_naming): Likewise. (mips_function_arg, mips_function_arg_advance): Likewise. (mips_arg_partial_bytes, mips_pass_by_reference): Likewise. (mips_callee_copies, mips_setup_incoming_varargs): Likewise. * config/vax/vax.c (vax_function_arg): Likewise. (vax_function_arg_advance): Likewise. * config/h8300/h8300.c (h8300_function_arg): Likewise. (h8300_function_arg_advance): Likewise. * config/v850/v850.c (v850_pass_by_reference): Likewise. (v850_strict_argument_naming, v850_function_arg): Likewise. (v850_arg_partial_bytes, v850_function_arg_advance): Likewise. (v850_setup_incoming_varargs): Likewise. * config/mmix/mmix.c (mmix_setup_incoming_varargs): Likewise. (mmix_function_arg_advance, mmix_function_incoming_arg): Likewise. (mmix_function_arg, mmix_pass_by_reference): Likewise. (mmix_function_arg_1): Replace const CUMULATIVE_ARGS* argument type with const void *. * config/bfin/bfin.c (setup_incoming_varargs): Replace CUMULATIVE_ARGS* argument type with cumulative_args_t. (bfin_function_arg_advance, bfin_function_arg): Likewise. (bfin_arg_partial_bytes, bfin_pass_by_reference): Likewise. * calls.c (emit_call_1): Change type of args_so_far to cumulative_args_t. Changed all callers. (initialize_argument_information): Likewise. (expand_call, emit_library_call_value_1): Use pack_cumulative_args. * dse.c (get_call_args): Likewise. * expr.c (block_move_libcall_safe_for_call_parm): Likewise. * function.c (pass_by_reference, reference_callee_copied): Likewise. (struct assign_parm_data_all): Rename args_so_far to args_so_far_v. New member args_so_far_v. Changed all users. * var-tracking.c (prepare_call_arguments): Use pack_cumulative_args. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/mips/mips.c (mips_output_args_xfer): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_expand_prologue): Likewise. * config/m32r/m32r.c (m32r_return_in_memory): Adjust for changed m32r_pass_by_reference. gcc/ada: * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args. From-SVN: r175103
2011-06-16 15:45:47 +02:00
default_function_incoming_arg (cumulative_args_t ca ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode ATTRIBUTE_UNUSED,
const_tree type ATTRIBUTE_UNUSED,
bool named ATTRIBUTE_UNUSED)
{
gcc_unreachable ();
}
builtins.c (std_gimplify_va_arg_expr): Use targetm.calls.function_arg_boundary. * builtins.c (std_gimplify_va_arg_expr): Use targetm.calls.function_arg_boundary. * function.c (assign_parms, locate_and_pad_parm): Likewise. * calls.c (struct arg_data): Update comment. * defaults.h (FUNCTION_ARG_BOUNDARY): Delete. * target.def (function_arg_boundary): Define. * targhooks.h (default_function_arg_boundary): Declare. * targhooks.c (default_function_arg_boundary): Define. * doc/tm.texi.in (FUNCTION_ARG_PADDING): Use TARGET_FUNCTION_ARG_BOUNDARY. (FUNCTION_ARG_BOUNDARY): Delete. (TARGET_FUNCTION_ARG_BOUNDARY): New. * doc/tm.texi: Regenerate. * system.h (FUNCTION_ARG_BOUNDARY): Poison. * config/arc/arc.h (FUNCTION_ARG_BOUNDARY): Delete. * config/arc/arc.c (arc_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/arm/arm.h (FUNCTION_ARG_BOUNDARY): Delete. * config/arm/arm-protos.h (arm_needs_doubleword_align): Delete. * config/arm/arm.c (arm_needs_doubleword_align): Make static. (arm_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/frv/frv.h (FUNCTION_ARG_BOUNDARY): Delete. * config/frv/frv-protos.h (frv_function_arg_boundary): Delete. * config/frv/frv.c (frv_function_arg_boundary): Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/i386/i386.h (FUNCTION_ARG_BOUNDARY): Delete. * config/i386/i386-protos.h (ix86_function_arg_boundary): Delete. * config/i386/i386.c (ix86_function_arg_boundary): Make static. (ix86_compat_function_arg_boundary): Take and return unsigned int. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/ia64/ia64.h (FUNCTION_ARG_BOUNDARY): Delete. * config/ia64/ia64-protos.h (ia64_function_arg_boundary): Delete. * config/ia64/ia64.c (ia64_function_arg_boundary): Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/m32c/m32c.h (FUNCTION_ARG_BOUNDARY): Delete. * config/m32c/m32c.c (m32c_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/m32r/m32r.h (FUNCTION_ARG_BOUNDARY): Delete. * config/mcore/mcore.h (FUNCTION_ARG_BOUNDARY): Delete. * config/mcore/mcore.c (mcore_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/mips/mips.h (FUNCTION_ARG_BOUNDARY): Delete. * config/mips/mips-protos.h (mips_function_arg_boundary): Delete. * config/mips/mips.c (mips_function_arg_boundary): Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/pa/pa.h (FUNCTION_ARG_BOUNDARY): Delete. * config/pa/pa.c (pa_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/picochip/picochip.h (FUNCTION_ARG_BOUNDARY): Delete. * config/picochip/picochip-protos.h (picochip_get_function_arg_boundary): Delete. * config/picochip/picochip.c (picochip_get_function_arg_boundary): Rename to... (picochip_function_arg_boundary): ...this. Make static. (picochip_function_arg, picochip_arg_partial_bytes): Adjust. (picochip_arg_advance): Adjust. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/rs6000/rs6000.h (FUNCTION_ARG_BOUNDARY): Delete. * config/rs6000/rs6000-protos.h (function_arg_boundary): Delete. * config/rs6000/rs6000.c (function_arg_boundary): Rename to... (rs6000_function_arg_boundary): ...this. Make static. (rs6000_parm_start, rs6000_gimplify_va_arg): Adjust. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/rx/rx.h (FUNCTION_ARG_BOUNDARY): Delete. * config/rx/rx.c (rx_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/sparc/sparc.h (FUNCTION_ARG_BOUNDARY): Delete. * config/sparc/sparc.c (sparc_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/xtensa/xtensa.h (FUNCTION_ARG_BOUNDARY): Delete. * config/xtensa/xtensa-protos.h (function_arg_boundary): Delete. * config/xtensa/xtensa.c (function_arg_boundary): Rename to... (xtensa_function_arg_boundary): ...this. Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. From-SVN: r166803
2010-11-16 15:25:07 +01:00
unsigned int
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_function_arg_boundary (machine_mode mode ATTRIBUTE_UNUSED,
builtins.c (std_gimplify_va_arg_expr): Use targetm.calls.function_arg_boundary. * builtins.c (std_gimplify_va_arg_expr): Use targetm.calls.function_arg_boundary. * function.c (assign_parms, locate_and_pad_parm): Likewise. * calls.c (struct arg_data): Update comment. * defaults.h (FUNCTION_ARG_BOUNDARY): Delete. * target.def (function_arg_boundary): Define. * targhooks.h (default_function_arg_boundary): Declare. * targhooks.c (default_function_arg_boundary): Define. * doc/tm.texi.in (FUNCTION_ARG_PADDING): Use TARGET_FUNCTION_ARG_BOUNDARY. (FUNCTION_ARG_BOUNDARY): Delete. (TARGET_FUNCTION_ARG_BOUNDARY): New. * doc/tm.texi: Regenerate. * system.h (FUNCTION_ARG_BOUNDARY): Poison. * config/arc/arc.h (FUNCTION_ARG_BOUNDARY): Delete. * config/arc/arc.c (arc_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/arm/arm.h (FUNCTION_ARG_BOUNDARY): Delete. * config/arm/arm-protos.h (arm_needs_doubleword_align): Delete. * config/arm/arm.c (arm_needs_doubleword_align): Make static. (arm_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/frv/frv.h (FUNCTION_ARG_BOUNDARY): Delete. * config/frv/frv-protos.h (frv_function_arg_boundary): Delete. * config/frv/frv.c (frv_function_arg_boundary): Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/i386/i386.h (FUNCTION_ARG_BOUNDARY): Delete. * config/i386/i386-protos.h (ix86_function_arg_boundary): Delete. * config/i386/i386.c (ix86_function_arg_boundary): Make static. (ix86_compat_function_arg_boundary): Take and return unsigned int. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/ia64/ia64.h (FUNCTION_ARG_BOUNDARY): Delete. * config/ia64/ia64-protos.h (ia64_function_arg_boundary): Delete. * config/ia64/ia64.c (ia64_function_arg_boundary): Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/m32c/m32c.h (FUNCTION_ARG_BOUNDARY): Delete. * config/m32c/m32c.c (m32c_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/m32r/m32r.h (FUNCTION_ARG_BOUNDARY): Delete. * config/mcore/mcore.h (FUNCTION_ARG_BOUNDARY): Delete. * config/mcore/mcore.c (mcore_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/mips/mips.h (FUNCTION_ARG_BOUNDARY): Delete. * config/mips/mips-protos.h (mips_function_arg_boundary): Delete. * config/mips/mips.c (mips_function_arg_boundary): Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/pa/pa.h (FUNCTION_ARG_BOUNDARY): Delete. * config/pa/pa.c (pa_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/picochip/picochip.h (FUNCTION_ARG_BOUNDARY): Delete. * config/picochip/picochip-protos.h (picochip_get_function_arg_boundary): Delete. * config/picochip/picochip.c (picochip_get_function_arg_boundary): Rename to... (picochip_function_arg_boundary): ...this. Make static. (picochip_function_arg, picochip_arg_partial_bytes): Adjust. (picochip_arg_advance): Adjust. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/rs6000/rs6000.h (FUNCTION_ARG_BOUNDARY): Delete. * config/rs6000/rs6000-protos.h (function_arg_boundary): Delete. * config/rs6000/rs6000.c (function_arg_boundary): Rename to... (rs6000_function_arg_boundary): ...this. Make static. (rs6000_parm_start, rs6000_gimplify_va_arg): Adjust. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/rx/rx.h (FUNCTION_ARG_BOUNDARY): Delete. * config/rx/rx.c (rx_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/sparc/sparc.h (FUNCTION_ARG_BOUNDARY): Delete. * config/sparc/sparc.c (sparc_function_arg_boundary): Define. (TARGET_FUNCTION_ARG_BOUNDARY): Define. * config/xtensa/xtensa.h (FUNCTION_ARG_BOUNDARY): Delete. * config/xtensa/xtensa-protos.h (function_arg_boundary): Delete. * config/xtensa/xtensa.c (function_arg_boundary): Rename to... (xtensa_function_arg_boundary): ...this. Make static. (TARGET_FUNCTION_ARG_BOUNDARY): Define. From-SVN: r166803
2010-11-16 15:25:07 +01:00
const_tree type ATTRIBUTE_UNUSED)
{
return PARM_BOUNDARY;
}
unsigned int
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_function_arg_round_boundary (machine_mode mode ATTRIBUTE_UNUSED,
const_tree type ATTRIBUTE_UNUSED)
{
return PARM_BOUNDARY;
}
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
void
re PR rtl-optimization/24762 ([killloop-branch] code motion of non-invariant expressions with hard registers.) 2006-01-27 Daniel Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> PR rtl-optimization/24762 * doc/tm.texi: Added TARGET_EXTRA_LIVE_ON_ENTRY. * targhooks.c (hook_void_bitmap): New hook prototype. * targhoohs.h (hook_void_bitmap): Ditto. * bitmap.h (bitmap_head_def): Moved to coretypes.h. * coretypes.h (bitmap_head_def): Moved from bitmap.h. * target.h (live_on_entry): New function pointer. * df-scan.c (df_all_hard_regs): Removed. (df_scan_dump, df_hard_reg_init): Removed df_all_hard_regs. (df_scan_free_internal): Added df->entry_block_defs. (df_scan_alloc): Ditto. (df_scan_dump): Ditto. (df_uses_record): Plumbed flag field properly thru calls. Record EH_RETURN_DATA_REGNO in eh blocks unconditionally. This part fixes PR24762. (df_bb_refs_record): Added code to make the frame and arg pointers live in EH blocks. (df_refs_record): Added call to df_record_entry_block_defs. (df_record_entry_block_defs): New function. * df-core.c: Added comments to describe new artifical defs. * df.h (DF_REF_DIES_AFTER_THIS_USE): New flag in enum df_ref_flags. (entry_block_defs): New field in struct df. (df_all_hard_regs): Deleted. * target-def.h: Added TARGET_EXTRA_LIVE_ON_ENTRY. * df-problems.c (df_ru_bb_local_compute_process_def): Added code to handle artifical defs in the entry to a function. (df_ru_bb_local_compute): Ditto. (df_rd_bb_local_compute_process_def): Ditto. (df_rd_bb_local_compute): Ditto. (df_lr_bb_local_compute): Ditto. (df_ur_bb_local_compute): Ditto. (df_urec_bb_local_compute): Ditto. (df_chain_create_bb): Ditto. (df_ur_local_finalize): Removed entry. (df_urec_init): Ditto. (df_urec_local_finalize): Ditto. (df_ri_bb_compute): Added detection of last use of pseudos. * Makefile.in (df-scan.o): Updated dependencies. * config/mips/mips-protos.h (mips_set_live_on_entry): Added. * config/mips/mips.c (mips_set_live_on_entry): Added. * config/mips/mips.c (TARGET_EXTRA_LIVE_ON_ENTRY): Added value for target hook. * dce.c (marked_insn_p): Added code to handle artifical defs. Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com> From-SVN: r110312
2006-01-27 23:23:32 +01:00
hook_void_bitmap (bitmap regs ATTRIBUTE_UNUSED)
{
}
const char *
hook_invalid_arg_for_unprototyped_fn (
alpha.c (alpha_mangle_type, [...]): Constify. * config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp, alpha_in_small_data_p, alpha_split_complex_arg, alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Constify. * config/arm/arm-protos.h (arm_mangle_type): Likewise. * config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type): Likewise. * config/bfin/bfin.c (funkind, bfin_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/darwin-protos.h (darwin_binds_local_p): Likewise. * config/darwin.c (darwin_binds_local_p): Likewise. * config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p): Likewise. * config/i386/i386-protos.h (i386_pe_binds_local_p, i386_pe_valid_dllimport_attribute_p): Likewise. * config/i386/i386.c (ix86_function_regparm, ix86_comp_type_attributes, ix86_ms_bitfield_layout_p, x86_can_output_mi_thunk, ix86_mangle_type, TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. * config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p, i386_pe_binds_local_p): Likewise. * config/ia64/ia64.c (ia64_first_cycle_multipass_dfa_lookahead_guard_spec, ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type, ia64_invalid_conversion, ia64_invalid_unary_op, ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/m32c/m32c.c (m32c_comp_type_attributes): Likewise. * config/m32r/m32r.c (m32r_in_small_data_p): Likewise. * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/mips/mips.c (mips_use_blocks_for_constant_p, mips_in_small_data_p, mips_use_anchors_for_symbol_p, mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK, mips_near_type_p, mips_far_type_p, mips_global_symbol_p, mips_symbol_binds_local_p, mips_classify_symbol): Likewise. * config/pa/pa.c (pa_commutative_p): Likewise. * config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p): Likewise. * config/rs6000/rs6000.c (rs6000_invalid_within_doloop, rs6000_ms_bitfield_layout_p, rs6000_mangle_type, rs6000_use_blocks_for_constant_p, rs6000_vector_alignment_reachable, rs6000_is_opaque_type, invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise. * config/s390/s390.c (s390_mangle_type, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP): Likewise. * config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK, th_in_small_data_p): Likewise. * config/sh/sh.c (sh_ms_bitfield_layout_p, sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/sparc/sparc.c (sparc_can_output_mi_thunk, sparc_mangle_type): Likewise. * config/spu/spu.c (spu_vector_alignment_reachable): Likewise. * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise. * emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq): Likewise. * hooks.c (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (default_can_output_mi_thunk_no_vcall): Constify. * hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (default_can_output_mi_thunk_no_vcall): Constify. * integrate.c (function_attribute_inlinable_p): Likewise. * integrate.h (function_attribute_inlinable_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * output.h (decl_readonly_section, categorize_decl_for_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Likewise. * rtl.h (rtx_renumbered_equal_p, decl_default_tls_model): Likewise. * target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P, TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P, TARGET_COMP_TYPE_ATTRIBUTES, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE, TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP, TARGET_DWARF_CALLING_CONVENTION): Likewise. * target.h (can_output_mi_thunk, needs_block_p, first_cycle_multipass_dfa_lookahead_guard_spec, vector_alignment_reachable, comp_type_attributes, function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type, commutative_p, use_blocks_for_constant_p, use_anchors_for_symbol_p, in_small_data_p, binds_local_p, vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook, invalid_within_doloop, valid_dllimport_attribute_p, split_complex_arg, invalid_arg_for_unprototyped_fn, invalid_conversion, invalid_unary_op, invalid_binary_op): Likewise. * targhooks.c (default_invalid_within_doloop, hook_invalid_arg_for_unprototyped_fn, default_builtin_vector_alignment_reachable): Likewise. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * targhooks.h (default_invalid_within_doloop, default_builtin_vector_alignment_reachable, hook_invalid_arg_for_unprototyped_fn): Constify. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * varasm.c (bss_initializer_p, decl_default_tls_model, categorize_decl_for_section, decl_readonly_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Constify. From-SVN: r127785
2007-08-24 21:00:59 +02:00
const_tree typelist ATTRIBUTE_UNUSED,
const_tree funcdecl ATTRIBUTE_UNUSED,
const_tree val ATTRIBUTE_UNUSED)
{
return NULL;
}
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
/* Initialize the stack protection decls. */
/* Stack protection related decls living in libgcc. */
static GTY(()) tree stack_chk_guard_decl;
tree
default_stack_protect_guard (void)
{
tree t = stack_chk_guard_decl;
if (t == NULL)
{
rtx x;
java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt. gcc/java/ * java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt. * expr.c (force_evaluation_order): Same. * typeck.c: Add location to build_decl or PUSH_FIELD calls. * class.c: Same. * decl.c: Same. * jcf-parse.c: Same. * constants.c: Same. * resource.c: Same. * except.c: Same. * builtins.c: Same. * expr.c: Same. * java-tree.h (PUSH_FIELD): Add location field. gcc/objc/ * objc-act.c (finish_var_decl): Pass location to finish_decl. (objc_get_parm_info): Same. (get_super_receiver): Same. * objc-act.c (objc_build_component_ref): Pass location to build_compound_ref. (build_module_initializer_routine): Pass location to c_end_compound_stmt. (objc_generate_static_init_call): Pass location to build_stmt. (build_typed_selector_reference): New location argument. (build_selector_reference): Same. (objc_substitute_decl): Pass location to build_array_ref. (next_sjlj_build_try_catch_finally): Pass location to build_stmt. (objc_begin_catch_clause): Same. (objc_finish_try_stmt): Same. (objc_finish_catch_clause): Pass location to c_end_compound_stmt. (objc_build_throw_stmt): New argument. (generate_shared_structures): Pass location to build_c_cast. (objc_build_message_expr): Use local location. (objc_finish_message_expr): Use input_location. (build_objc_method_call): New argument. (objc_build_selector_expr): Same. (get_super_receiver): Pass location to build_c_cast, build_modify_expr, build_compound_expr. * objc-act.c: Add location to all calls to start_struct, build_decl, finish_struct. gcc/ * tree-pretty-print.c (dump_generic_node): Dump column numbers. * gimple-pretty-print.c (dump_gimple_stmt): Same. * gimplify.c (gimplify_modify_expr): Set location for GIMPLE_ASSIGNs created. * c-parser.c (c_parser_binary_expression): Use current column while building binary operations. * common.opt (fshow-column): Enable by default. * tree-vrp.c (check_array_ref): Use warning_at. (check_array_bounds): Use location from call back if expr has no location. * tree.h: Add location argument to maybe_fold_*. * tree-ssa-ccp.c (ccp_fold): Pass location to maybe_fold_*. (maybe_fold_offset_to_array_ref): Add location argument and use it. (maybe_fold_offset_to_component_ref): Same. (maybe_fold_offset_to_reference): Same. (maybe_fold_offset_to_address): Same. (maybe_fold_stmt_indirect): Same. (maybe_fold_stmt_addition): Same. (fold_stmt_r): Pass location to maybe_fold_*. (fold_gimple_assign): Same. * c-tree.h: Add location argument to finish_decl, default_function_array_conversion, store_init_value. * c-decl.c (define_label): Use error_at. (c_make_fname_decl): Pass location to finish_decl. (finish_decl): New location argument. (build_compound_literal): Pass location to store_init_value. (grokdeclarator): Pass location to finish_decl. (grokfield): Same. * c-typeck.c (array_to_pointer_conversion): New location argument. (function_to_pointer_conversion): Same. (default_function_array_conversion): Same. (parser_build_unary_op): Pass location to overflow_warning. (parser_build_binary_op): Same. Use warning_at. (build_unary_op): Pass location to array_to_pointer_conversion. (build_c_cast): Pass location to digest_init. (build_modify_expr): New location argument. (convert_for_assignment): Same. (store_init_value): Same. (digest_init): Same. (output_init_element): Pass location to digest_init and array_to_pointer_conversion. (c_finish_return): Pass location to convert_for_assignment. * gimplify.c (gimplify_conversion): Pass location to maybe_fold_offset_to_address. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Pass location to maybe_fold_stmt_addition. * c-omp.c (c_finish_omp_atomic): Pass new location to build_modify_expr. (c_finish_omp_for): Same. * c-common.c (overflow_warning): New argument. * c-common.h: New argument to build_modify_expr, overflow_warning. * c-parser.c (c_parser_declaration_or_fndef): Pass location to finish_decl. (c_parser_initializer): Pass location to default_function_array_conversion. (c_parser_initelt): Same. (c_parser_initval): Same. (c_parser_asm_operands): Same. (c_parser_expr_no_commas): Same. Pass location to build_modify_expr. (c_parser_conditional_expression): Same. (c_parser_binary_expression): Add location info to stack. Use it. (c_parser_unary_expression): Pass location to default_function_array_conversion, parser_build_unary_op, build_indirect_ref, c_parser_postfix_expression_after_primary. (c_parser_postfix_expression_after_primary): New location argument. Use it. (c_parser_expression_conv): Pass location to default_function_array_conversion. (c_parser_expr_list): Same. (c_parser_omp_atomic): Same. (c_parser_omp_for_loop): Same. * c-tree.h: (struct c_declarator): Add comment to id_loc. (build_array_declarator): New argument. * c-decl.c (build_array_declarator): Add location argument. (grokdeclarator): Set id_loc for cdk_array. * c-parser.c (c_parser_direct_declarator_inner): Pass location to build_array_declarator. * tree.c (build_omp_clause): Add location argument. * tree.h (OMP_CLAUSE_HAS_LOCATION): New macro. (OMP_CLAUSE_LOCATION): New macro. (struct tree_omp_clause): Add location field. (build_omp_clause): Add argument. * testsuite/gcc.dg/gomp/for-1.c: Fix column. * cp/pt.c (tsubst_omp_for_iterator): Pass location to build_omp_clause. * cp/parser.c (cp_parser_omp_var_list_no_open): Same. (cp_parser_omp_clause_collapse): Same. (cp_parser_omp_clause_default): Same. (cp_parser_omp_clause_if): Same. (cp_parser_omp_clause_nowait): Same. (cp_parser_omp_clause_num_threads): Same. (cp_parser_omp_clause_ordered): Same. (cp_parser_omp_clause_schedule): Same. (cp_parser_omp_clause_untied): Same. (cp_parser_omp_for_loop): Same. (cp_parser_omp_parallel): Pass location to c_split_parallel_clauses. * c-tree.h (c_start_case): Add location argument. (c_process_expr_stmt): Same. (c_finish_goto_*): Same. * tree-parloops.c (initialize_reductions): Pass location to build_omp_clause. (create_parallel_loop): Same. * fortran/trans-openmp.c (gfc_trans_omp_variable_list): Same. (gfc_trans_omp_reduction_list): Same. (gfc_trans_omp_clauses): Same. (gfc_trans_omp_do): Same. * c-typeck.c (c_finish_goto_label): Same. (c_finish_goto_ptr): New location argument. (c_start_case): Same. (emit_side_effect_warnings): Same. (c_process_expr_stmt): Same. (c_finish_stmt_expr): Same. (c_finish_omp_clauses): Use error_at instead of error. * gimplify.c (gimplify_adjust_omp_clauses_1): Pass location to build_omp_clause. * c-omp.c (c_split_parallel_clauses): New location argument. * tree-nested.c (convert_nonlocal_reference_stmt): Pass location to build_omp_clause. (convert_local_reference_stmt): Same. (convert_gimple_call): Same. * c-common.h (c_split_parallel_clauses): New argument. * c-parser.c (c_parser_statement_after_labels): Pass location to c_finish_goto_label. (c_parser_switch_statement): Pass location to c_start_case. (c_parser_for_statement): Pass location to c_finish_expr_stmt, and c_process_expr_stmt. (c_parser_omp_variable_list): Add location argument. (c_parser_omp_clause_collapse): Pass location to build_omp_clause. (c_parser_omp_clause_default): Same. (c_parser_omp_clause_if): Same. (c_parser_omp_clause_num_threads): Same. (-c_parser_omp_clause_ordered): Same. (c_parser_omp_clause_reduction): Pass location to c_parser_omp_variable_list. (c_parser_omp_clause_schedule): Pass location to build_omp_clause. (c_parser_omp_clause_untied): Same. (c_parser_omp_for_loop): Pass location to c_process_expr_stmt. (c_parser_omp_parallel): Pass location to c_split_parallel_clauses. * c-tree.h (check_for_loop_decls, undeclared_variable, build_component_ref, build_array_ref, build_external_ref, c_expr_sizeof_expr, c_expr_sizeof_type, parser_build_unary_op, build_conditional_expr, build_compound_expr, c_cast_expr, build_c_cast, build_asm_expr, c_end_compound_stmt, c_finish_stmt_expr, c_finish_return, c_finish_omp_parallel, c_finish_omp_task): New argument. * c-semantics.c (build_stmt): Same. (build_case_label): Same. * c-decl.c (c_finish_incomplete_decl): Pass location on down. (undeclared_variable): New argument. (make_label): Same. (lookup_label): Pass location on down. (define_label): Same. (finish_decl): Same. (build_compound_literal): Same. (finish_struct): Same. (finish_function): Do not set location here. (check_for_loop_decls): New argument. * tree.c (save_expr): Set location. (build_empty_stmt): New argument. * tree.h (build_empty_stmt): New argument to build_empty_stmt. (CAN_HAVE_LOCATION_P): Make sure we have a non empty node. * builtins.c (gimplify_va_arg_expr): Use locations. (expand_builtin_sync_operation): Same. * c-typeck.c (build_component_ref): New argument. (build_array_ref): Same. (build_external_ref): Same. (c_expr_sizeof_expr): Same. (c_expr_sizeof_type): Same. (parser_build_unary_op): Same. (build_conditional_expr): Same. (build_compound_expr): Pass location on down. (build_compound_expr): New argument. (build_c_cast): Same. (c_cast_expr): Same. (build_asm_expr): Same. (c_finish_return): Same. (c_process_expr_stmt): Pass location on down. (c_finish_stmt_expr): New argument. (push_clenaup): Same. (c_finish_omp_parallel): Same. (c_finish_omp_task): Same. * gimplify.c (gimplify_call_expr): Pass location on down. * c-omp.c (c_finish_omp_master): New argument. (c_finish_omp_critical): Same. (c_finish_omp_ordered): Same. (c_finish_omp_barrier): Same. (-c_finish_omp_taskwait): Same. (c_finish_omp_atomic): Same. (c_finish_omp_flush): Same. * tree-inline.c (copy_tree_body_r): Pass location on down. (inline_forbidden_p): Remove use of input_location. * c-gimplify.c (c_build_bind_expr): New argument. * c-common.c (c_common_truthvalue_conversion): Pass location on down. (c_sizeof_or_alignof_type): New argument. (c_alignof_expr): Same. (build_va_arg): Same. (c_add_case_label): Same. * c-common.h (c_sizeof_or_alignof_type, c_alignof_expr, c_sizeof, c_alignof, build_va_arg, build_stmt, build_case_label, c_build_bind_expr, objc_build_selector_expr, objc_build_throw_stmt, c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered, c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush, c_finish_omp_taskwait, c_finish_omp_for, c_split_parallel_clauses): New argument. * stub-objc.c (objc_build_selector_expr): Same. (objc_build_throw_stmt): Same. * c-parser.c (c_parser_declaration_or_fndef): Pass location on down. (c_parser_initelt): Same. (c_parser_compound_statement): Same. (c_parser_compound_statement_nostart): Same. (c_parser_label): Same. (c_parser_statement_after_labels): Same. (c_parser_if_body): Same. (c_parser_else_body): Same. (c_parser_if_statement): Same. (c_parser_switch_statement): Same. (c_parser_while_statement): Same. (c_parser_do_statement): Same. (c_parser_for_statement): Same. (c_parser_asm_statement): Same. (c_parser_conditional_expression): Same. (c_parser_binary_expression): Same. (c_parser_cast_expression): Same. (c_parser_unary_expression): Same. (c_parser_sizeof_expression): Same. (c_parser_alignof_expression): Same. (c_parser_postfix_expression): Same. (c_parser_expression): Same. (c_parser_objc_receiver): Same. (c_parser_omp_variable_list): Same. (c_parser_omp_structured_block): Same. (c_parser_omp_atomic): New argument. (c_parser_omp_barrier): Same. (c_parser_omp_critical): Same. (c_parser_omp_flush): Pass location on down. (c_parser_omp_for_loop): New argument. (c_parser_omp_for): Same. (c_parser_omp_master): Same. (c_parser_omp_ordered): Same. (c_parser_omp_sections_scope): Same. (c_parser_omp_sections): Same. (c_parser_omp_parallel): Same. (c_parser_omp_single): Same. (c_parser_omp_task): Same. (c_parser_omp_taskwait): Pass location on down. (c_parser_omp_construct): Same. (c_parser_omp_threadprivate): Same. * dwarf2asm.c, targhooks.c, optabs.c, tree.c, tree.h, target.h, builtins.c, omp-low.c, cgraphunit.c, tree-call-cdce.c, tree-ssa-alias.c, gimple-low.c, c-tree.h, expr.c, tree-parloops.c, c-decl.c, tree-eh.c, langhooks.c, function.c, stor-layout.c, c-typeck.c, gimplify.c, c-pragma.c, expmed.c, except.c, coverage.c, emit-rtl.c, cfgexpand.c, tree-mudflap.c, varasm.c, tree-nested.c, rtl.h, tree-inline.c, tree-profile.c, c-common.c, c-common.h, tree-switch-conversion.c, tree-cfg.c, ipa-struct-reorg.c, c-parser.c, config/i386/i386.c, stmt.c: Add location argument to the following function definitions and/or function calls: build_decl, objcp_start_struct, objcp_finish_struct, start_struct, finish_struct, PUSH_FIELD, create_artificial_label, cp_make_fname_decl, pushtag, implicitly_declare, c_make_fname_decl, build_compound_literal, parser_xref_tag, resolve_overloaded_builtin, do_case, c_finish_bc_stmt, build_compound_literal, build_function_call. * c-decl.c (build_compound_literal): Add location argument. Make all diagnostic calls use location. (start_struct): Same. (finish_struct): Same. (start_enum): Same. (build_enumerator): Same. (start_function): Same. (grokdeclarator): Make all diagnostic calls use location. (store_parm_decls_oldstyle): Same. * c-typeck.c (build_function_call): Add location argument. Make all diagnostic calls use location. (do_case): Same. (c_finish_bc_stmt): Same. * tree-nested.c (get_trampoline_type): Add argument. Pass location to build_decl. (lookup_tramp_for_decl): Pass location to get_trampoline_type. * rtl.h (RTL_LOCATION): New. * c-common.c (c_add_case_label): Add location argument. Make all diagnostic calls use location. * c-common.h: Add location argument to make_fname_decl, do_case, c_add_case_label, build_function_call, resolve_overloaded_builtin. * c-parser.c (c_parser_enum_specifier): Rename ident_loc to enum_loc. Set it appropriately for every case. Pass enum_loc to start_enum call. Pass value_loc first to build_enumerator. Pass enum_loc to parser_xref_tag. (c_parser_struct_or_union_specifier): Save location. Use it for start_struct, finish_struct, and parser_xref_tag. gcc/testsuite/ * gcc.dg/old-style-prom-3.c: Add column info. * gcc.dg/overflow-warn-1.c * gcc.dg/gomp/pr27415.c * gcc.dg/gomp/for-1.c: Same. * gcc.dg/enum-compat-1.c: Same. * gcc.dg/c99-tag-3.c: Same. * gcc.dg/Wredundant-decls-2.c: Same. * gcc.dg/func-ptr-conv-1.c: Same. * gcc.dg/asm-wide-1.c: Same. * gcc.dg/nofixed-point-2.c: Same. * gcc.dg/cpp/line3.c: Same. * gcc.dg/array-10.c: Same. * gcc.dg/c99-vla-jump-1.c: Same. * gcc.dg/pr20368-1.c: Same. * gcc.dg/Wshadow-3.c: Same. * gcc.dg/c90-const-expr-8.c: Same. * gcc.dg/label-decl-2.c: Same. * gcc.dg/dremf-type-compat-2.c: Same. * gcc.dg/c90-const-expr-5.c: Same. * gcc.dg/builtins-30.c: Same. * gcc.dg/Warray-bounds.c: Same. * gcc.dg/Wcxx-compat-2.c: Same. * gcc.dg/tree-ssa/col-1.c: Same. * gcc.dg/old-style-prom-2.c: Same. * gcc.dg/cast-function-1.c: Same. * gcc.dg/pr15698-1.c: Same. * gcc.dg/dremf-type-compat-3.c: Same. * gcc.dg/vla-8.c: Same. * gcc.dg/gomp/pr27415.c: Move firstprivate diagnostics to correct line. * gcc.dg/label-decl-2.c: Move label diagnostic to correct line. * gcc.dg/old-style-prom-3.c: Check for error on the correct line. * gcc.dg/enum-compat-1.c: Same. * gcc.dg/dremf-type-compat-2.c: Same. * gcc.dg/old-style-prom-2.c: Same. * gcc.dg/pr15698-1.c: Same. * gcc.dg/pr20368-1.c: Same. * gcc.dg/dremf-type-compat-3.c: Same. * gcc.dg/builtins-30.c: Same. Test for columns. gcc/objcp/ * objcp-decl.h (c_end_compound_stmt): New argument. * objcp-decl.c (objcp_start_struct): Add argument. (objcp_finish_struct): Same. gcc/cp/ * typeck.c (cp_build_binary_op): Pass location to overflow_warning. (build_modify_expr): New arg. * semantics.c (finish_unary_op_expr): Pass location to overflow_warning. (handle_omp_for_class_iterator): Pass location to build_modify_expr. * typeck.c (cxx_sizeof_or_alignof_type): Pass location to c_sizeof_or_alignof_type. (build_array_ref): New argument. (build_compound_expr): Same. (build_const_cast): Same. (build_ptrmemfunc): Pass location to build_c_cast. * init.c (avoid_placement_new_aliasing): Pass location to build_stmt. (build_vec_delete_1): Pass location to cp_build_modify_expr, build_compound_expr. * class.c (build_vtbl_ref_1): Pass location to build_array_ref. * decl.c (poplevel): Pass location to c_build_bind_expr. (finish_case_label): Pass location to build_case_label. (finish_constructor_body): Same. (finish_destructor_body): Pass location to build_stmt. (cxx_maybe_build_cleanup): Same, but to build_compound_expr. * call.c (build_new_op): Pass location to build_array_ref. (build_x_va_arg): Pass location to build_va_arg. * except.c (expand_end_catch_block): Pass location to build_stmt. * cp-tree.h (build_array_ref): New argument. (build_compound_expr): Same. (build_c_cast): Same. * cp-gimplify.c (gimplify_if_stmt): Pass location on down. (gimplify_switch_stmt): Same. * typeck2.c (split_nonconstant_init_1): Same. * pt.c (tsubst_copy): Same. * semantics.c (add_decl_expr): Same. (do_poplevel): Same. (push_cleanup): Same. (finish_goto_stmt): Same. (finish_expr_stmt): Same. (begin_if_stmt): Same. (begin_while_stmt): Same. (begin_do_stmt): Same. (finish_return_stmt): Same. (begin_for_stmt): Same. (finish_break_stmt): Same. (finish_continue_stmt): Same. (begin_switch_stmt): Same. (begin_try_block): Same. (begin_handler): Same. (finish_asm_stmt): Same. (finish_label_stmt): Same. (finish_stmt_expr_expr): Same. (finalize_nrv_r): Same. (finish_omp_atomic): Same. * name-lookup.c (do_using_directive): Same. * decl2.c (grok_array_decl): Same. * parser.c (cp_parser_cast_expression): Same. (cp_parser_selection_statement): Same. (cp_parser_implicitly_scoped_statement): Same. (cp_parser_objc_selector_expression): Same. (cp_parser_objc_synchronized_statement): Same. (cp_parser_objc_throw_statement): Same. (cp_parser_omp_critical): Same. (cp_parser_omp_master): Same. * typeck.c (build_function_call): Add location argument. * init.c: Add location argument to all build_decl calls. * class.c: Same. * method.c: Same. * rtti.c: Same. * tree.c: Same. * pt.c: Same. * semantics.c: Same. * lex.c: Same. * decl2.c: Same. * cp-gimplify.c: Same. * decl.c: Same. (cp_make_fname_decl): Add location argument. Pass location ot build_decl. (finish_case_label): Same. * cp-tree.h (finish_case_label): Add location argument. * parser.c (cp_parser_label_for_labeled_statement): Pass location to finish_case_label. gcc/fortran/ * trans-array.c (gfc_trans_allocate_array_storage): Pass location on down. (gfc_trans_array_constructor_value): Same. (gfc_trans_scalarized_loop_end): Same. (gfc_conv_ss_startstride): Same. (gfc_trans_g77_array): Same. (gfc_trans_dummy_array_bias): Same. (gfc_conv_array_parameter): Same. (structure_alloc_comps): Same. * trans-expr.c (gfc_conv_function_call): Same. (fill_with_spaces): Same. (gfc_trans_string_copy): Same. (gfc_trans_scalar_assign): Same. * trans-stmt.c (gfc_trans_goto): Same. (gfc_trans_if_1): Same. (gfc_trans_simple_do): Same. (gfc_trans_do): Same. (gfc_trans_do_while): Same. (gfc_trans_logical_select): Same. (gfc_trans_select): Same. (gfc_trans_forall_loop): Same. (gfc_trans_nested_forall_loop): Same. (generate_loop_for_temp_to_lhs): Same. (generate_loop_for_rhs_to_temp): Same. (gfc_trans_forall_1): Same. (gfc_trans_where_assign): Same. (gfc_trans_where_3): Same. (gfc_trans_allocate): Same. * trans.c (gfc_finish_block): Same. (gfc_trans_runtime_check): Same. (gfc_call_malloc): Same. (gfc_allocate_with_status): Same. (gfc_call_free): Same. (gfc_deallocate_with_status): Same. (gfc_call_realloc): Same. (gfc_trans_code): Same. * trans-decl.c (gfc_init_default_dt): Same. (gfc_generate_constructors): Same. * trans-io.c (gfc_trans_io_runtime_check): Same. * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same. (gfc_conv_intrinsic_fdate): Same. (gfc_conv_intrinsic_ttynam): Same. (gfc_conv_intrinsic_minmax): Same. (gfc_conv_intrinsic_minmax_char): Same. (gfc_conv_intrinsic_anyall): Same. (gfc_conv_intrinsic_count): Same. (gfc_conv_intrinsic_arith): Same. (gfc_conv_intrinsic_minmaxloc): Same. (gfc_conv_intrinsic_minmaxval): Same. (gfc_conv_intrinsic_rrspacing): Same. (gfc_conv_intrinsic_array_transfer): Same. (gfc_conv_intrinsic_trim): Same. (gfc_conv_intrinsic_repeat): Same. From-SVN: r148442
2009-06-13 00:06:47 +02:00
t = build_decl (UNKNOWN_LOCATION,
VAR_DECL, get_identifier ("__stack_chk_guard"),
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
ptr_type_node);
TREE_STATIC (t) = 1;
TREE_PUBLIC (t) = 1;
DECL_EXTERNAL (t) = 1;
TREE_USED (t) = 1;
TREE_THIS_VOLATILE (t) = 1;
DECL_ARTIFICIAL (t) = 1;
DECL_IGNORED_P (t) = 1;
/* Do not share RTL as the declaration is visible outside of
current function. */
x = DECL_RTL (t);
RTX_FLAG (x, used) = 1;
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
stack_chk_guard_decl = t;
}
return t;
}
static GTY(()) tree stack_chk_fail_decl;
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
tree
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
default_external_stack_protect_fail (void)
{
tree t = stack_chk_fail_decl;
if (t == NULL_TREE)
{
t = build_function_type_list (void_type_node, NULL_TREE);
java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt. gcc/java/ * java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt. * expr.c (force_evaluation_order): Same. * typeck.c: Add location to build_decl or PUSH_FIELD calls. * class.c: Same. * decl.c: Same. * jcf-parse.c: Same. * constants.c: Same. * resource.c: Same. * except.c: Same. * builtins.c: Same. * expr.c: Same. * java-tree.h (PUSH_FIELD): Add location field. gcc/objc/ * objc-act.c (finish_var_decl): Pass location to finish_decl. (objc_get_parm_info): Same. (get_super_receiver): Same. * objc-act.c (objc_build_component_ref): Pass location to build_compound_ref. (build_module_initializer_routine): Pass location to c_end_compound_stmt. (objc_generate_static_init_call): Pass location to build_stmt. (build_typed_selector_reference): New location argument. (build_selector_reference): Same. (objc_substitute_decl): Pass location to build_array_ref. (next_sjlj_build_try_catch_finally): Pass location to build_stmt. (objc_begin_catch_clause): Same. (objc_finish_try_stmt): Same. (objc_finish_catch_clause): Pass location to c_end_compound_stmt. (objc_build_throw_stmt): New argument. (generate_shared_structures): Pass location to build_c_cast. (objc_build_message_expr): Use local location. (objc_finish_message_expr): Use input_location. (build_objc_method_call): New argument. (objc_build_selector_expr): Same. (get_super_receiver): Pass location to build_c_cast, build_modify_expr, build_compound_expr. * objc-act.c: Add location to all calls to start_struct, build_decl, finish_struct. gcc/ * tree-pretty-print.c (dump_generic_node): Dump column numbers. * gimple-pretty-print.c (dump_gimple_stmt): Same. * gimplify.c (gimplify_modify_expr): Set location for GIMPLE_ASSIGNs created. * c-parser.c (c_parser_binary_expression): Use current column while building binary operations. * common.opt (fshow-column): Enable by default. * tree-vrp.c (check_array_ref): Use warning_at. (check_array_bounds): Use location from call back if expr has no location. * tree.h: Add location argument to maybe_fold_*. * tree-ssa-ccp.c (ccp_fold): Pass location to maybe_fold_*. (maybe_fold_offset_to_array_ref): Add location argument and use it. (maybe_fold_offset_to_component_ref): Same. (maybe_fold_offset_to_reference): Same. (maybe_fold_offset_to_address): Same. (maybe_fold_stmt_indirect): Same. (maybe_fold_stmt_addition): Same. (fold_stmt_r): Pass location to maybe_fold_*. (fold_gimple_assign): Same. * c-tree.h: Add location argument to finish_decl, default_function_array_conversion, store_init_value. * c-decl.c (define_label): Use error_at. (c_make_fname_decl): Pass location to finish_decl. (finish_decl): New location argument. (build_compound_literal): Pass location to store_init_value. (grokdeclarator): Pass location to finish_decl. (grokfield): Same. * c-typeck.c (array_to_pointer_conversion): New location argument. (function_to_pointer_conversion): Same. (default_function_array_conversion): Same. (parser_build_unary_op): Pass location to overflow_warning. (parser_build_binary_op): Same. Use warning_at. (build_unary_op): Pass location to array_to_pointer_conversion. (build_c_cast): Pass location to digest_init. (build_modify_expr): New location argument. (convert_for_assignment): Same. (store_init_value): Same. (digest_init): Same. (output_init_element): Pass location to digest_init and array_to_pointer_conversion. (c_finish_return): Pass location to convert_for_assignment. * gimplify.c (gimplify_conversion): Pass location to maybe_fold_offset_to_address. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Pass location to maybe_fold_stmt_addition. * c-omp.c (c_finish_omp_atomic): Pass new location to build_modify_expr. (c_finish_omp_for): Same. * c-common.c (overflow_warning): New argument. * c-common.h: New argument to build_modify_expr, overflow_warning. * c-parser.c (c_parser_declaration_or_fndef): Pass location to finish_decl. (c_parser_initializer): Pass location to default_function_array_conversion. (c_parser_initelt): Same. (c_parser_initval): Same. (c_parser_asm_operands): Same. (c_parser_expr_no_commas): Same. Pass location to build_modify_expr. (c_parser_conditional_expression): Same. (c_parser_binary_expression): Add location info to stack. Use it. (c_parser_unary_expression): Pass location to default_function_array_conversion, parser_build_unary_op, build_indirect_ref, c_parser_postfix_expression_after_primary. (c_parser_postfix_expression_after_primary): New location argument. Use it. (c_parser_expression_conv): Pass location to default_function_array_conversion. (c_parser_expr_list): Same. (c_parser_omp_atomic): Same. (c_parser_omp_for_loop): Same. * c-tree.h: (struct c_declarator): Add comment to id_loc. (build_array_declarator): New argument. * c-decl.c (build_array_declarator): Add location argument. (grokdeclarator): Set id_loc for cdk_array. * c-parser.c (c_parser_direct_declarator_inner): Pass location to build_array_declarator. * tree.c (build_omp_clause): Add location argument. * tree.h (OMP_CLAUSE_HAS_LOCATION): New macro. (OMP_CLAUSE_LOCATION): New macro. (struct tree_omp_clause): Add location field. (build_omp_clause): Add argument. * testsuite/gcc.dg/gomp/for-1.c: Fix column. * cp/pt.c (tsubst_omp_for_iterator): Pass location to build_omp_clause. * cp/parser.c (cp_parser_omp_var_list_no_open): Same. (cp_parser_omp_clause_collapse): Same. (cp_parser_omp_clause_default): Same. (cp_parser_omp_clause_if): Same. (cp_parser_omp_clause_nowait): Same. (cp_parser_omp_clause_num_threads): Same. (cp_parser_omp_clause_ordered): Same. (cp_parser_omp_clause_schedule): Same. (cp_parser_omp_clause_untied): Same. (cp_parser_omp_for_loop): Same. (cp_parser_omp_parallel): Pass location to c_split_parallel_clauses. * c-tree.h (c_start_case): Add location argument. (c_process_expr_stmt): Same. (c_finish_goto_*): Same. * tree-parloops.c (initialize_reductions): Pass location to build_omp_clause. (create_parallel_loop): Same. * fortran/trans-openmp.c (gfc_trans_omp_variable_list): Same. (gfc_trans_omp_reduction_list): Same. (gfc_trans_omp_clauses): Same. (gfc_trans_omp_do): Same. * c-typeck.c (c_finish_goto_label): Same. (c_finish_goto_ptr): New location argument. (c_start_case): Same. (emit_side_effect_warnings): Same. (c_process_expr_stmt): Same. (c_finish_stmt_expr): Same. (c_finish_omp_clauses): Use error_at instead of error. * gimplify.c (gimplify_adjust_omp_clauses_1): Pass location to build_omp_clause. * c-omp.c (c_split_parallel_clauses): New location argument. * tree-nested.c (convert_nonlocal_reference_stmt): Pass location to build_omp_clause. (convert_local_reference_stmt): Same. (convert_gimple_call): Same. * c-common.h (c_split_parallel_clauses): New argument. * c-parser.c (c_parser_statement_after_labels): Pass location to c_finish_goto_label. (c_parser_switch_statement): Pass location to c_start_case. (c_parser_for_statement): Pass location to c_finish_expr_stmt, and c_process_expr_stmt. (c_parser_omp_variable_list): Add location argument. (c_parser_omp_clause_collapse): Pass location to build_omp_clause. (c_parser_omp_clause_default): Same. (c_parser_omp_clause_if): Same. (c_parser_omp_clause_num_threads): Same. (-c_parser_omp_clause_ordered): Same. (c_parser_omp_clause_reduction): Pass location to c_parser_omp_variable_list. (c_parser_omp_clause_schedule): Pass location to build_omp_clause. (c_parser_omp_clause_untied): Same. (c_parser_omp_for_loop): Pass location to c_process_expr_stmt. (c_parser_omp_parallel): Pass location to c_split_parallel_clauses. * c-tree.h (check_for_loop_decls, undeclared_variable, build_component_ref, build_array_ref, build_external_ref, c_expr_sizeof_expr, c_expr_sizeof_type, parser_build_unary_op, build_conditional_expr, build_compound_expr, c_cast_expr, build_c_cast, build_asm_expr, c_end_compound_stmt, c_finish_stmt_expr, c_finish_return, c_finish_omp_parallel, c_finish_omp_task): New argument. * c-semantics.c (build_stmt): Same. (build_case_label): Same. * c-decl.c (c_finish_incomplete_decl): Pass location on down. (undeclared_variable): New argument. (make_label): Same. (lookup_label): Pass location on down. (define_label): Same. (finish_decl): Same. (build_compound_literal): Same. (finish_struct): Same. (finish_function): Do not set location here. (check_for_loop_decls): New argument. * tree.c (save_expr): Set location. (build_empty_stmt): New argument. * tree.h (build_empty_stmt): New argument to build_empty_stmt. (CAN_HAVE_LOCATION_P): Make sure we have a non empty node. * builtins.c (gimplify_va_arg_expr): Use locations. (expand_builtin_sync_operation): Same. * c-typeck.c (build_component_ref): New argument. (build_array_ref): Same. (build_external_ref): Same. (c_expr_sizeof_expr): Same. (c_expr_sizeof_type): Same. (parser_build_unary_op): Same. (build_conditional_expr): Same. (build_compound_expr): Pass location on down. (build_compound_expr): New argument. (build_c_cast): Same. (c_cast_expr): Same. (build_asm_expr): Same. (c_finish_return): Same. (c_process_expr_stmt): Pass location on down. (c_finish_stmt_expr): New argument. (push_clenaup): Same. (c_finish_omp_parallel): Same. (c_finish_omp_task): Same. * gimplify.c (gimplify_call_expr): Pass location on down. * c-omp.c (c_finish_omp_master): New argument. (c_finish_omp_critical): Same. (c_finish_omp_ordered): Same. (c_finish_omp_barrier): Same. (-c_finish_omp_taskwait): Same. (c_finish_omp_atomic): Same. (c_finish_omp_flush): Same. * tree-inline.c (copy_tree_body_r): Pass location on down. (inline_forbidden_p): Remove use of input_location. * c-gimplify.c (c_build_bind_expr): New argument. * c-common.c (c_common_truthvalue_conversion): Pass location on down. (c_sizeof_or_alignof_type): New argument. (c_alignof_expr): Same. (build_va_arg): Same. (c_add_case_label): Same. * c-common.h (c_sizeof_or_alignof_type, c_alignof_expr, c_sizeof, c_alignof, build_va_arg, build_stmt, build_case_label, c_build_bind_expr, objc_build_selector_expr, objc_build_throw_stmt, c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered, c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush, c_finish_omp_taskwait, c_finish_omp_for, c_split_parallel_clauses): New argument. * stub-objc.c (objc_build_selector_expr): Same. (objc_build_throw_stmt): Same. * c-parser.c (c_parser_declaration_or_fndef): Pass location on down. (c_parser_initelt): Same. (c_parser_compound_statement): Same. (c_parser_compound_statement_nostart): Same. (c_parser_label): Same. (c_parser_statement_after_labels): Same. (c_parser_if_body): Same. (c_parser_else_body): Same. (c_parser_if_statement): Same. (c_parser_switch_statement): Same. (c_parser_while_statement): Same. (c_parser_do_statement): Same. (c_parser_for_statement): Same. (c_parser_asm_statement): Same. (c_parser_conditional_expression): Same. (c_parser_binary_expression): Same. (c_parser_cast_expression): Same. (c_parser_unary_expression): Same. (c_parser_sizeof_expression): Same. (c_parser_alignof_expression): Same. (c_parser_postfix_expression): Same. (c_parser_expression): Same. (c_parser_objc_receiver): Same. (c_parser_omp_variable_list): Same. (c_parser_omp_structured_block): Same. (c_parser_omp_atomic): New argument. (c_parser_omp_barrier): Same. (c_parser_omp_critical): Same. (c_parser_omp_flush): Pass location on down. (c_parser_omp_for_loop): New argument. (c_parser_omp_for): Same. (c_parser_omp_master): Same. (c_parser_omp_ordered): Same. (c_parser_omp_sections_scope): Same. (c_parser_omp_sections): Same. (c_parser_omp_parallel): Same. (c_parser_omp_single): Same. (c_parser_omp_task): Same. (c_parser_omp_taskwait): Pass location on down. (c_parser_omp_construct): Same. (c_parser_omp_threadprivate): Same. * dwarf2asm.c, targhooks.c, optabs.c, tree.c, tree.h, target.h, builtins.c, omp-low.c, cgraphunit.c, tree-call-cdce.c, tree-ssa-alias.c, gimple-low.c, c-tree.h, expr.c, tree-parloops.c, c-decl.c, tree-eh.c, langhooks.c, function.c, stor-layout.c, c-typeck.c, gimplify.c, c-pragma.c, expmed.c, except.c, coverage.c, emit-rtl.c, cfgexpand.c, tree-mudflap.c, varasm.c, tree-nested.c, rtl.h, tree-inline.c, tree-profile.c, c-common.c, c-common.h, tree-switch-conversion.c, tree-cfg.c, ipa-struct-reorg.c, c-parser.c, config/i386/i386.c, stmt.c: Add location argument to the following function definitions and/or function calls: build_decl, objcp_start_struct, objcp_finish_struct, start_struct, finish_struct, PUSH_FIELD, create_artificial_label, cp_make_fname_decl, pushtag, implicitly_declare, c_make_fname_decl, build_compound_literal, parser_xref_tag, resolve_overloaded_builtin, do_case, c_finish_bc_stmt, build_compound_literal, build_function_call. * c-decl.c (build_compound_literal): Add location argument. Make all diagnostic calls use location. (start_struct): Same. (finish_struct): Same. (start_enum): Same. (build_enumerator): Same. (start_function): Same. (grokdeclarator): Make all diagnostic calls use location. (store_parm_decls_oldstyle): Same. * c-typeck.c (build_function_call): Add location argument. Make all diagnostic calls use location. (do_case): Same. (c_finish_bc_stmt): Same. * tree-nested.c (get_trampoline_type): Add argument. Pass location to build_decl. (lookup_tramp_for_decl): Pass location to get_trampoline_type. * rtl.h (RTL_LOCATION): New. * c-common.c (c_add_case_label): Add location argument. Make all diagnostic calls use location. * c-common.h: Add location argument to make_fname_decl, do_case, c_add_case_label, build_function_call, resolve_overloaded_builtin. * c-parser.c (c_parser_enum_specifier): Rename ident_loc to enum_loc. Set it appropriately for every case. Pass enum_loc to start_enum call. Pass value_loc first to build_enumerator. Pass enum_loc to parser_xref_tag. (c_parser_struct_or_union_specifier): Save location. Use it for start_struct, finish_struct, and parser_xref_tag. gcc/testsuite/ * gcc.dg/old-style-prom-3.c: Add column info. * gcc.dg/overflow-warn-1.c * gcc.dg/gomp/pr27415.c * gcc.dg/gomp/for-1.c: Same. * gcc.dg/enum-compat-1.c: Same. * gcc.dg/c99-tag-3.c: Same. * gcc.dg/Wredundant-decls-2.c: Same. * gcc.dg/func-ptr-conv-1.c: Same. * gcc.dg/asm-wide-1.c: Same. * gcc.dg/nofixed-point-2.c: Same. * gcc.dg/cpp/line3.c: Same. * gcc.dg/array-10.c: Same. * gcc.dg/c99-vla-jump-1.c: Same. * gcc.dg/pr20368-1.c: Same. * gcc.dg/Wshadow-3.c: Same. * gcc.dg/c90-const-expr-8.c: Same. * gcc.dg/label-decl-2.c: Same. * gcc.dg/dremf-type-compat-2.c: Same. * gcc.dg/c90-const-expr-5.c: Same. * gcc.dg/builtins-30.c: Same. * gcc.dg/Warray-bounds.c: Same. * gcc.dg/Wcxx-compat-2.c: Same. * gcc.dg/tree-ssa/col-1.c: Same. * gcc.dg/old-style-prom-2.c: Same. * gcc.dg/cast-function-1.c: Same. * gcc.dg/pr15698-1.c: Same. * gcc.dg/dremf-type-compat-3.c: Same. * gcc.dg/vla-8.c: Same. * gcc.dg/gomp/pr27415.c: Move firstprivate diagnostics to correct line. * gcc.dg/label-decl-2.c: Move label diagnostic to correct line. * gcc.dg/old-style-prom-3.c: Check for error on the correct line. * gcc.dg/enum-compat-1.c: Same. * gcc.dg/dremf-type-compat-2.c: Same. * gcc.dg/old-style-prom-2.c: Same. * gcc.dg/pr15698-1.c: Same. * gcc.dg/pr20368-1.c: Same. * gcc.dg/dremf-type-compat-3.c: Same. * gcc.dg/builtins-30.c: Same. Test for columns. gcc/objcp/ * objcp-decl.h (c_end_compound_stmt): New argument. * objcp-decl.c (objcp_start_struct): Add argument. (objcp_finish_struct): Same. gcc/cp/ * typeck.c (cp_build_binary_op): Pass location to overflow_warning. (build_modify_expr): New arg. * semantics.c (finish_unary_op_expr): Pass location to overflow_warning. (handle_omp_for_class_iterator): Pass location to build_modify_expr. * typeck.c (cxx_sizeof_or_alignof_type): Pass location to c_sizeof_or_alignof_type. (build_array_ref): New argument. (build_compound_expr): Same. (build_const_cast): Same. (build_ptrmemfunc): Pass location to build_c_cast. * init.c (avoid_placement_new_aliasing): Pass location to build_stmt. (build_vec_delete_1): Pass location to cp_build_modify_expr, build_compound_expr. * class.c (build_vtbl_ref_1): Pass location to build_array_ref. * decl.c (poplevel): Pass location to c_build_bind_expr. (finish_case_label): Pass location to build_case_label. (finish_constructor_body): Same. (finish_destructor_body): Pass location to build_stmt. (cxx_maybe_build_cleanup): Same, but to build_compound_expr. * call.c (build_new_op): Pass location to build_array_ref. (build_x_va_arg): Pass location to build_va_arg. * except.c (expand_end_catch_block): Pass location to build_stmt. * cp-tree.h (build_array_ref): New argument. (build_compound_expr): Same. (build_c_cast): Same. * cp-gimplify.c (gimplify_if_stmt): Pass location on down. (gimplify_switch_stmt): Same. * typeck2.c (split_nonconstant_init_1): Same. * pt.c (tsubst_copy): Same. * semantics.c (add_decl_expr): Same. (do_poplevel): Same. (push_cleanup): Same. (finish_goto_stmt): Same. (finish_expr_stmt): Same. (begin_if_stmt): Same. (begin_while_stmt): Same. (begin_do_stmt): Same. (finish_return_stmt): Same. (begin_for_stmt): Same. (finish_break_stmt): Same. (finish_continue_stmt): Same. (begin_switch_stmt): Same. (begin_try_block): Same. (begin_handler): Same. (finish_asm_stmt): Same. (finish_label_stmt): Same. (finish_stmt_expr_expr): Same. (finalize_nrv_r): Same. (finish_omp_atomic): Same. * name-lookup.c (do_using_directive): Same. * decl2.c (grok_array_decl): Same. * parser.c (cp_parser_cast_expression): Same. (cp_parser_selection_statement): Same. (cp_parser_implicitly_scoped_statement): Same. (cp_parser_objc_selector_expression): Same. (cp_parser_objc_synchronized_statement): Same. (cp_parser_objc_throw_statement): Same. (cp_parser_omp_critical): Same. (cp_parser_omp_master): Same. * typeck.c (build_function_call): Add location argument. * init.c: Add location argument to all build_decl calls. * class.c: Same. * method.c: Same. * rtti.c: Same. * tree.c: Same. * pt.c: Same. * semantics.c: Same. * lex.c: Same. * decl2.c: Same. * cp-gimplify.c: Same. * decl.c: Same. (cp_make_fname_decl): Add location argument. Pass location ot build_decl. (finish_case_label): Same. * cp-tree.h (finish_case_label): Add location argument. * parser.c (cp_parser_label_for_labeled_statement): Pass location to finish_case_label. gcc/fortran/ * trans-array.c (gfc_trans_allocate_array_storage): Pass location on down. (gfc_trans_array_constructor_value): Same. (gfc_trans_scalarized_loop_end): Same. (gfc_conv_ss_startstride): Same. (gfc_trans_g77_array): Same. (gfc_trans_dummy_array_bias): Same. (gfc_conv_array_parameter): Same. (structure_alloc_comps): Same. * trans-expr.c (gfc_conv_function_call): Same. (fill_with_spaces): Same. (gfc_trans_string_copy): Same. (gfc_trans_scalar_assign): Same. * trans-stmt.c (gfc_trans_goto): Same. (gfc_trans_if_1): Same. (gfc_trans_simple_do): Same. (gfc_trans_do): Same. (gfc_trans_do_while): Same. (gfc_trans_logical_select): Same. (gfc_trans_select): Same. (gfc_trans_forall_loop): Same. (gfc_trans_nested_forall_loop): Same. (generate_loop_for_temp_to_lhs): Same. (generate_loop_for_rhs_to_temp): Same. (gfc_trans_forall_1): Same. (gfc_trans_where_assign): Same. (gfc_trans_where_3): Same. (gfc_trans_allocate): Same. * trans.c (gfc_finish_block): Same. (gfc_trans_runtime_check): Same. (gfc_call_malloc): Same. (gfc_allocate_with_status): Same. (gfc_call_free): Same. (gfc_deallocate_with_status): Same. (gfc_call_realloc): Same. (gfc_trans_code): Same. * trans-decl.c (gfc_init_default_dt): Same. (gfc_generate_constructors): Same. * trans-io.c (gfc_trans_io_runtime_check): Same. * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same. (gfc_conv_intrinsic_fdate): Same. (gfc_conv_intrinsic_ttynam): Same. (gfc_conv_intrinsic_minmax): Same. (gfc_conv_intrinsic_minmax_char): Same. (gfc_conv_intrinsic_anyall): Same. (gfc_conv_intrinsic_count): Same. (gfc_conv_intrinsic_arith): Same. (gfc_conv_intrinsic_minmaxloc): Same. (gfc_conv_intrinsic_minmaxval): Same. (gfc_conv_intrinsic_rrspacing): Same. (gfc_conv_intrinsic_array_transfer): Same. (gfc_conv_intrinsic_trim): Same. (gfc_conv_intrinsic_repeat): Same. From-SVN: r148442
2009-06-13 00:06:47 +02:00
t = build_decl (UNKNOWN_LOCATION,
FUNCTION_DECL, get_identifier ("__stack_chk_fail"), t);
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
TREE_STATIC (t) = 1;
TREE_PUBLIC (t) = 1;
DECL_EXTERNAL (t) = 1;
TREE_USED (t) = 1;
TREE_THIS_VOLATILE (t) = 1;
TREE_NOTHROW (t) = 1;
DECL_ARTIFICIAL (t) = 1;
DECL_IGNORED_P (t) = 1;
DECL_VISIBILITY (t) = VISIBILITY_DEFAULT;
DECL_VISIBILITY_SPECIFIED (t) = 1;
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
stack_chk_fail_decl = t;
}
tree.h (enum tree_code_class): Add tcc_vl_exp. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree.h (enum tree_code_class): Add tcc_vl_exp. (VL_EXP_CLASS_P): New. (TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (TREE_OPERAND_CHECK_CODE): Likewise. (GIMPLE_STMT_OPERAND_CHECK): Likewise. (TREE_RTL_OPERAND_CHECK): Likewise. (tree_operand_check_failed): Make second parameter the whole tree instead of its code. Fixed callers. (VL_EXP_CHECK): New. (TREE_OPERAND_LENGTH): New. (VL_EXP_OPERAND_LENGTH): New. (CALL_EXPR_FN): New. (CALL_EXPR_STATIC_CHAIN): New. (CALL_EXPR_ARGS): New. (CALL_EXPR_ARG): New. (call_expr_nargs): New. (CALL_EXPR_ARGP): New. (build_nt_call_list): Declare. (build_vl_exp_stat): Declare. (build_vl_exp): New. (build_call_list): Declare. (build_call_nary): Declare. (build_call_valist): Declare. (build_call_array): Declare. (call_expr_arg): Declare. (call_expr_argp): Declare. (call_expr_arglist): Declare. (fold_build_call_list): Declare. (fold_build_call_list_initializer): Declare. (fold_call_expr): Declare to replace fold_builtin. (fold_builtin_fputs): Update to agree with modified definition. (fold_builtin_strcpy): Likewise. (fold_builtin_strncpy): Likewise. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_next_arg): Likewise. (fold_build_call_expr): Declare. (fold_builtin_call_list): Declare. (fold_builtin_call_valist): Declare. (build_call_expr): Declare. (validate_arglist): Update to agree with modified definition. (tree_operand_length): New. (call_expr_arg_iterator): New. (init_call_expr_arg_iterator): New. (next_call_expr_arg): New. (first_call_expr_arg): New. (more_call_expr_args_p): New. (FOR_EACH_CALL_EXPR_ARG): New. * tree.c (tree_code_class_string): Add entries for tcc_vl_exp and tcc_gimple_stmt. (tree_code_size): Update documentation. Use sizeof (tree) rather than sizeof (char *). (tree_size): Likewise. Add case for tcc_vl_exp. (tree_node_structure): Add case for tcc_vl_exp. (contains_placeholder_p): Likewise. (substitute_in_expr): Likewise. (substitute_placeholder_in_expr): Likewise. (stabilize_reference_1): Likewise. (build3_stat): Remove logic for CALL_EXPRs. Replace with assertion to diagnose breakage of this interface for constructing CALL_EXPRs. (build_nt): Add similar assertion here. (build_nt_call_list): New. (simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors. (iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (get_callee_fndecl): Use new CALL_EXPR accessors. (tree_operand_check_failed): Change parameters to pass entire node instead of its code, so that we can call TREE_OPERAND_LENGTH on it. (process_call_operands): New. (build_vl_exp_stat): New. (build_call_list): New. (build_call_nary): New. (build_call_valist): New. (build_call_array): New. (walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (call_expr_arglist): New. * tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use tcc_vl_exp instead of a fixed-size tcc_expression. * doc/c-tree.texi (CALL_EXPR): Document new representation and accessors for CALL_EXPRs. (AGGR_INIT_EXPR): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * builtins.c (c_strlen): Return NULL_TREE instead of 0. (expand_builtin_nonlocal_goto): Change parameter to be entire CALL_EXPR instead of an arglist. Use new CALL_EXPR accessors. (expand_builtin_prefetch): Likewise. (expand_builtin_classify_type): Likewise. (mathfn_built_in): Return NULL_TREE instead of 0. (expand_errno_check): Use new CALL_EXPR accessors. (expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_mathfn_2): Likewise. (expand_builtin_mathfn_3): Likewise. (expand_builtin_interclass_mathfn): Likewise. (expand_builtin_sincos): Likewise. (expand_builtin_cexpi): Likewise. (expand_builtin_int_roundingfn): Likewise. (expand_builtin_int_roundingfn_2): Likewise. (expand_builtin_pow): Likewise. (expand_builtin_powi): Likewise. (expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead of arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_strstr): Likewise. (expand_builtin_strchr): Likewise. (expand_builtin_strrchr): Likewise. (expand_builtin_strpbrk): Likewise. (expand_builtin_memcpy): Likewise. (expand_builtin_mempcpy): Likewise. (expand_builtin_mempcpy_args): New. (expand_builtin_memmove): Similarly to expand_builtin_mempcpy. (expand_builtin_memmove_args): New. (expand_builtin_bcopy): Similarly to expand_builtin_mempcpy. (expand_movstr): Likewise. (expand_builtin_strcpy): Likewise. (expand_builtin_strcpy_args): New. (expand_builtin_stpcpy): Similarly to expand_builtin_strcpy. (expand_builtin_strncpy): Likewise. (expand_builtin_memset): Likewise. (expand_builtin_memset_args): New. (expand_builtin_bzero): Similarly to expand_builtin_memset. (expand_builtin_memcmp): Likewise. (expand_builtin_strcmp): Likewise. (expand_builtin_strncmp): Likewise. (expand_builtin_strcat): Likewise. (expand_builtin_strncat): Likewise. (expand_builtin_strspn): Likewise. (expand_builtin_strcspn): Likewise. (expand_builtin_args_info): Likewise. (expand_builtin_va_start): Likewise. (gimplify_va_arg_expr): Likewise. (expand_builtin_va_end): Likewise. (expand_builtin_va_copy): Likewise. (expand_builtin_frame_address): Likewise. (expand_builtin_alloca): Likewise. (expand_builtin_bswap): Likewise. (expand_builtin_unop): Likewise. (expand_builtin_fputs): Likewise. (expand_builtin_expect): Likewise. (expand_builtin_fabs): Likewise. (expand_builtin_copysign): Likewise. (expand_builtin_printf): Likewise. (expand_builtin_fprintf): Likewise. (expand_builtin_sprintf): Likewise. (expand_builtin_init_trampoline): Likewise. (expand_builtin_signbit): Likewise. (expand_builtin_fork_or_exec): Likewise. (expand_builtin_sync_operation): Likewise. (expand_builtin_compare_and_swap): Likewise. (expand_builtin_lock_test_and_set): Likewise. (expand_builtin_lock_release): Likewise. (expand_builtin): Likewise. (builtin_mathfn_code): Likewise. (fold_builtin_constant_p): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_expect): Likewise. (fold_builtin_classify_type): Likewise. (fold_builtin_strlen): Likewise. (fold_builtin_nan): Likewise. (integer_valued_real_p): Likewise. (fold_trunc_transparent_mathfn): Likewise. (fold_fixed_mathfn): Likewise. (fold_builtin_cabs): Likewise. (fold_builtin_sqrt): Likewise. (fold_builtin_cbrt): Likewise. (fold_builtin_cos): Likewise. (fold_builtin_cosh): Likewise. (fold_builtin_tan): Likewise. (fold_builtin_sincos): Likewise. (fold_builtin_cexp): Likewise. (fold_builtin_trunc): Likewise. (fold_builtin_floor): Likewise. (fold_builtin_ceil): Likewise. (fold_builtin_round): Likewise. (fold_builtin_int_roundingfn): Likewise. (fold_builtin_bitop): Likewise. (fold_builtin_bswap): Likewise. (fold_builtin_logarithm): Likewise. (fold_builtin_hypot): Likewise. (fold_builtin_pow): Likewise. (fold_builtin_powi): Likewise. (fold_builtin_exponent): Likewise. (fold_builtin_memset): Likewise. (fold_builtin_bzero): Likewise. (fold_builtin_memory_op): Likewise. (fold_builtin_bcopy): Deleted; call site changed to invoke fold_builtin_memory_op directly. (fold_builtin_strcpy): Similarly as for fold_builtin_memory_op. (fold_builtin_strncpy): Likewise. (fold_builtin_memcmp): Likewise. (fold_builtin_strcmp): Likewise. (fold_builtin_strncmp): Likewise. (fold_builtin_signbit): Likewise. (fold_builtin_copysign): Likewise. (fold_builtin_isascii): Likewise. (fold_builtin_toascii): Likewise. (fold_builtin_isdigit): Likewise. (fold_builtin_fabs): Likewise. (fold_builtin_abs): Likewise. (fold_builtin_fmin_fmax): Likewise. (fold_builtin_carg): Likewise. (fold_builtin_classify): Likewise. (fold_builtin_unordered_cmp): Likewise. (fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4): New functions split out from fold_builtin_1. (fold_builtin_n): New. (fold_builtin_varargs): New. (fold_builtin): Deleted. Most callers changed to use fold_call_expr instead. (fold_call_expr): New. (build_function_call_expr): Rewrite to use new helper function. (fold_builtin_call_list): New. (build_call_expr): New. (fold_builtin_call_valist): New. (rewrite_call_expr): New. (validate_arg): New. (validate_arglist): Change parameter to be entire CALL_EXPR instead of an arglist. Change return type to bool. Use new CALL_EXPR accessors. (fold_builtin_strstr): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (fold_builtin_strncat): Likewise. (fold_builtin_strspn): Likewise. (fold_builtin_strcspn): Likewise. (fold_builtin_fputs): Likewise. (fold_builtin_next_arg): Likewise. (fold_builtin_sprintf): Likewise. (expand_builtin_object_size): Use new CALL_EXPR accessors. Use NULL_RTX instead of 0. (expand_builtin_memory_chk): Likewise. (maybe_emit_chk_warning): Likewise. (maybe_emit_sprintf_chk_warning): Likewise. (fold_builtin_object_size): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strncat_chk): Likewise. (fold_builtin_sprintf_chk): Likewise. (fold_builtin_snprintf_chk): Likewise. (fold_builtin_printf): Likewise. (fold_builtin_vprintf): Likewise. * fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and constructors. (operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case. (make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (extract_muldiv_1): Add VL_EXP_CLASS_P case. (fold_mathfn_compare): Use new CALL_EXPR accessors and constructors. (fold_unary): Likewise. (fold_binary): Likewise. (fold_ternary): Remove CALL_EXPR case, since they are no longer ternary expressions. (fold): Add logic for tcc_vl_exp. (fold_checksum_tree): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (fold_build3_stat): Add assertion to flag broken interface for constructing CALL_EXPRs. (fold_build_call_list): New. (fold_build_call_list_initializer): New. (tree_expr_nonnegative_p): Use new CALL_EXPR accessors and constructors. (fold_strip_sign_ops): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR accessors and dump arguments explicitly. * tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (dump_generic_node): Use new CALL_EXPR accessors and walk arguments explicitly. (print_call_name): Use new CALL_EXPR accessors. * print-tree.c (print_node): Add case tcc_vl_exp. Print CALL_EXPR arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors. (vrp_visit_stmt): Likewise. * tree-ssa-loop-im.c (outermost_invariant_loop_expr): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (force_move_till_expr): Likewise. * targhooks.c (default_external_stack_protect_fail): Use build_call_expr instead of build_function_call_expr. (default_hidden_stack_protect_fail): Likewise. * tree-complex.c (expand_complex_libcall): Use build_call_expr to build the call. * cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors and walk arguments explicitly. * tree-ssa-loop-niter.c (simplify_replace_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_simple_operations): Likewise. (infer_loop_bounds_from_array): Use new CALL_EXPR accessors. * gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs. * optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * value_prof.c (tree_ic): Use new CALL_EXPR accessors. (tree_ic_transform): Likewise. (interesting_stringop_to_profile_p): Pass entire CALL_EXPR as parameter instead of arglist. Fix callers. (tree_stringop_fixed_value): Use new CALL_EXPR accessors. (tree_stringops_transform): Likewise. (tree_indirect_call_to_profile): Likewise. (tree_stringops_values_to_profile): Likewise. * tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator. (eliminate_tail_call): Likewise. * ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (instantiate_parameters_1): Can't handle tcc_vl_exp here. * omp-low.c (build_omp_barrier): Use build_call_expr. (lower_rec_input_clauses): Likewise. (lower_reduction_clauses): Likewise. (expand_parallel_call): Likewise. (maybe_catch_exception): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_sections): Likewise. (lower_omp_single_simple): Likewise. (lower_omp_single_copy): Likewise. (lower_omp_master): Likewise. (lower_omp_ordered): Likewise. (lower_omp_critical): Likewise. * ipa-reference.c (check-call): Use new CALL_EXPR iterator. (scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR. * tree-gimple.c (is_gimple_call_addr): Fix doc. (recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. Add tcc_vl_exp case. * tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (chrec_contains_undetermined): Likewise. (tree_contains_chrecs): Likewise. (evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH. * cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors. * tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors. Use fold_call_expr instead of fold_builtin. (ccp_fold_builtin): Likewise. Update calls into builtins.c to match declarations there. (fold_stmt): Use new CALL_EXPR constructor and accessors. Doc updates. * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-pure-const.c (check_call): Use new CALL_EXPR accessors. (scan_function): Add case tcc_vl_exp for CALL_EXPR. * tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR accessors. * tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr. (execute_cse_sincos): Use new CALL_EXPR accessors. * tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator. * gimple-low.c (lower_function_body): Use build_call_expr. (lower_builtin_setjmp): Likewise. * expr.c (emit_block_move_via_libcall): Use build_call_expr. (set_storage_via_libcall): Likewise. (safe_from_p): Add tcc_vl_exp case. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_expr_real_1): Use new CALL_EXPR accessors. * tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (TB_parent_eq): Likewise. * predict.c (expr_expected_value): Use new CALL_EXPR accessors. (strip_builtin_expect): Likewise. * function.c (gimplify_parameters): Use build_call_expr. * tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-type-escape.c (check_call): Use new CALL_EXPR iterators. (scan_for_refs): Add case tcc_vl_exp for CALL_EXPR. * tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR iterators. * gimplify.c (build_stack_save_restore): Use build_call_expr. (gimplify_decl_expr): Likewise. (gimplify_call_expr): Use fold_call_expr instead of fold_builtin. Use new CALL_EXPR iterators. (gimplify_modify_expr_to_memcpy): Use build_call_expr. (gimplify_modify_expr_to_memset): Likewise. (gimplify_variable_sized_compare): Likewise. (gimplify_omp_atomic_fetch_op): Likewise. (gimplify_omp_atomic_pipeline): Likewise. (gimplify_omp_atomic_mutex): Likewise. (gimplify_function_tree): Likewise. * calls.c (alloca_call_p): Use new CALL_EXPR accessors. (call_expr_flags): Likewise. (expand_call): Likewise. * except.c (expand_builtin_eh_return_data_regno): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. * coverage.c (create_coverage): Use build_call_expr. * tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete. (temp_call_expr_obstack): New. (pool_copy_list): Delete. (temp_copy_call_expr): New. (phi_translate): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. Get rid of special goo for copying argument lists and use temp_copy_call_expr instead. (valid_in_sets): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. (create_expression_by_pieces): Likewise. Use build_call_array to construct the result instead of fold_build3. (create_value_expr_from): Add tcc_vl_exp. Delete special goo for dealing with argument lists. (init_pre): Remove references to expression_node_pool and list_node_pool. Init temp_call_expr_obstack instead. (fini_pre): Remove references to expression_node_pool and list_node_pool. * tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors and walk arguments explicitly instead of as a list. * tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr. (mx_register_decls): Likewise. (mudflap_register_call): Likewise. (mudflap_finish_file): Likewise. * ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors. (ipa_callsite_compute_param): Likewise. * tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR accessors and constructor. * tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR accessors and constructor. (convert_tramp_reference): Likewise. (convert_call_expr): Likewise. (finalize_nesting_tree_1): Likewise. * tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR accessors. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr. * tree-inline.c (initialize_inlined_parameters): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. (estimate_num_insns_1): Use new CALL_EXPR accessors. (expand_call_inline): Tidy up call to initialize_inlined_parameters. * tree-vect-transform.c (vect_create_epilog_for_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (vectorizable_reduction): Likewise. (vectorizable_call): Use new CALL_EXPR iterators. (vectorizable_conversion): Use build_call_expr. (vectorizable_operation): Use TREE_OPERAND_LENGTH. (vect_gen_widened_results_half): Use build_call_expr. (vect_setup_realignment): Likewise. (vectorizable_live_operation): Use TREE_OPERAND_LENGTH. * tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors. (pass_through_call): Likewise. (compute_object_sizes): Likewise. Use fold_call_expr instead of fold_builtin. * tree-profile.c (tree_gen_interval_profiler): Use build_call_expr. (tree_gen_pow2_profiler): Likewise. (tree_gen_one_value_profiler): Likewise. (tree_gen_ic_func_profiler): Likewise. (tree_gen_average_profiler): Likewise. (tree_gen_ior_profiler): Likewise. * tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp. (find_func_aliases): Use new CALL_EXPR accessors. Add case tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * convert.c (convert_to_real): Use new CALL_EXPR accessors and constructor. (convert_to_integer): Likewise. * tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR accessors. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr. (sparc_expand_builtin): Use new CALL_EXPR accessors. * config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise. (ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors on it. Fix callers. (ix86_expand_store_builtin): Likewise. (ix86_expand_unop_builtin): Likewise. (ix86_expand_unop1_builtin): Likewise. (ix86_expand_sse_compare): Likewise. (ix86_expand_sse_comi): Likewise. (ix86_expand_vec_init_builtin): Likewise. (ix86_expand_vec_ext_builtin): Likewise. (ix86_expand_vec_set_builtin): Likewise. (ix86_expand_builtin): Use new CALL_EXPR accessors. * config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (iq2000_expand_builtin): Use new CALL_EXPR accessors. * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use build_call_expr. * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise. (rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_abs_builtin): Likewise. (rs6000_expand_binop_builtin): Likewise. (altivec_expand_predicate_builtin): Likewise. (altivec_expand_lv_builtin): Likewise. (spe_expand_stv_builtin): Likewise. (altivec_expand_stv_builtin): Likewise. (rs6000_expand_ternop_builtin): Likewise. (altivec_expand_ld_builtin): Use new CALL_EXPR accessors. (altivec_expand_st_builtin): Likewise. (altivec_expand_dst_builtin): Likewise. (altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_vec_set_builtin): Likewise. (altivec_expand_vec_ext_builtin): Likewise. (altivec_expand_builtin): Use new CALL_EXPR accessors. (spe_expand_builtin): Likewise. (spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (spe_expand_evsel_builtin): Likewise. (rs6000_expand_builtin): Use new CALL_EXPR accessors. VCFUX and FCFSX cases must construct whole new CALL_EXPR, not just arglist. * config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (arm_expand_unop_builtin): Likewise. (arm_expand_builtin): Use new CALL_EXPR accessors. * config/mips/mips.c (mips_expand_builtin): Use new CALL_EXPR accessors. * config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (bfin_expand_unop_builtin): Likewise. (bfin_expand_builtin): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * c-semantics.c (build_stmt): Add internal diagnostic check. * c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR accessors. Print arguments explicitly instead of as a list. * c-typeck.c (build_function_call): Use new CALL_EXPR constructors. * c-omp.c (c_finish_omp_barrier): Use build_call_expr. (c_finish_omp_flish): Likewise. * c-common.c (verify_tree): Use new CALL_EXPR accessors. Traverse arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (check_function_arguments_recurse): Use new CALL_EXPR accessors. (c_warn_unused_result): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation. Change class to tcc_vl_exp. * call.c (build_call): Use build_call_list instead of build3. (build_over_call): Likewise. (build_new_method_call): Use build_min_non_dep_call_list instead of build_min_non_dep. * error.c (dump_call_expr_args): New function. (dump_aggr_init_expr_args): New function. (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. * cvt.c (convert_to_void): Use build_call_array instead of build3; use new AGGR_INIT_EXPR accessor macros. * mangle.c (write_expression): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new AGGR_INIT_EXPR accessor macros. * cp-gimplify.c (cp_gimplify_init_expr): Use AGGR_INIT_EXPR_SLOT to set the slot operand. * cp-tree.h (AGGR_INIT_EXPR_FN): New macro. (AGGR_INIT_EXPR_SLOT): New macro. (AGGR_INIT_EXPR_ARG): New macro. (aggr_init_expr_nargs): New macro. (AGGR_INIT_EXPR_ARGP): New macro. (aggr_init_expr_arg_iterator): New. (init_aggr_init_expr_arg_iterator): New. (next_aggr_init_expr_arg): New. (first_aggr_init_expr_arg): New. (more_aggr_init_expr_args_p): New. (FOR_EACH_AGGR_INIT_EXPR_ARG): New. (stabilize_aggr_init): New declaration. (build_min_non_dep_call_list): Likewise. * tree.c (process_aggr_init_operands): New function. (build_aggr_init_array) New function. (build_cplus_new): Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. Replace use of build3 with build_aggr_init_array. (build_min_non_dep_call_list) New function. (build_min_nt): Assert input code parameter is not a variable length expression class. (build_min, build_min_non_dep): Likewise. (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments to check for equality instead of recursing. Handle tcc_vl_exp tree code classes. (stabilize_call): Update to only handle CALL_EXPRs, not AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros. (stabilize_aggr_init): New function. (stabilize_init): Use it. * cxx-pretty-print.c (pp_cxx_postfix_expression) <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros and argument iterators. * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with build_vl_exp. Iterate through the operands, recursively processing each one. (tsubst_copy_and_build) <CALL_EXPR>: Update to use new CALL_EXPR accessor macros. (value_dependent_expression_p) <default>: Handle tcc_vl_exp tree code classes. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * semantics.c (finish_call_expr): Use build_nt_call_list instead of build_nt. (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR accessor macros. Use build_call_array to construct the CALL_EXPR node instead of build3 * decl2.c (build_offset_ref_call_from_tree): Use build_nt_call_list and build_min_non_dep_call_list instead of build_min_nt and build_min_non_dep. * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>: Use build_nt_call_list instead of build_min_nt. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead of build3. (BUILD_MONITOR_EXIT): Likewise. * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr. (java_gimplify_modify_expr): Likewise. * class.c (cache_this_class_ref): Use build_call_expr. (build_static_field_ref): Likewise. (emit_indirect_register_classes): Likewise. (emit_register_classes): Likewise. * resource.c (write_resource_constructor): Use build_call_expr. * builtins.c (builtin_creator_function): Change interpretation of the second parameter to be the whole CALL_EXPR instead of the arglist. (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (min_builtin): Likewise. (abs_builtin): Likewise. (java_build_function_call_expr): Likewise. (convert_real): Likewise. (UNMARSHAL3): Likewise. (UNMARSHAL4): Likewise. (UNMARSHAL5): Likewise. (build_arglist_for_builtin): Delete. Fix callers to use build_call_expr instead. (putObject_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (compareAndSwapInt_builtin): Likewise. (compareAndSwapLong_builtin): Likewise. (compareAndSwapObject_builtin): Likewise. (putVolatile_builtin): Likewise. (getVolatile_builtin): Likewise. (VMSupportsCS8_builtin): Likewise. (check_for_builtin): Pass entire CALL_EXPR to builtin expander instead of arglist. * expr.c (build_java_athrow): Use build_call_nary instead of build3. (build_java_throw_out_of_bounds_exception): Likewise. (java_check_reference): Likewise. (build_java_arraystore_check): Likewise. (build_newarray): Likewise. (build_anewarray): Likewise. (expand_java_multinewarray): Use build_call_list instead of build3. (build_java_monitor): Use build_call_nary instead of build3. (java_create_object): Likewise. (expand_java_NEW): Likewise. (build_instanceof): Likewise. (expand_java_CHECKCAST): Likewise. (build_java_soft_divmod): Likewise. (build_java_binop): Likewise. (build_field_ref): Likewise. (build_class_init): Likewise. (rewrite_arglist_getcaller): Use build_call_expr. (build_invokeinterface): Use build_call_nary instead of build3. (expand_invoke): Use build_call_list instead of build3. (build_jni_stub): Use build_call_nary, build_call_list, or build_call_expr instead of build3. (expand_java_field_op): Use build_call_expr instead of build3. (force_evaluation_order): Use new CALL_EXPR accessors. * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors. (objc_get_callee_fndecl): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * trans-expr.c (gfc_conv_power_op): Use build_call_expr. (gfc_conv_string_tmp): Likewise. (gfc_conv_concat_op): Likewise. (gfc_build_compare_string): Likewise. (gfc_conv_function_call): Use build_call_list instead of build3. * trans-array.c (gfc_trans_allocate_array_storage): Use build_call_expr. (gfc_grow_array): Likewise. (gfc_trans_array_ctor_element): Likewise. (gfc_trans_array_constructor_value): Likewise. (gfc_array_allocate): Likewise. (gfc_array_deallocate): Likewise. (gfc_trans_auto_array_allocation): Likewise. (gfc_trans_dummy_array_bias): Likewise. (gfc_conv_array_parameter): Likewise. (gfc_trans_dealloc_allocated): Likewise. (gfc_duplicate_allocatable): Likewise. * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr. (gfc_trans_omp_flush): Likewise. * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr. (gfc_trans_pause): Likewise. (gfc_trans_stop): Likewise. (gfc_trans_character_select): Likewise. (gfc_do_allocate): Likewise. (gfc_trans_assign_need_temp): Likewise. (gfc_trans_pointer_assign_need_temp): Likewise. (gfc_trans_forall_1): Likewise. (gfc_trans_where_2): Likewise. (gfc_trans_allocate): Likewise. (gfc_trans_deallocate): Likewise. * trans.c (gfc_trans_runtime_check): Use build_call_expr. * trans-io.c (gfc_trans_open): Use build_call_expr. (gfc_trans_close): Likewise. (build_filepos): Likewise. (gfc_trans_inquire): Likewise. (NML_FIRST_ARG): Delete. (NML_ADD_ARG): Delete. (transfer_namelist_element): Use build_call_expr. (build_dt): Likewise. (gfc_trans_dt_end): Likewise. (transfer_expr): Likewise. (transfer_array-desc): Likewise. * trans-decl.c (gfc_generate_function_code): Use build_call_expr. (gfc_generate_constructors): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr. (gfc_conv_intrinsic_fdate): Likewise. (gfc_conv_intrinsic_ttynam): Likewise. (gfc_conv_intrinsic_array_transfer): Likewise. (gfc_conv_associated): Likewise. (gfc_conv_intrinsic_si_kind): Likewise. (gfc_conv_intrinsic_trim): Likewise. (gfc_conv_intrinsic_repeat: Likewise. (gfc_conv_intrinsic_iargc): Likewise. Co-Authored-By: Brooks Moses <brooks.moses@codesourcery.com> Co-Authored-By: Lee Millward <lee.millward@codesourcery.com> From-SVN: r122018
2007-02-16 00:50:49 +01:00
return build_call_expr (t, 0);
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
}
tree
default_hidden_stack_protect_fail (void)
{
#ifndef HAVE_GAS_HIDDEN
return default_external_stack_protect_fail ();
#else
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
tree t = stack_chk_fail_decl;
if (!flag_pic)
return default_external_stack_protect_fail ();
if (t == NULL_TREE)
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
{
t = build_function_type_list (void_type_node, NULL_TREE);
java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt. gcc/java/ * java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt. * expr.c (force_evaluation_order): Same. * typeck.c: Add location to build_decl or PUSH_FIELD calls. * class.c: Same. * decl.c: Same. * jcf-parse.c: Same. * constants.c: Same. * resource.c: Same. * except.c: Same. * builtins.c: Same. * expr.c: Same. * java-tree.h (PUSH_FIELD): Add location field. gcc/objc/ * objc-act.c (finish_var_decl): Pass location to finish_decl. (objc_get_parm_info): Same. (get_super_receiver): Same. * objc-act.c (objc_build_component_ref): Pass location to build_compound_ref. (build_module_initializer_routine): Pass location to c_end_compound_stmt. (objc_generate_static_init_call): Pass location to build_stmt. (build_typed_selector_reference): New location argument. (build_selector_reference): Same. (objc_substitute_decl): Pass location to build_array_ref. (next_sjlj_build_try_catch_finally): Pass location to build_stmt. (objc_begin_catch_clause): Same. (objc_finish_try_stmt): Same. (objc_finish_catch_clause): Pass location to c_end_compound_stmt. (objc_build_throw_stmt): New argument. (generate_shared_structures): Pass location to build_c_cast. (objc_build_message_expr): Use local location. (objc_finish_message_expr): Use input_location. (build_objc_method_call): New argument. (objc_build_selector_expr): Same. (get_super_receiver): Pass location to build_c_cast, build_modify_expr, build_compound_expr. * objc-act.c: Add location to all calls to start_struct, build_decl, finish_struct. gcc/ * tree-pretty-print.c (dump_generic_node): Dump column numbers. * gimple-pretty-print.c (dump_gimple_stmt): Same. * gimplify.c (gimplify_modify_expr): Set location for GIMPLE_ASSIGNs created. * c-parser.c (c_parser_binary_expression): Use current column while building binary operations. * common.opt (fshow-column): Enable by default. * tree-vrp.c (check_array_ref): Use warning_at. (check_array_bounds): Use location from call back if expr has no location. * tree.h: Add location argument to maybe_fold_*. * tree-ssa-ccp.c (ccp_fold): Pass location to maybe_fold_*. (maybe_fold_offset_to_array_ref): Add location argument and use it. (maybe_fold_offset_to_component_ref): Same. (maybe_fold_offset_to_reference): Same. (maybe_fold_offset_to_address): Same. (maybe_fold_stmt_indirect): Same. (maybe_fold_stmt_addition): Same. (fold_stmt_r): Pass location to maybe_fold_*. (fold_gimple_assign): Same. * c-tree.h: Add location argument to finish_decl, default_function_array_conversion, store_init_value. * c-decl.c (define_label): Use error_at. (c_make_fname_decl): Pass location to finish_decl. (finish_decl): New location argument. (build_compound_literal): Pass location to store_init_value. (grokdeclarator): Pass location to finish_decl. (grokfield): Same. * c-typeck.c (array_to_pointer_conversion): New location argument. (function_to_pointer_conversion): Same. (default_function_array_conversion): Same. (parser_build_unary_op): Pass location to overflow_warning. (parser_build_binary_op): Same. Use warning_at. (build_unary_op): Pass location to array_to_pointer_conversion. (build_c_cast): Pass location to digest_init. (build_modify_expr): New location argument. (convert_for_assignment): Same. (store_init_value): Same. (digest_init): Same. (output_init_element): Pass location to digest_init and array_to_pointer_conversion. (c_finish_return): Pass location to convert_for_assignment. * gimplify.c (gimplify_conversion): Pass location to maybe_fold_offset_to_address. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Pass location to maybe_fold_stmt_addition. * c-omp.c (c_finish_omp_atomic): Pass new location to build_modify_expr. (c_finish_omp_for): Same. * c-common.c (overflow_warning): New argument. * c-common.h: New argument to build_modify_expr, overflow_warning. * c-parser.c (c_parser_declaration_or_fndef): Pass location to finish_decl. (c_parser_initializer): Pass location to default_function_array_conversion. (c_parser_initelt): Same. (c_parser_initval): Same. (c_parser_asm_operands): Same. (c_parser_expr_no_commas): Same. Pass location to build_modify_expr. (c_parser_conditional_expression): Same. (c_parser_binary_expression): Add location info to stack. Use it. (c_parser_unary_expression): Pass location to default_function_array_conversion, parser_build_unary_op, build_indirect_ref, c_parser_postfix_expression_after_primary. (c_parser_postfix_expression_after_primary): New location argument. Use it. (c_parser_expression_conv): Pass location to default_function_array_conversion. (c_parser_expr_list): Same. (c_parser_omp_atomic): Same. (c_parser_omp_for_loop): Same. * c-tree.h: (struct c_declarator): Add comment to id_loc. (build_array_declarator): New argument. * c-decl.c (build_array_declarator): Add location argument. (grokdeclarator): Set id_loc for cdk_array. * c-parser.c (c_parser_direct_declarator_inner): Pass location to build_array_declarator. * tree.c (build_omp_clause): Add location argument. * tree.h (OMP_CLAUSE_HAS_LOCATION): New macro. (OMP_CLAUSE_LOCATION): New macro. (struct tree_omp_clause): Add location field. (build_omp_clause): Add argument. * testsuite/gcc.dg/gomp/for-1.c: Fix column. * cp/pt.c (tsubst_omp_for_iterator): Pass location to build_omp_clause. * cp/parser.c (cp_parser_omp_var_list_no_open): Same. (cp_parser_omp_clause_collapse): Same. (cp_parser_omp_clause_default): Same. (cp_parser_omp_clause_if): Same. (cp_parser_omp_clause_nowait): Same. (cp_parser_omp_clause_num_threads): Same. (cp_parser_omp_clause_ordered): Same. (cp_parser_omp_clause_schedule): Same. (cp_parser_omp_clause_untied): Same. (cp_parser_omp_for_loop): Same. (cp_parser_omp_parallel): Pass location to c_split_parallel_clauses. * c-tree.h (c_start_case): Add location argument. (c_process_expr_stmt): Same. (c_finish_goto_*): Same. * tree-parloops.c (initialize_reductions): Pass location to build_omp_clause. (create_parallel_loop): Same. * fortran/trans-openmp.c (gfc_trans_omp_variable_list): Same. (gfc_trans_omp_reduction_list): Same. (gfc_trans_omp_clauses): Same. (gfc_trans_omp_do): Same. * c-typeck.c (c_finish_goto_label): Same. (c_finish_goto_ptr): New location argument. (c_start_case): Same. (emit_side_effect_warnings): Same. (c_process_expr_stmt): Same. (c_finish_stmt_expr): Same. (c_finish_omp_clauses): Use error_at instead of error. * gimplify.c (gimplify_adjust_omp_clauses_1): Pass location to build_omp_clause. * c-omp.c (c_split_parallel_clauses): New location argument. * tree-nested.c (convert_nonlocal_reference_stmt): Pass location to build_omp_clause. (convert_local_reference_stmt): Same. (convert_gimple_call): Same. * c-common.h (c_split_parallel_clauses): New argument. * c-parser.c (c_parser_statement_after_labels): Pass location to c_finish_goto_label. (c_parser_switch_statement): Pass location to c_start_case. (c_parser_for_statement): Pass location to c_finish_expr_stmt, and c_process_expr_stmt. (c_parser_omp_variable_list): Add location argument. (c_parser_omp_clause_collapse): Pass location to build_omp_clause. (c_parser_omp_clause_default): Same. (c_parser_omp_clause_if): Same. (c_parser_omp_clause_num_threads): Same. (-c_parser_omp_clause_ordered): Same. (c_parser_omp_clause_reduction): Pass location to c_parser_omp_variable_list. (c_parser_omp_clause_schedule): Pass location to build_omp_clause. (c_parser_omp_clause_untied): Same. (c_parser_omp_for_loop): Pass location to c_process_expr_stmt. (c_parser_omp_parallel): Pass location to c_split_parallel_clauses. * c-tree.h (check_for_loop_decls, undeclared_variable, build_component_ref, build_array_ref, build_external_ref, c_expr_sizeof_expr, c_expr_sizeof_type, parser_build_unary_op, build_conditional_expr, build_compound_expr, c_cast_expr, build_c_cast, build_asm_expr, c_end_compound_stmt, c_finish_stmt_expr, c_finish_return, c_finish_omp_parallel, c_finish_omp_task): New argument. * c-semantics.c (build_stmt): Same. (build_case_label): Same. * c-decl.c (c_finish_incomplete_decl): Pass location on down. (undeclared_variable): New argument. (make_label): Same. (lookup_label): Pass location on down. (define_label): Same. (finish_decl): Same. (build_compound_literal): Same. (finish_struct): Same. (finish_function): Do not set location here. (check_for_loop_decls): New argument. * tree.c (save_expr): Set location. (build_empty_stmt): New argument. * tree.h (build_empty_stmt): New argument to build_empty_stmt. (CAN_HAVE_LOCATION_P): Make sure we have a non empty node. * builtins.c (gimplify_va_arg_expr): Use locations. (expand_builtin_sync_operation): Same. * c-typeck.c (build_component_ref): New argument. (build_array_ref): Same. (build_external_ref): Same. (c_expr_sizeof_expr): Same. (c_expr_sizeof_type): Same. (parser_build_unary_op): Same. (build_conditional_expr): Same. (build_compound_expr): Pass location on down. (build_compound_expr): New argument. (build_c_cast): Same. (c_cast_expr): Same. (build_asm_expr): Same. (c_finish_return): Same. (c_process_expr_stmt): Pass location on down. (c_finish_stmt_expr): New argument. (push_clenaup): Same. (c_finish_omp_parallel): Same. (c_finish_omp_task): Same. * gimplify.c (gimplify_call_expr): Pass location on down. * c-omp.c (c_finish_omp_master): New argument. (c_finish_omp_critical): Same. (c_finish_omp_ordered): Same. (c_finish_omp_barrier): Same. (-c_finish_omp_taskwait): Same. (c_finish_omp_atomic): Same. (c_finish_omp_flush): Same. * tree-inline.c (copy_tree_body_r): Pass location on down. (inline_forbidden_p): Remove use of input_location. * c-gimplify.c (c_build_bind_expr): New argument. * c-common.c (c_common_truthvalue_conversion): Pass location on down. (c_sizeof_or_alignof_type): New argument. (c_alignof_expr): Same. (build_va_arg): Same. (c_add_case_label): Same. * c-common.h (c_sizeof_or_alignof_type, c_alignof_expr, c_sizeof, c_alignof, build_va_arg, build_stmt, build_case_label, c_build_bind_expr, objc_build_selector_expr, objc_build_throw_stmt, c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered, c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush, c_finish_omp_taskwait, c_finish_omp_for, c_split_parallel_clauses): New argument. * stub-objc.c (objc_build_selector_expr): Same. (objc_build_throw_stmt): Same. * c-parser.c (c_parser_declaration_or_fndef): Pass location on down. (c_parser_initelt): Same. (c_parser_compound_statement): Same. (c_parser_compound_statement_nostart): Same. (c_parser_label): Same. (c_parser_statement_after_labels): Same. (c_parser_if_body): Same. (c_parser_else_body): Same. (c_parser_if_statement): Same. (c_parser_switch_statement): Same. (c_parser_while_statement): Same. (c_parser_do_statement): Same. (c_parser_for_statement): Same. (c_parser_asm_statement): Same. (c_parser_conditional_expression): Same. (c_parser_binary_expression): Same. (c_parser_cast_expression): Same. (c_parser_unary_expression): Same. (c_parser_sizeof_expression): Same. (c_parser_alignof_expression): Same. (c_parser_postfix_expression): Same. (c_parser_expression): Same. (c_parser_objc_receiver): Same. (c_parser_omp_variable_list): Same. (c_parser_omp_structured_block): Same. (c_parser_omp_atomic): New argument. (c_parser_omp_barrier): Same. (c_parser_omp_critical): Same. (c_parser_omp_flush): Pass location on down. (c_parser_omp_for_loop): New argument. (c_parser_omp_for): Same. (c_parser_omp_master): Same. (c_parser_omp_ordered): Same. (c_parser_omp_sections_scope): Same. (c_parser_omp_sections): Same. (c_parser_omp_parallel): Same. (c_parser_omp_single): Same. (c_parser_omp_task): Same. (c_parser_omp_taskwait): Pass location on down. (c_parser_omp_construct): Same. (c_parser_omp_threadprivate): Same. * dwarf2asm.c, targhooks.c, optabs.c, tree.c, tree.h, target.h, builtins.c, omp-low.c, cgraphunit.c, tree-call-cdce.c, tree-ssa-alias.c, gimple-low.c, c-tree.h, expr.c, tree-parloops.c, c-decl.c, tree-eh.c, langhooks.c, function.c, stor-layout.c, c-typeck.c, gimplify.c, c-pragma.c, expmed.c, except.c, coverage.c, emit-rtl.c, cfgexpand.c, tree-mudflap.c, varasm.c, tree-nested.c, rtl.h, tree-inline.c, tree-profile.c, c-common.c, c-common.h, tree-switch-conversion.c, tree-cfg.c, ipa-struct-reorg.c, c-parser.c, config/i386/i386.c, stmt.c: Add location argument to the following function definitions and/or function calls: build_decl, objcp_start_struct, objcp_finish_struct, start_struct, finish_struct, PUSH_FIELD, create_artificial_label, cp_make_fname_decl, pushtag, implicitly_declare, c_make_fname_decl, build_compound_literal, parser_xref_tag, resolve_overloaded_builtin, do_case, c_finish_bc_stmt, build_compound_literal, build_function_call. * c-decl.c (build_compound_literal): Add location argument. Make all diagnostic calls use location. (start_struct): Same. (finish_struct): Same. (start_enum): Same. (build_enumerator): Same. (start_function): Same. (grokdeclarator): Make all diagnostic calls use location. (store_parm_decls_oldstyle): Same. * c-typeck.c (build_function_call): Add location argument. Make all diagnostic calls use location. (do_case): Same. (c_finish_bc_stmt): Same. * tree-nested.c (get_trampoline_type): Add argument. Pass location to build_decl. (lookup_tramp_for_decl): Pass location to get_trampoline_type. * rtl.h (RTL_LOCATION): New. * c-common.c (c_add_case_label): Add location argument. Make all diagnostic calls use location. * c-common.h: Add location argument to make_fname_decl, do_case, c_add_case_label, build_function_call, resolve_overloaded_builtin. * c-parser.c (c_parser_enum_specifier): Rename ident_loc to enum_loc. Set it appropriately for every case. Pass enum_loc to start_enum call. Pass value_loc first to build_enumerator. Pass enum_loc to parser_xref_tag. (c_parser_struct_or_union_specifier): Save location. Use it for start_struct, finish_struct, and parser_xref_tag. gcc/testsuite/ * gcc.dg/old-style-prom-3.c: Add column info. * gcc.dg/overflow-warn-1.c * gcc.dg/gomp/pr27415.c * gcc.dg/gomp/for-1.c: Same. * gcc.dg/enum-compat-1.c: Same. * gcc.dg/c99-tag-3.c: Same. * gcc.dg/Wredundant-decls-2.c: Same. * gcc.dg/func-ptr-conv-1.c: Same. * gcc.dg/asm-wide-1.c: Same. * gcc.dg/nofixed-point-2.c: Same. * gcc.dg/cpp/line3.c: Same. * gcc.dg/array-10.c: Same. * gcc.dg/c99-vla-jump-1.c: Same. * gcc.dg/pr20368-1.c: Same. * gcc.dg/Wshadow-3.c: Same. * gcc.dg/c90-const-expr-8.c: Same. * gcc.dg/label-decl-2.c: Same. * gcc.dg/dremf-type-compat-2.c: Same. * gcc.dg/c90-const-expr-5.c: Same. * gcc.dg/builtins-30.c: Same. * gcc.dg/Warray-bounds.c: Same. * gcc.dg/Wcxx-compat-2.c: Same. * gcc.dg/tree-ssa/col-1.c: Same. * gcc.dg/old-style-prom-2.c: Same. * gcc.dg/cast-function-1.c: Same. * gcc.dg/pr15698-1.c: Same. * gcc.dg/dremf-type-compat-3.c: Same. * gcc.dg/vla-8.c: Same. * gcc.dg/gomp/pr27415.c: Move firstprivate diagnostics to correct line. * gcc.dg/label-decl-2.c: Move label diagnostic to correct line. * gcc.dg/old-style-prom-3.c: Check for error on the correct line. * gcc.dg/enum-compat-1.c: Same. * gcc.dg/dremf-type-compat-2.c: Same. * gcc.dg/old-style-prom-2.c: Same. * gcc.dg/pr15698-1.c: Same. * gcc.dg/pr20368-1.c: Same. * gcc.dg/dremf-type-compat-3.c: Same. * gcc.dg/builtins-30.c: Same. Test for columns. gcc/objcp/ * objcp-decl.h (c_end_compound_stmt): New argument. * objcp-decl.c (objcp_start_struct): Add argument. (objcp_finish_struct): Same. gcc/cp/ * typeck.c (cp_build_binary_op): Pass location to overflow_warning. (build_modify_expr): New arg. * semantics.c (finish_unary_op_expr): Pass location to overflow_warning. (handle_omp_for_class_iterator): Pass location to build_modify_expr. * typeck.c (cxx_sizeof_or_alignof_type): Pass location to c_sizeof_or_alignof_type. (build_array_ref): New argument. (build_compound_expr): Same. (build_const_cast): Same. (build_ptrmemfunc): Pass location to build_c_cast. * init.c (avoid_placement_new_aliasing): Pass location to build_stmt. (build_vec_delete_1): Pass location to cp_build_modify_expr, build_compound_expr. * class.c (build_vtbl_ref_1): Pass location to build_array_ref. * decl.c (poplevel): Pass location to c_build_bind_expr. (finish_case_label): Pass location to build_case_label. (finish_constructor_body): Same. (finish_destructor_body): Pass location to build_stmt. (cxx_maybe_build_cleanup): Same, but to build_compound_expr. * call.c (build_new_op): Pass location to build_array_ref. (build_x_va_arg): Pass location to build_va_arg. * except.c (expand_end_catch_block): Pass location to build_stmt. * cp-tree.h (build_array_ref): New argument. (build_compound_expr): Same. (build_c_cast): Same. * cp-gimplify.c (gimplify_if_stmt): Pass location on down. (gimplify_switch_stmt): Same. * typeck2.c (split_nonconstant_init_1): Same. * pt.c (tsubst_copy): Same. * semantics.c (add_decl_expr): Same. (do_poplevel): Same. (push_cleanup): Same. (finish_goto_stmt): Same. (finish_expr_stmt): Same. (begin_if_stmt): Same. (begin_while_stmt): Same. (begin_do_stmt): Same. (finish_return_stmt): Same. (begin_for_stmt): Same. (finish_break_stmt): Same. (finish_continue_stmt): Same. (begin_switch_stmt): Same. (begin_try_block): Same. (begin_handler): Same. (finish_asm_stmt): Same. (finish_label_stmt): Same. (finish_stmt_expr_expr): Same. (finalize_nrv_r): Same. (finish_omp_atomic): Same. * name-lookup.c (do_using_directive): Same. * decl2.c (grok_array_decl): Same. * parser.c (cp_parser_cast_expression): Same. (cp_parser_selection_statement): Same. (cp_parser_implicitly_scoped_statement): Same. (cp_parser_objc_selector_expression): Same. (cp_parser_objc_synchronized_statement): Same. (cp_parser_objc_throw_statement): Same. (cp_parser_omp_critical): Same. (cp_parser_omp_master): Same. * typeck.c (build_function_call): Add location argument. * init.c: Add location argument to all build_decl calls. * class.c: Same. * method.c: Same. * rtti.c: Same. * tree.c: Same. * pt.c: Same. * semantics.c: Same. * lex.c: Same. * decl2.c: Same. * cp-gimplify.c: Same. * decl.c: Same. (cp_make_fname_decl): Add location argument. Pass location ot build_decl. (finish_case_label): Same. * cp-tree.h (finish_case_label): Add location argument. * parser.c (cp_parser_label_for_labeled_statement): Pass location to finish_case_label. gcc/fortran/ * trans-array.c (gfc_trans_allocate_array_storage): Pass location on down. (gfc_trans_array_constructor_value): Same. (gfc_trans_scalarized_loop_end): Same. (gfc_conv_ss_startstride): Same. (gfc_trans_g77_array): Same. (gfc_trans_dummy_array_bias): Same. (gfc_conv_array_parameter): Same. (structure_alloc_comps): Same. * trans-expr.c (gfc_conv_function_call): Same. (fill_with_spaces): Same. (gfc_trans_string_copy): Same. (gfc_trans_scalar_assign): Same. * trans-stmt.c (gfc_trans_goto): Same. (gfc_trans_if_1): Same. (gfc_trans_simple_do): Same. (gfc_trans_do): Same. (gfc_trans_do_while): Same. (gfc_trans_logical_select): Same. (gfc_trans_select): Same. (gfc_trans_forall_loop): Same. (gfc_trans_nested_forall_loop): Same. (generate_loop_for_temp_to_lhs): Same. (generate_loop_for_rhs_to_temp): Same. (gfc_trans_forall_1): Same. (gfc_trans_where_assign): Same. (gfc_trans_where_3): Same. (gfc_trans_allocate): Same. * trans.c (gfc_finish_block): Same. (gfc_trans_runtime_check): Same. (gfc_call_malloc): Same. (gfc_allocate_with_status): Same. (gfc_call_free): Same. (gfc_deallocate_with_status): Same. (gfc_call_realloc): Same. (gfc_trans_code): Same. * trans-decl.c (gfc_init_default_dt): Same. (gfc_generate_constructors): Same. * trans-io.c (gfc_trans_io_runtime_check): Same. * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same. (gfc_conv_intrinsic_fdate): Same. (gfc_conv_intrinsic_ttynam): Same. (gfc_conv_intrinsic_minmax): Same. (gfc_conv_intrinsic_minmax_char): Same. (gfc_conv_intrinsic_anyall): Same. (gfc_conv_intrinsic_count): Same. (gfc_conv_intrinsic_arith): Same. (gfc_conv_intrinsic_minmaxloc): Same. (gfc_conv_intrinsic_minmaxval): Same. (gfc_conv_intrinsic_rrspacing): Same. (gfc_conv_intrinsic_array_transfer): Same. (gfc_conv_intrinsic_trim): Same. (gfc_conv_intrinsic_repeat): Same. From-SVN: r148442
2009-06-13 00:06:47 +02:00
t = build_decl (UNKNOWN_LOCATION, FUNCTION_DECL,
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
get_identifier ("__stack_chk_fail_local"), t);
TREE_STATIC (t) = 1;
TREE_PUBLIC (t) = 1;
DECL_EXTERNAL (t) = 1;
TREE_USED (t) = 1;
TREE_THIS_VOLATILE (t) = 1;
TREE_NOTHROW (t) = 1;
DECL_ARTIFICIAL (t) = 1;
DECL_IGNORED_P (t) = 1;
DECL_VISIBILITY_SPECIFIED (t) = 1;
DECL_VISIBILITY (t) = VISIBILITY_HIDDEN;
stack_chk_fail_decl = t;
}
tree.h (enum tree_code_class): Add tcc_vl_exp. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree.h (enum tree_code_class): Add tcc_vl_exp. (VL_EXP_CLASS_P): New. (TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (TREE_OPERAND_CHECK_CODE): Likewise. (GIMPLE_STMT_OPERAND_CHECK): Likewise. (TREE_RTL_OPERAND_CHECK): Likewise. (tree_operand_check_failed): Make second parameter the whole tree instead of its code. Fixed callers. (VL_EXP_CHECK): New. (TREE_OPERAND_LENGTH): New. (VL_EXP_OPERAND_LENGTH): New. (CALL_EXPR_FN): New. (CALL_EXPR_STATIC_CHAIN): New. (CALL_EXPR_ARGS): New. (CALL_EXPR_ARG): New. (call_expr_nargs): New. (CALL_EXPR_ARGP): New. (build_nt_call_list): Declare. (build_vl_exp_stat): Declare. (build_vl_exp): New. (build_call_list): Declare. (build_call_nary): Declare. (build_call_valist): Declare. (build_call_array): Declare. (call_expr_arg): Declare. (call_expr_argp): Declare. (call_expr_arglist): Declare. (fold_build_call_list): Declare. (fold_build_call_list_initializer): Declare. (fold_call_expr): Declare to replace fold_builtin. (fold_builtin_fputs): Update to agree with modified definition. (fold_builtin_strcpy): Likewise. (fold_builtin_strncpy): Likewise. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_next_arg): Likewise. (fold_build_call_expr): Declare. (fold_builtin_call_list): Declare. (fold_builtin_call_valist): Declare. (build_call_expr): Declare. (validate_arglist): Update to agree with modified definition. (tree_operand_length): New. (call_expr_arg_iterator): New. (init_call_expr_arg_iterator): New. (next_call_expr_arg): New. (first_call_expr_arg): New. (more_call_expr_args_p): New. (FOR_EACH_CALL_EXPR_ARG): New. * tree.c (tree_code_class_string): Add entries for tcc_vl_exp and tcc_gimple_stmt. (tree_code_size): Update documentation. Use sizeof (tree) rather than sizeof (char *). (tree_size): Likewise. Add case for tcc_vl_exp. (tree_node_structure): Add case for tcc_vl_exp. (contains_placeholder_p): Likewise. (substitute_in_expr): Likewise. (substitute_placeholder_in_expr): Likewise. (stabilize_reference_1): Likewise. (build3_stat): Remove logic for CALL_EXPRs. Replace with assertion to diagnose breakage of this interface for constructing CALL_EXPRs. (build_nt): Add similar assertion here. (build_nt_call_list): New. (simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors. (iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (get_callee_fndecl): Use new CALL_EXPR accessors. (tree_operand_check_failed): Change parameters to pass entire node instead of its code, so that we can call TREE_OPERAND_LENGTH on it. (process_call_operands): New. (build_vl_exp_stat): New. (build_call_list): New. (build_call_nary): New. (build_call_valist): New. (build_call_array): New. (walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (call_expr_arglist): New. * tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use tcc_vl_exp instead of a fixed-size tcc_expression. * doc/c-tree.texi (CALL_EXPR): Document new representation and accessors for CALL_EXPRs. (AGGR_INIT_EXPR): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * builtins.c (c_strlen): Return NULL_TREE instead of 0. (expand_builtin_nonlocal_goto): Change parameter to be entire CALL_EXPR instead of an arglist. Use new CALL_EXPR accessors. (expand_builtin_prefetch): Likewise. (expand_builtin_classify_type): Likewise. (mathfn_built_in): Return NULL_TREE instead of 0. (expand_errno_check): Use new CALL_EXPR accessors. (expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_mathfn_2): Likewise. (expand_builtin_mathfn_3): Likewise. (expand_builtin_interclass_mathfn): Likewise. (expand_builtin_sincos): Likewise. (expand_builtin_cexpi): Likewise. (expand_builtin_int_roundingfn): Likewise. (expand_builtin_int_roundingfn_2): Likewise. (expand_builtin_pow): Likewise. (expand_builtin_powi): Likewise. (expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead of arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_RTX instead of 0. (expand_builtin_strstr): Likewise. (expand_builtin_strchr): Likewise. (expand_builtin_strrchr): Likewise. (expand_builtin_strpbrk): Likewise. (expand_builtin_memcpy): Likewise. (expand_builtin_mempcpy): Likewise. (expand_builtin_mempcpy_args): New. (expand_builtin_memmove): Similarly to expand_builtin_mempcpy. (expand_builtin_memmove_args): New. (expand_builtin_bcopy): Similarly to expand_builtin_mempcpy. (expand_movstr): Likewise. (expand_builtin_strcpy): Likewise. (expand_builtin_strcpy_args): New. (expand_builtin_stpcpy): Similarly to expand_builtin_strcpy. (expand_builtin_strncpy): Likewise. (expand_builtin_memset): Likewise. (expand_builtin_memset_args): New. (expand_builtin_bzero): Similarly to expand_builtin_memset. (expand_builtin_memcmp): Likewise. (expand_builtin_strcmp): Likewise. (expand_builtin_strncmp): Likewise. (expand_builtin_strcat): Likewise. (expand_builtin_strncat): Likewise. (expand_builtin_strspn): Likewise. (expand_builtin_strcspn): Likewise. (expand_builtin_args_info): Likewise. (expand_builtin_va_start): Likewise. (gimplify_va_arg_expr): Likewise. (expand_builtin_va_end): Likewise. (expand_builtin_va_copy): Likewise. (expand_builtin_frame_address): Likewise. (expand_builtin_alloca): Likewise. (expand_builtin_bswap): Likewise. (expand_builtin_unop): Likewise. (expand_builtin_fputs): Likewise. (expand_builtin_expect): Likewise. (expand_builtin_fabs): Likewise. (expand_builtin_copysign): Likewise. (expand_builtin_printf): Likewise. (expand_builtin_fprintf): Likewise. (expand_builtin_sprintf): Likewise. (expand_builtin_init_trampoline): Likewise. (expand_builtin_signbit): Likewise. (expand_builtin_fork_or_exec): Likewise. (expand_builtin_sync_operation): Likewise. (expand_builtin_compare_and_swap): Likewise. (expand_builtin_lock_test_and_set): Likewise. (expand_builtin_lock_release): Likewise. (expand_builtin): Likewise. (builtin_mathfn_code): Likewise. (fold_builtin_constant_p): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_expect): Likewise. (fold_builtin_classify_type): Likewise. (fold_builtin_strlen): Likewise. (fold_builtin_nan): Likewise. (integer_valued_real_p): Likewise. (fold_trunc_transparent_mathfn): Likewise. (fold_fixed_mathfn): Likewise. (fold_builtin_cabs): Likewise. (fold_builtin_sqrt): Likewise. (fold_builtin_cbrt): Likewise. (fold_builtin_cos): Likewise. (fold_builtin_cosh): Likewise. (fold_builtin_tan): Likewise. (fold_builtin_sincos): Likewise. (fold_builtin_cexp): Likewise. (fold_builtin_trunc): Likewise. (fold_builtin_floor): Likewise. (fold_builtin_ceil): Likewise. (fold_builtin_round): Likewise. (fold_builtin_int_roundingfn): Likewise. (fold_builtin_bitop): Likewise. (fold_builtin_bswap): Likewise. (fold_builtin_logarithm): Likewise. (fold_builtin_hypot): Likewise. (fold_builtin_pow): Likewise. (fold_builtin_powi): Likewise. (fold_builtin_exponent): Likewise. (fold_builtin_memset): Likewise. (fold_builtin_bzero): Likewise. (fold_builtin_memory_op): Likewise. (fold_builtin_bcopy): Deleted; call site changed to invoke fold_builtin_memory_op directly. (fold_builtin_strcpy): Similarly as for fold_builtin_memory_op. (fold_builtin_strncpy): Likewise. (fold_builtin_memcmp): Likewise. (fold_builtin_strcmp): Likewise. (fold_builtin_strncmp): Likewise. (fold_builtin_signbit): Likewise. (fold_builtin_copysign): Likewise. (fold_builtin_isascii): Likewise. (fold_builtin_toascii): Likewise. (fold_builtin_isdigit): Likewise. (fold_builtin_fabs): Likewise. (fold_builtin_abs): Likewise. (fold_builtin_fmin_fmax): Likewise. (fold_builtin_carg): Likewise. (fold_builtin_classify): Likewise. (fold_builtin_unordered_cmp): Likewise. (fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4): New functions split out from fold_builtin_1. (fold_builtin_n): New. (fold_builtin_varargs): New. (fold_builtin): Deleted. Most callers changed to use fold_call_expr instead. (fold_call_expr): New. (build_function_call_expr): Rewrite to use new helper function. (fold_builtin_call_list): New. (build_call_expr): New. (fold_builtin_call_valist): New. (rewrite_call_expr): New. (validate_arg): New. (validate_arglist): Change parameter to be entire CALL_EXPR instead of an arglist. Change return type to bool. Use new CALL_EXPR accessors. (fold_builtin_strstr): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (fold_builtin_strncat): Likewise. (fold_builtin_strspn): Likewise. (fold_builtin_strcspn): Likewise. (fold_builtin_fputs): Likewise. (fold_builtin_next_arg): Likewise. (fold_builtin_sprintf): Likewise. (expand_builtin_object_size): Use new CALL_EXPR accessors. Use NULL_RTX instead of 0. (expand_builtin_memory_chk): Likewise. (maybe_emit_chk_warning): Likewise. (maybe_emit_sprintf_chk_warning): Likewise. (fold_builtin_object_size): Pass call arguments individually instead of as an arglist, fixing callers appropriately. Use new CALL_EXPR accessors and constructors. Return NULL_TREE instead of 0. (fold_builtin_memory_chk): Likewise. (fold_builtin_stxcpy_chk): Likewise. (fold_builtin_strncpy_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strcat_chk): Likewise. (fold_builtin_strncat_chk): Likewise. (fold_builtin_sprintf_chk): Likewise. (fold_builtin_snprintf_chk): Likewise. (fold_builtin_printf): Likewise. (fold_builtin_vprintf): Likewise. * fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and constructors. (operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case. (make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (extract_muldiv_1): Add VL_EXP_CLASS_P case. (fold_mathfn_compare): Use new CALL_EXPR accessors and constructors. (fold_unary): Likewise. (fold_binary): Likewise. (fold_ternary): Remove CALL_EXPR case, since they are no longer ternary expressions. (fold): Add logic for tcc_vl_exp. (fold_checksum_tree): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (fold_build3_stat): Add assertion to flag broken interface for constructing CALL_EXPRs. (fold_build_call_list): New. (fold_build_call_list_initializer): New. (tree_expr_nonnegative_p): Use new CALL_EXPR accessors and constructors. (fold_strip_sign_ops): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR accessors and dump arguments explicitly. * tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (dump_generic_node): Use new CALL_EXPR accessors and walk arguments explicitly. (print_call_name): Use new CALL_EXPR accessors. * print-tree.c (print_node): Add case tcc_vl_exp. Print CALL_EXPR arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors. (vrp_visit_stmt): Likewise. * tree-ssa-loop-im.c (outermost_invariant_loop_expr): Make it know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (force_move_till_expr): Likewise. * targhooks.c (default_external_stack_protect_fail): Use build_call_expr instead of build_function_call_expr. (default_hidden_stack_protect_fail): Likewise. * tree-complex.c (expand_complex_libcall): Use build_call_expr to build the call. * cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors and walk arguments explicitly. * tree-ssa-loop-niter.c (simplify_replace_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_simple_operations): Likewise. (infer_loop_bounds_from_array): Use new CALL_EXPR accessors. * gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs. * optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * value_prof.c (tree_ic): Use new CALL_EXPR accessors. (tree_ic_transform): Likewise. (interesting_stringop_to_profile_p): Pass entire CALL_EXPR as parameter instead of arglist. Fix callers. (tree_stringop_fixed_value): Use new CALL_EXPR accessors. (tree_stringops_transform): Likewise. (tree_indirect_call_to_profile): Likewise. (tree_stringops_values_to_profile): Likewise. * tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator. (eliminate_tail_call): Likewise. * ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (instantiate_parameters_1): Can't handle tcc_vl_exp here. * omp-low.c (build_omp_barrier): Use build_call_expr. (lower_rec_input_clauses): Likewise. (lower_reduction_clauses): Likewise. (expand_parallel_call): Likewise. (maybe_catch_exception): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_sections): Likewise. (lower_omp_single_simple): Likewise. (lower_omp_single_copy): Likewise. (lower_omp_master): Likewise. (lower_omp_ordered): Likewise. (lower_omp_critical): Likewise. * ipa-reference.c (check-call): Use new CALL_EXPR iterator. (scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR. * tree-gimple.c (is_gimple_call_addr): Fix doc. (recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. Add tcc_vl_exp case. * tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (chrec_contains_undetermined): Likewise. (tree_contains_chrecs): Likewise. (evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH. * cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors. * tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors. Use fold_call_expr instead of fold_builtin. (ccp_fold_builtin): Likewise. Update calls into builtins.c to match declarations there. (fold_stmt): Use new CALL_EXPR constructor and accessors. Doc updates. * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-pure-const.c (check_call): Use new CALL_EXPR accessors. (scan_function): Add case tcc_vl_exp for CALL_EXPR. * tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR accessors. * tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr. (execute_cse_sincos): Use new CALL_EXPR accessors. * tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator. * gimple-low.c (lower_function_body): Use build_call_expr. (lower_builtin_setjmp): Likewise. * expr.c (emit_block_move_via_libcall): Use build_call_expr. (set_storage_via_libcall): Likewise. (safe_from_p): Add tcc_vl_exp case. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (expand_expr_real_1): Use new CALL_EXPR accessors. * tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and generalize to handle any number of operands. (TB_parent_eq): Likewise. * predict.c (expr_expected_value): Use new CALL_EXPR accessors. (strip_builtin_expect): Likewise. * function.c (gimplify_parameters): Use build_call_expr. * tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * ipa-type-escape.c (check_call): Use new CALL_EXPR iterators. (scan_for_refs): Add case tcc_vl_exp for CALL_EXPR. * tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR iterators. * gimplify.c (build_stack_save_restore): Use build_call_expr. (gimplify_decl_expr): Likewise. (gimplify_call_expr): Use fold_call_expr instead of fold_builtin. Use new CALL_EXPR iterators. (gimplify_modify_expr_to_memcpy): Use build_call_expr. (gimplify_modify_expr_to_memset): Likewise. (gimplify_variable_sized_compare): Likewise. (gimplify_omp_atomic_fetch_op): Likewise. (gimplify_omp_atomic_pipeline): Likewise. (gimplify_omp_atomic_mutex): Likewise. (gimplify_function_tree): Likewise. * calls.c (alloca_call_p): Use new CALL_EXPR accessors. (call_expr_flags): Likewise. (expand_call): Likewise. * except.c (expand_builtin_eh_return_data_regno): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. * coverage.c (create_coverage): Use build_call_expr. * tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete. (temp_call_expr_obstack): New. (pool_copy_list): Delete. (temp_copy_call_expr): New. (phi_translate): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. Get rid of special goo for copying argument lists and use temp_copy_call_expr instead. (valid_in_sets): Add case tcc_vl_exp for CALL_EXPR. Use new CALL_EXPR accessors. (create_expression_by_pieces): Likewise. Use build_call_array to construct the result instead of fold_build3. (create_value_expr_from): Add tcc_vl_exp. Delete special goo for dealing with argument lists. (init_pre): Remove references to expression_node_pool and list_node_pool. Init temp_call_expr_obstack instead. (fini_pre): Remove references to expression_node_pool and list_node_pool. * tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors and walk arguments explicitly instead of as a list. * tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr. (mx_register_decls): Likewise. (mudflap_register_call): Likewise. (mudflap_finish_file): Likewise. * ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors. (ipa_callsite_compute_param): Likewise. * tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR accessors and constructor. * tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR accessors and constructor. (convert_tramp_reference): Likewise. (convert_call_expr): Likewise. (finalize_nesting_tree_1): Likewise. * tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR accessors. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr. * tree-inline.c (initialize_inlined_parameters): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors. (estimate_num_insns_1): Use new CALL_EXPR accessors. (expand_call_inline): Tidy up call to initialize_inlined_parameters. * tree-vect-transform.c (vect_create_epilog_for_reduction): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (vectorizable_reduction): Likewise. (vectorizable_call): Use new CALL_EXPR iterators. (vectorizable_conversion): Use build_call_expr. (vectorizable_operation): Use TREE_OPERAND_LENGTH. (vect_gen_widened_results_half): Use build_call_expr. (vect_setup_realignment): Likewise. (vectorizable_live_operation): Use TREE_OPERAND_LENGTH. * tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors. (pass_through_call): Likewise. (compute_object_sizes): Likewise. Use fold_call_expr instead of fold_builtin. * tree-profile.c (tree_gen_interval_profiler): Use build_call_expr. (tree_gen_pow2_profiler): Likewise. (tree_gen_one_value_profiler): Likewise. (tree_gen_ic_func_profiler): Likewise. (tree_gen_average_profiler): Likewise. (tree_gen_ior_profiler): Likewise. * tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp. (find_func_aliases): Use new CALL_EXPR accessors. Add case tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * convert.c (convert_to_real): Use new CALL_EXPR accessors and constructor. (convert_to_integer): Likewise. * tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR accessors. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr. (sparc_expand_builtin): Use new CALL_EXPR accessors. * config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise. (ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR accessors on it. Fix callers. (ix86_expand_store_builtin): Likewise. (ix86_expand_unop_builtin): Likewise. (ix86_expand_unop1_builtin): Likewise. (ix86_expand_sse_compare): Likewise. (ix86_expand_sse_comi): Likewise. (ix86_expand_vec_init_builtin): Likewise. (ix86_expand_vec_ext_builtin): Likewise. (ix86_expand_vec_set_builtin): Likewise. (ix86_expand_builtin): Use new CALL_EXPR accessors. * config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (iq2000_expand_builtin): Use new CALL_EXPR accessors. * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use build_call_expr. * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise. (rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_abs_builtin): Likewise. (rs6000_expand_binop_builtin): Likewise. (altivec_expand_predicate_builtin): Likewise. (altivec_expand_lv_builtin): Likewise. (spe_expand_stv_builtin): Likewise. (altivec_expand_stv_builtin): Likewise. (rs6000_expand_ternop_builtin): Likewise. (altivec_expand_ld_builtin): Use new CALL_EXPR accessors. (altivec_expand_st_builtin): Likewise. (altivec_expand_dst_builtin): Likewise. (altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (altivec_expand_vec_set_builtin): Likewise. (altivec_expand_vec_ext_builtin): Likewise. (altivec_expand_builtin): Use new CALL_EXPR accessors. (spe_expand_builtin): Likewise. (spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (spe_expand_evsel_builtin): Likewise. (rs6000_expand_builtin): Use new CALL_EXPR accessors. VCFUX and FCFSX cases must construct whole new CALL_EXPR, not just arglist. * config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (arm_expand_unop_builtin): Likewise. (arm_expand_builtin): Use new CALL_EXPR accessors. * config/mips/mips.c (mips_expand_builtin): Use new CALL_EXPR accessors. * config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR instead of arglist. Use new CALL_EXPR accessors. Fix callers. (bfin_expand_unop_builtin): Likewise. (bfin_expand_builtin): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * c-semantics.c (build_stmt): Add internal diagnostic check. * c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR accessors. Print arguments explicitly instead of as a list. * c-typeck.c (build_function_call): Use new CALL_EXPR constructors. * c-omp.c (c_finish_omp_barrier): Use build_call_expr. (c_finish_omp_flish): Likewise. * c-common.c (verify_tree): Use new CALL_EXPR accessors. Traverse arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. (check_function_arguments_recurse): Use new CALL_EXPR accessors. (c_warn_unused_result): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation. Change class to tcc_vl_exp. * call.c (build_call): Use build_call_list instead of build3. (build_over_call): Likewise. (build_new_method_call): Use build_min_non_dep_call_list instead of build_min_non_dep. * error.c (dump_call_expr_args): New function. (dump_aggr_init_expr_args): New function. (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. * cvt.c (convert_to_void): Use build_call_array instead of build3; use new AGGR_INIT_EXPR accessor macros. * mangle.c (write_expression): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new AGGR_INIT_EXPR accessor macros. * cp-gimplify.c (cp_gimplify_init_expr): Use AGGR_INIT_EXPR_SLOT to set the slot operand. * cp-tree.h (AGGR_INIT_EXPR_FN): New macro. (AGGR_INIT_EXPR_SLOT): New macro. (AGGR_INIT_EXPR_ARG): New macro. (aggr_init_expr_nargs): New macro. (AGGR_INIT_EXPR_ARGP): New macro. (aggr_init_expr_arg_iterator): New. (init_aggr_init_expr_arg_iterator): New. (next_aggr_init_expr_arg): New. (first_aggr_init_expr_arg): New. (more_aggr_init_expr_args_p): New. (FOR_EACH_AGGR_INIT_EXPR_ARG): New. (stabilize_aggr_init): New declaration. (build_min_non_dep_call_list): Likewise. * tree.c (process_aggr_init_operands): New function. (build_aggr_init_array) New function. (build_cplus_new): Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros. Replace use of build3 with build_aggr_init_array. (build_min_non_dep_call_list) New function. (build_min_nt): Assert input code parameter is not a variable length expression class. (build_min, build_min_non_dep): Likewise. (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments to check for equality instead of recursing. Handle tcc_vl_exp tree code classes. (stabilize_call): Update to only handle CALL_EXPRs, not AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros. (stabilize_aggr_init): New function. (stabilize_init): Use it. * cxx-pretty-print.c (pp_cxx_postfix_expression) <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros and argument iterators. * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with build_vl_exp. Iterate through the operands, recursively processing each one. (tsubst_copy_and_build) <CALL_EXPR>: Update to use new CALL_EXPR accessor macros. (value_dependent_expression_p) <default>: Handle tcc_vl_exp tree code classes. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH. * semantics.c (finish_call_expr): Use build_nt_call_list instead of build_nt. (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR accessor macros. Use build_call_array to construct the CALL_EXPR node instead of build3 * decl2.c (build_offset_ref_call_from_tree): Use build_nt_call_list and build_min_non_dep_call_list instead of build_min_nt and build_min_non_dep. * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>: Use build_nt_call_list instead of build_min_nt. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead of build3. (BUILD_MONITOR_EXIT): Likewise. * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr. (java_gimplify_modify_expr): Likewise. * class.c (cache_this_class_ref): Use build_call_expr. (build_static_field_ref): Likewise. (emit_indirect_register_classes): Likewise. (emit_register_classes): Likewise. * resource.c (write_resource_constructor): Use build_call_expr. * builtins.c (builtin_creator_function): Change interpretation of the second parameter to be the whole CALL_EXPR instead of the arglist. (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (min_builtin): Likewise. (abs_builtin): Likewise. (java_build_function_call_expr): Likewise. (convert_real): Likewise. (UNMARSHAL3): Likewise. (UNMARSHAL4): Likewise. (UNMARSHAL5): Likewise. (build_arglist_for_builtin): Delete. Fix callers to use build_call_expr instead. (putObject_builtin): Tweak parameter list. Use new CALL_EXPR accessors. (compareAndSwapInt_builtin): Likewise. (compareAndSwapLong_builtin): Likewise. (compareAndSwapObject_builtin): Likewise. (putVolatile_builtin): Likewise. (getVolatile_builtin): Likewise. (VMSupportsCS8_builtin): Likewise. (check_for_builtin): Pass entire CALL_EXPR to builtin expander instead of arglist. * expr.c (build_java_athrow): Use build_call_nary instead of build3. (build_java_throw_out_of_bounds_exception): Likewise. (java_check_reference): Likewise. (build_java_arraystore_check): Likewise. (build_newarray): Likewise. (build_anewarray): Likewise. (expand_java_multinewarray): Use build_call_list instead of build3. (build_java_monitor): Use build_call_nary instead of build3. (java_create_object): Likewise. (expand_java_NEW): Likewise. (build_instanceof): Likewise. (expand_java_CHECKCAST): Likewise. (build_java_soft_divmod): Likewise. (build_java_binop): Likewise. (build_field_ref): Likewise. (build_class_init): Likewise. (rewrite_arglist_getcaller): Use build_call_expr. (build_invokeinterface): Use build_call_nary instead of build3. (expand_invoke): Use build_call_list instead of build3. (build_jni_stub): Use build_call_nary, build_call_list, or build_call_expr instead of build3. (expand_java_field_op): Use build_call_expr instead of build3. (force_evaluation_order): Use new CALL_EXPR accessors. * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors. (objc_get_callee_fndecl): Likewise. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com> Brooks Moses <brooks.moses@codesourcery.com> Lee Millward <lee.millward@codesourcery.com> * trans-expr.c (gfc_conv_power_op): Use build_call_expr. (gfc_conv_string_tmp): Likewise. (gfc_conv_concat_op): Likewise. (gfc_build_compare_string): Likewise. (gfc_conv_function_call): Use build_call_list instead of build3. * trans-array.c (gfc_trans_allocate_array_storage): Use build_call_expr. (gfc_grow_array): Likewise. (gfc_trans_array_ctor_element): Likewise. (gfc_trans_array_constructor_value): Likewise. (gfc_array_allocate): Likewise. (gfc_array_deallocate): Likewise. (gfc_trans_auto_array_allocation): Likewise. (gfc_trans_dummy_array_bias): Likewise. (gfc_conv_array_parameter): Likewise. (gfc_trans_dealloc_allocated): Likewise. (gfc_duplicate_allocatable): Likewise. * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr. (gfc_trans_omp_flush): Likewise. * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr. (gfc_trans_pause): Likewise. (gfc_trans_stop): Likewise. (gfc_trans_character_select): Likewise. (gfc_do_allocate): Likewise. (gfc_trans_assign_need_temp): Likewise. (gfc_trans_pointer_assign_need_temp): Likewise. (gfc_trans_forall_1): Likewise. (gfc_trans_where_2): Likewise. (gfc_trans_allocate): Likewise. (gfc_trans_deallocate): Likewise. * trans.c (gfc_trans_runtime_check): Use build_call_expr. * trans-io.c (gfc_trans_open): Use build_call_expr. (gfc_trans_close): Likewise. (build_filepos): Likewise. (gfc_trans_inquire): Likewise. (NML_FIRST_ARG): Delete. (NML_ADD_ARG): Delete. (transfer_namelist_element): Use build_call_expr. (build_dt): Likewise. (gfc_trans_dt_end): Likewise. (transfer_expr): Likewise. (transfer_array-desc): Likewise. * trans-decl.c (gfc_generate_function_code): Use build_call_expr. (gfc_generate_constructors): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr. (gfc_conv_intrinsic_fdate): Likewise. (gfc_conv_intrinsic_ttynam): Likewise. (gfc_conv_intrinsic_array_transfer): Likewise. (gfc_conv_associated): Likewise. (gfc_conv_intrinsic_si_kind): Likewise. (gfc_conv_intrinsic_trim): Likewise. (gfc_conv_intrinsic_repeat: Likewise. (gfc_conv_intrinsic_iargc): Likewise. Co-Authored-By: Brooks Moses <brooks.moses@codesourcery.com> Co-Authored-By: Lee Millward <lee.millward@codesourcery.com> From-SVN: r122018
2007-02-16 00:50:49 +01:00
return build_call_expr (t, 0);
#endif
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
}
bool
alpha.c (alpha_mangle_type, [...]): Constify. * config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp, alpha_in_small_data_p, alpha_split_complex_arg, alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Constify. * config/arm/arm-protos.h (arm_mangle_type): Likewise. * config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type): Likewise. * config/bfin/bfin.c (funkind, bfin_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/darwin-protos.h (darwin_binds_local_p): Likewise. * config/darwin.c (darwin_binds_local_p): Likewise. * config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p): Likewise. * config/i386/i386-protos.h (i386_pe_binds_local_p, i386_pe_valid_dllimport_attribute_p): Likewise. * config/i386/i386.c (ix86_function_regparm, ix86_comp_type_attributes, ix86_ms_bitfield_layout_p, x86_can_output_mi_thunk, ix86_mangle_type, TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. * config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p, i386_pe_binds_local_p): Likewise. * config/ia64/ia64.c (ia64_first_cycle_multipass_dfa_lookahead_guard_spec, ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type, ia64_invalid_conversion, ia64_invalid_unary_op, ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/m32c/m32c.c (m32c_comp_type_attributes): Likewise. * config/m32r/m32r.c (m32r_in_small_data_p): Likewise. * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/mips/mips.c (mips_use_blocks_for_constant_p, mips_in_small_data_p, mips_use_anchors_for_symbol_p, mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK, mips_near_type_p, mips_far_type_p, mips_global_symbol_p, mips_symbol_binds_local_p, mips_classify_symbol): Likewise. * config/pa/pa.c (pa_commutative_p): Likewise. * config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p): Likewise. * config/rs6000/rs6000.c (rs6000_invalid_within_doloop, rs6000_ms_bitfield_layout_p, rs6000_mangle_type, rs6000_use_blocks_for_constant_p, rs6000_vector_alignment_reachable, rs6000_is_opaque_type, invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise. * config/s390/s390.c (s390_mangle_type, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP): Likewise. * config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK, th_in_small_data_p): Likewise. * config/sh/sh.c (sh_ms_bitfield_layout_p, sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/sparc/sparc.c (sparc_can_output_mi_thunk, sparc_mangle_type): Likewise. * config/spu/spu.c (spu_vector_alignment_reachable): Likewise. * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise. * emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq): Likewise. * hooks.c (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (default_can_output_mi_thunk_no_vcall): Constify. * hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (default_can_output_mi_thunk_no_vcall): Constify. * integrate.c (function_attribute_inlinable_p): Likewise. * integrate.h (function_attribute_inlinable_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * output.h (decl_readonly_section, categorize_decl_for_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Likewise. * rtl.h (rtx_renumbered_equal_p, decl_default_tls_model): Likewise. * target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P, TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P, TARGET_COMP_TYPE_ATTRIBUTES, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE, TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP, TARGET_DWARF_CALLING_CONVENTION): Likewise. * target.h (can_output_mi_thunk, needs_block_p, first_cycle_multipass_dfa_lookahead_guard_spec, vector_alignment_reachable, comp_type_attributes, function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type, commutative_p, use_blocks_for_constant_p, use_anchors_for_symbol_p, in_small_data_p, binds_local_p, vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook, invalid_within_doloop, valid_dllimport_attribute_p, split_complex_arg, invalid_arg_for_unprototyped_fn, invalid_conversion, invalid_unary_op, invalid_binary_op): Likewise. * targhooks.c (default_invalid_within_doloop, hook_invalid_arg_for_unprototyped_fn, default_builtin_vector_alignment_reachable): Likewise. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * targhooks.h (default_invalid_within_doloop, default_builtin_vector_alignment_reachable, hook_invalid_arg_for_unprototyped_fn): Constify. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * varasm.c (bss_initializer_p, decl_default_tls_model, categorize_decl_for_section, decl_readonly_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Constify. From-SVN: r127785
2007-08-24 21:00:59 +02:00
hook_bool_const_rtx_commutative_p (const_rtx x,
int outer_code ATTRIBUTE_UNUSED)
{
return COMMUTATIVE_P (x);
}
rtx
arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard. * config/arm/pe.c (arm_dllexport_p, arm_dllimport_p, arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport, arm_mark_dllimport, arm_pe_encode_section_info, arm_pe_unique_section): Use ISO-C function declarations. * config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION, c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE, c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored): Likewise. * config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning. * config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before defining. * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise. * config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise. (register_move_cost): Use ISO-C function declarations. * config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings. * config/score/score-protos.h (score_declare_object): Add ATTRIBUTE_PRINTF_4. * config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format warnings. * final.c (profile_function): Avoid empty if-bodies. * calls.c (must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Constify. * config/alpha/alpha-protos.h (function_value): Likewise. * config/alpha/alpha.c (alpha_return_in_memory, alpha_pass_by_reference, function_value, unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/arm/arm-protos.h (arm_return_in_memory, arm_pad_arg_upward, arm_function_value): Likewise. * config/arm/arm.c (arm_pass_by_reference, arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, arm_function_value, arm_return_in_memory, arm_pad_arg_upward): Likewise. * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise. * config/avr/avr-protos.h (avr_function_value): Likewise. * config/avr/avr.c (avr_return_in_memory, gas_output_limited_string, gas_output_ascii, avr_function_value, avr_return_in_memory): Likewise. * config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise. * config/bfin/bfin.c (bfin_pass_by_reference, bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/cris/cris.c (cris_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS): Likewise. * config/crx/crx.c (crx_return_in_memory): Likewise. * config/darwin.c (function_base, machopic_function_base_name): Likewise. * config/fr30/fr30.c (fr30_must_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/frv/frv.c (frv_must_pass_in_stack): Likewise. * config/h8300/h8300.c (h8300_return_in_memory): Likewise. * config/i386/i386-protos.h (ix86_return_in_memory, ix86_sol10_return_in_memory): Likewise. * config/i386/i386.c (ix86_function_value, ix86_function_sseregparm, ix86_must_pass_in_stack, type_natural_mode, classify_argument, examine_argument, construct_container, ix86_pass_by_reference, function_value_32, function_value_64, ix86_function_value_1, return_in_memory_32, return_in_memory_64, return_in_memory_ms_64, ix86_return_in_memory, ix86_sol10_return_in_memory, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/ia64/ia64-protos.h (ia64_function_value, ia64_hpux_function_arg_padding): Likewise. * config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory, ia64_function_value, bundle_state_hash, bundle_state_eq_p, ia64_hpux_function_arg_padding): Likewise. * config/iq2000/iq2000-protos.h (function_arg, iq2000_function_value): Likewise. * config/iq2000/iq2000.c (iq2000_return_in_memory, iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg, iq2000_function_value): Likewise. * config/m32c/m32c-protos.h (m32c_function_value, m32c_promote_function_return): Likewise. * config/m32c/m32c.c (m32c_pass_by_reference, m32c_promote_prototypes, m32c_promote_function_return, m32c_function_value): Likewise. * config/m32r/m32r.c (m32r_return_in_memory, m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, m32r_in_small_data_p): Likewise. * config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding): Likewise. * config/m68hc11/m68hc11.c (m68hc11_return_in_memory, m68hc11_function_arg_padding): Likewise. * config/m68k/m68k-protos.h (m68k_function_value): Likewise. * config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES, m68k_function_value): Likewise. * config/mcore/mcore-protos.h (mcore_num_arg_regs, mcore_function_value): Likewise. * config/mcore/mcore.c (handle_structs_in_regs, mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mcore_num_arg_regs, mcore_function_value): Likewise. * config/mips/mips-protos.h (mips_pad_arg_upward, mips_function_value): Likewise. * config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb, mips_return_in_memory, mips_pass_by_reference, mips_callee_copies, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward, mips_function_value): Likewise. * config/mmix/mmix-protos.h (mmix_function_outgoing_value): Likewise. * config/mmix/mmix.c (mmix_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value, mmix_encode_section_info): Likewise. * config/mn10300/mn10300-protos.h (mn10300_function_value): Likewise. * config/mn10300/mn10300.c (mn10300_return_in_memory, mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES, mn10300_function_value): Likewise. * config/mt/mt-protos.h (mt_function_value): Likewise. * config/mt/mt.c (mt_pass_by_reference, mt_function_value, mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/pa/pa-protos.h (function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pa/pa.c (pa_pass_by_reference, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, function_arg_padding, function_value, pa_return_in_memory): Likewise. * config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise. * config/rs6000/rs6000-protos.h (rs6000_function_value, function_arg_padding): Likewise. * config/rs6000/rs6000.c (rs6000_return_in_memory, rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg, rs6000_pass_by_reference, rs6000_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_padding, altivec_expand_dst_builtin, altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins, altivec_init_builtins, rs6000_common_init_builtins, rs6000_function_value): Likewise. * s390/s390-protos.h (s390_function_value): Likewise. * config/s390/s390.c (s390_function_arg_size, s390_pass_by_reference, s390_return_in_memory, s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Likewise. * config/score/score-protos.h (score_function_value): Likewise. * config/score/score.c (score_arg_partial_bytes, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, score_return_in_memory, score_pass_by_reference, score_add_offset, score_function_value): Likewise. * config/sh/sh-protos.h (sh_attr_renesas_p, sh_promote_prototypes): Likewise. * config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference, sh_callee_copies, sh_promote_prototypes, shcompact_byref, sh_attr_renesas_p): Likewise. * config/sparc/sparc-protos.h (function_value, function_arg_padding): Likewise. * config/sparc/sparc.c (sparc_promote_prototypes, sparc_return_in_memory, sparc_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, function_arg_record_value_2, function_arg_record_value_1, function_arg_record_value, function_arg_record_value, function_arg_padding, function_value): Likewise. * config/spu/spu-protos.h (spu_function_value): Likewise. * config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory, spu_function_value): Likewise. * config/stormy16/stormy16-protos.h (xstormy16_function_value): Likewise. * config/stormy16/stormy16.c (xstormy16_return_in_memory, xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/v850/v850.c (v850_return_in_memory, v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise. * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise. * config/xtensa/xtensa.c (xtensa_return_in_msb, xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES): Likewise. * explow.c (promote_mode, hard_function_value): Likewise. * expr.h (hard_function_value, promote_mode): Likewise. * function.c (aggregate_value_p): Likewise. * hooks.c (hook_bool_const_tree_true): New. * hooks.h (hook_bool_const_tree_true): New. * sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify. * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES, TARGET_RETURN_IN_MSB): Likewise. * target.h (promote_function_args, promote_function_return, promote_prototypes, return_in_memory, return_in_msb, pass_by_reference, must_pass_in_stack, callee_copies, function_value): Likewise. * targhooks.c (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * targhooks.h (default_return_in_memory, hook_pass_by_reference_must_pass_in_stack, hook_callee_copies_named, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false, hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true, default_function_value): Likewise. * tree-ssa-structalias.c (const_equiv_class_label_t): New. (equiv_class_label_hash, equiv_class_label_eq): Constify. * tree-vectorizer.c (bb_in_loop_p): Likewise. * tree.c (needs_to_live_in_memory): Likewise. * tree.h (struct tree_type, needs_to_live_in_memory, aggregate_value_p, must_pass_in_stack_var_size, must_pass_in_stack_var_size_or_pad): Likewise. * vmsdbgout.c (write_debug_addr, write_debug_delta4, write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg, lookup_filename): Likewise. From-SVN: r127743
2007-08-23 17:49:56 +02:00
default_function_value (const_tree ret_type ATTRIBUTE_UNUSED,
const_tree fn_decl_or_type,
bool outgoing ATTRIBUTE_UNUSED)
{
/* The old interface doesn't handle receiving the function type. */
if (fn_decl_or_type
&& !DECL_P (fn_decl_or_type))
fn_decl_or_type = NULL;
#ifdef FUNCTION_VALUE
return FUNCTION_VALUE (ret_type, fn_decl_or_type);
#else
gcc_unreachable ();
#endif
}
rtx
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_libcall_value (machine_mode mode ATTRIBUTE_UNUSED,
const_rtx fun ATTRIBUTE_UNUSED)
{
#ifdef LIBCALL_VALUE
return LIBCALL_VALUE (mode);
#else
gcc_unreachable ();
#endif
}
/* The default hook for TARGET_FUNCTION_VALUE_REGNO_P. */
bool
default_function_value_regno_p (const unsigned int regno ATTRIBUTE_UNUSED)
{
#ifdef FUNCTION_VALUE_REGNO_P
return FUNCTION_VALUE_REGNO_P (regno);
#else
gcc_unreachable ();
#endif
}
re PR target/9350 (-fomit-frame-pointer does not work for main) PR target/9350 PR target/24374 * dwarf2out.c (dwarf2out_reg_save_reg): New. (dwarf2out_frame_debug_expr): Return after dwarf_handle_frame_unspec. * function.c (assign_parms): Use calls.internal_arg_pointer. (expand_main_function): Remove FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN code. * target-def.h (TARGET_INTERNAL_ARG_POINTER): New. (TARGET_CALLS): Add it. * target.h (struct gcc_target): Add calls.internal_arg_pointer. * targhooks.c (default_internal_arg_pointer): New. * targhooks.h (default_internal_arg_pointer): Declare. * tree.h (dwarf2out_reg_save_reg): Declare. * doc/tm.texi (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): Remove. * config/i386/i386.c (dbx_register_map): Add return column. (dbx64_register_map, svr4_dbx_register_map): Likewise. (TARGET_INTERNAL_ARG_POINTER, ix86_internal_arg_pointer): New. (TARGET_DWARF_HANDLE_FRAME_UNSPEC, ix86_dwarf_handle_frame_unspec): New. (ix86_function_ok_for_sibcall): Disable if force_align_arg_pointer. (ix86_save_reg): Save force_align_arg_pointer. (ix86_emit_save_regs): Make regno unsigned. (ix86_emit_save_regs_using_mov): Likewise. (ix86_expand_prologue): Handle force_align_arg_pointer. (ix86_expand_epilogue): Likewise. * config/i386/i386.h: (dbx_register_map): Update. (dbx64_register_map, svr4_dbx_register_map): Update. (struct machine_function): Add force_align_arg_pointer. * config/i386/i386.md (UNSPEC_REG_SAVE, UNSPEC_DEF_CFA): New. (UNSPEC_TP, UNSPEC_TLS_GD, UNSPEC_TLS_LD_BASE): Renumber. (TARGET_PUSH_MEMORY peepholes): Disable if RTX_FRAME_RELATED_P. From-SVN: r106420
2005-11-03 02:40:33 +01:00
rtx
default_internal_arg_pointer (void)
{
/* If the reg that the virtual arg pointer will be translated into is
not a fixed reg or is the stack pointer, make a copy of the virtual
arg pointer, and address parms via the copy. The frame pointer is
considered fixed even though it is not marked as such. */
if ((ARG_POINTER_REGNUM == STACK_POINTER_REGNUM
|| ! (fixed_regs[ARG_POINTER_REGNUM]
|| ARG_POINTER_REGNUM == FRAME_POINTER_REGNUM)))
return copy_to_reg (virtual_incoming_args_rtx);
else
return virtual_incoming_args_rtx;
}
re PR target/41246 (should "sorry" when regparm=3 and nested functions are encountered) PR target/41246 * target.h (struct gcc_target): Add asm_out.trampoline_template, calls.static_chain, calls.trampoline_init, calls.trampoline_adjust_address. * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New. (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New. (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New. * builtins.c (expand_builtin_setjmp_receiver): Use targetm.calls.static_chain; only clobber registers. (expand_builtin_init_trampoline): Use targetm.calls.trampoline_init; set up memory attributes properly for the trampoline block. (expand_builtin_adjust_trampoline): Use targetm.calls.trampoline_adjust_address. * calls.c (prepare_call_address): Add fndecl argument. Use targetm.calls.static_chain. * df-scan.c (df_need_static_chain_reg): Remove. (df_get_entry_block_def_set): Use targetm.calls.static_chain; consolodate static chain handling. * doc/tm.texi: Document new hooks. * emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove. (init_emit_regs): Don't initialize them. * expr.h (prepare_call_address): Update decl. * final.c (profile_function): Use targetm.calls.static_chain. * function.c (expand_function_start): Likewise. * rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove. * stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain; only clobber registers. * targhooks.c (default_static_chain): New. (default_asm_trampoline_template, default_trampoline_init): New. (default_trampoline_adjust_address): New. * targhooks.h: Declare them. * varasm.c (assemble_trampoline_template): Use targetm.asm_out.trampoline_template. Make the memory block const and set its size. From-SVN: r151983
2009-09-22 17:11:37 +02:00
rtx
default_static_chain (const_tree ARG_UNUSED (fndecl_or_type), bool incoming_p)
re PR target/41246 (should "sorry" when regparm=3 and nested functions are encountered) PR target/41246 * target.h (struct gcc_target): Add asm_out.trampoline_template, calls.static_chain, calls.trampoline_init, calls.trampoline_adjust_address. * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New. (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New. (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New. * builtins.c (expand_builtin_setjmp_receiver): Use targetm.calls.static_chain; only clobber registers. (expand_builtin_init_trampoline): Use targetm.calls.trampoline_init; set up memory attributes properly for the trampoline block. (expand_builtin_adjust_trampoline): Use targetm.calls.trampoline_adjust_address. * calls.c (prepare_call_address): Add fndecl argument. Use targetm.calls.static_chain. * df-scan.c (df_need_static_chain_reg): Remove. (df_get_entry_block_def_set): Use targetm.calls.static_chain; consolodate static chain handling. * doc/tm.texi: Document new hooks. * emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove. (init_emit_regs): Don't initialize them. * expr.h (prepare_call_address): Update decl. * final.c (profile_function): Use targetm.calls.static_chain. * function.c (expand_function_start): Likewise. * rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove. * stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain; only clobber registers. * targhooks.c (default_static_chain): New. (default_asm_trampoline_template, default_trampoline_init): New. (default_trampoline_adjust_address): New. * targhooks.h: Declare them. * varasm.c (assemble_trampoline_template): Use targetm.asm_out.trampoline_template. Make the memory block const and set its size. From-SVN: r151983
2009-09-22 17:11:37 +02:00
{
if (incoming_p)
{
#ifdef STATIC_CHAIN_INCOMING_REGNUM
return gen_rtx_REG (Pmode, STATIC_CHAIN_INCOMING_REGNUM);
#endif
}
#ifdef STATIC_CHAIN_REGNUM
return gen_rtx_REG (Pmode, STATIC_CHAIN_REGNUM);
#endif
{
static bool issued_error;
if (!issued_error)
{
issued_error = true;
sorry ("nested functions not supported on this target");
}
/* It really doesn't matter what we return here, so long at it
doesn't cause the rest of the compiler to crash. */
return gen_rtx_MEM (Pmode, stack_pointer_rtx);
}
re PR target/41246 (should "sorry" when regparm=3 and nested functions are encountered) PR target/41246 * target.h (struct gcc_target): Add asm_out.trampoline_template, calls.static_chain, calls.trampoline_init, calls.trampoline_adjust_address. * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New. (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New. (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New. * builtins.c (expand_builtin_setjmp_receiver): Use targetm.calls.static_chain; only clobber registers. (expand_builtin_init_trampoline): Use targetm.calls.trampoline_init; set up memory attributes properly for the trampoline block. (expand_builtin_adjust_trampoline): Use targetm.calls.trampoline_adjust_address. * calls.c (prepare_call_address): Add fndecl argument. Use targetm.calls.static_chain. * df-scan.c (df_need_static_chain_reg): Remove. (df_get_entry_block_def_set): Use targetm.calls.static_chain; consolodate static chain handling. * doc/tm.texi: Document new hooks. * emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove. (init_emit_regs): Don't initialize them. * expr.h (prepare_call_address): Update decl. * final.c (profile_function): Use targetm.calls.static_chain. * function.c (expand_function_start): Likewise. * rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove. * stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain; only clobber registers. * targhooks.c (default_static_chain): New. (default_asm_trampoline_template, default_trampoline_init): New. (default_trampoline_adjust_address): New. * targhooks.h: Declare them. * varasm.c (assemble_trampoline_template): Use targetm.asm_out.trampoline_template. Make the memory block const and set its size. From-SVN: r151983
2009-09-22 17:11:37 +02:00
}
void
default_trampoline_init (rtx ARG_UNUSED (m_tramp), tree ARG_UNUSED (t_func),
rtx ARG_UNUSED (r_chain))
{
sorry ("nested function trampolines not supported on this target");
}
reginfo.c (init_reg_sets_1): Adjust comments. * reginfo.c (init_reg_sets_1): Adjust comments. * combine-stack-adj.c (rest_of_handle_stack_adjustments): Likewise. * calls.c (prepare_call_address): Likewise. (emit_call_1): Use targetm.calls.return_pops_args. (expand_call): Likewise. * function.c (assign_parms): Likewise. * system.h (RETURN_POPS_ARGS): Add to #pragma poison list. * target.h (struct gcc_target) [struct calls]: Add return_pops_args field. * targhooks.h (default_return_pops_args): Declare. * targhooks.c (default_return_pops_args): Define. * target-def.h (TARGET_RETURN_POPS_ARGS): Define. (TARGET_CALLS): Add TARGET_RETURN_POPS_ARGS. * doc/tm.texi (RETURN_POPS_ARGS): Rename to... (TARGET_RETURN_POPS_ARGS): ...this. Use deftypefn. Adjust documentation. * config/alpha/alpha.h (RETURN_POPS_ARGS): Delete. * config/arc/arc.h (RETURN_POPS_ARGS): Likewise. * config/arm/arm.h (RETURN_POPS_ARGS): Likewise. * config/avr/avr.h (RETURN_POPS_ARGS): Likewise. * config/bfin/bfin.h (RETURN_POPS_ARGS): Likewise. * config/cris/cris.h (RETURN_POPS_ARGS): Likewise. * config/crx/crx.h (RETURN_POPS_ARGS): Likewise. * config/fr30/fr30.h (RETURN_POPS_ARGS): Likewise. * config/frv/frv.h (RETURN_POPS_ARGS): Likewise. * config/h8300/h8300.h (RETURN_POPS_ARGS): Likewise. * config/ia64/ia64.h (RETURN_POPS_ARGS): Likewise. * config/iq2000/iq2000.h (RETURN_POPS_ARGS): Likewise. * config/lm32/lm32.h (RETURN_POPS_ARGS): Likewise. * config/m32c/m32c.h (RETURN_POPS_ARGS): Likewise. * config/m32r/m32r.h (RETURN_POPS_ARGS): Likewise. * config/m68hc11/m68hc11.h (RETURN_POPS_ARGS): Likewise. * config/mcore/mcore.h (RETURN_POPS_ARGS): Likewise. * config/mep/mep.h (RETURN_POPS_ARGS): Likewise. * config/mips/mips.h (RETURN_POPS_ARGS): Likewise. * config/mmix/mmix.h (RETURN_POPS_ARGS): Likewise. * config/mn10300/mn10300.h (RETURN_POPS_ARGS): Likewise. * config/moxie/moxie.h (RETURN_POPS_ARGS): Likewise. * config/pa/pa.h (RETURN_POPS_ARGS): Likewise. * config/pdp11/pdp11.h (RETURN_POPS_ARGS): Likewise. * config/picochip/picochip.h (RETURN_POPS_ARGS): Likewise. * config/rs6000/rs6000.h (RETURN_POPS_ARGS): Likewise. * config/rx/rx.h (RETURN_POPS_ARGS): Likewise. * config/s390/s390.h (RETURN_POPS_ARGS): Likewise. * config/score/score.h (RETURN_POPS_ARGS): Likewise. * config/sh/sh.h (RETURN_POPS_ARGS): Likewise. * config/sparc/sparc.h (RETURN_POPS_ARGS): Likewise. * config/spu/spu.h (RETURN_POPS_ARGS): Likewise. * config/stormy16/stormy16.h (RETURN_POPS_ARGS): Likewise. * config/v850/v850.h (RETURN_POPS_ARGS): Likewise. * config/xtensa/xtensa.h (RETURN_POPS_ARGS): Likewise. * config/i386/i386-protos.h (ix86_return_pops_args): Delete. * config/i386/i386.h (RETURN_POPS_ARGS): Delete. * config/i386/i386.c (ix86_return_pops_args): Make static. Constify arguments. (TARGET_RETURN_POPS_ARGS): Define. * config/m68k/m68k.h (RETURN_POPS_ARGS): Move to... * config/m68k/m68k.c (m68k_return_pops_args): ...here. New function. (TARGET_RETURN_POPS_ARGS): Define. * config/vax/vax.h (RETURN_POPS_ARGS): Move to... * config/vax/vax.c (vax_return_pops_args): ...here. New function. (TARGET_RETURN_POPS_ARGS): Define. From-SVN: r161528
2010-06-29 14:18:36 +02:00
int
default_return_pops_args (tree fundecl ATTRIBUTE_UNUSED,
tree funtype ATTRIBUTE_UNUSED,
int size ATTRIBUTE_UNUSED)
{
return 0;
}
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
reg_class_t
collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. ./: * collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. * dce.c (run_fast_df_dce): Change type of old_flags to int. * df-core.c (df_set_flags): Change return type to int. Change type of old_flags to int. (df_clear_flags): Likewise. * df-scan.c (df_def_record_1): Change 0 to VOIDmode. (df_get_conditional_uses): Likewise. * df.h (df_set_flags, df_clear_flags): Update declarations. * dwarf2out.c (struct indirect_string_node): Change type of form field to enum dwarf_form. (AT_string_form): Change return type to enum dwarf_form. * fixed-value.c (fixed_compare): Add cast to enum type. * fwprop.c (update_df): Change 0 to VOIDmode. * gensupport.c: Change 0 to UNKNOWN. * gimple.h (gimple_cond_code): Add cast to enum type. * haifa-sched.c (reemit_notes): Add cast to enum type. * hooks.c (hook_int_void_no_regs): Remove function. * hooks.h (hook_int_void_no_regs): Remove declaration. * optabs.c (expand_widen_pattern_expr): Change 0 to VOIDmode. * predict.c (combine_predictions_for_insn): Add casts to enum type. * real.c (real_arithmetic): Add cast to enum type. (real_compare): Likewise. * target.h (struct gcc_target): Change return type of branch_target_register_class to enum reg_class. * target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Define as default_branch_target_register_class. * targhooks.c (default_branch_target_register_class): New function. * targhooks.h (default_branch_target_register_class): Declare. * tree-data-ref.c (print_direction_vector): Add cast to enum type. * tree-vect-data-refs.c (vect_supportable_dr_alignment): Remove cast to int. * tree-vect-loop.c (vect_create_epilog_for_reduction): Change 0 to ERROR_MARK. * tree-vect-slp.c (vect_build_slp_tree): Change 0 to vect_uninitialized_def. Change 0 to ERROR_MARK. * tree-vect-stmts.c (supportable_widening_operation): Don't initialize icode1 and icode2. * tree-vectorizer.h (enum vect_def_type): Add vect_uninitialized_def. * config/sol2-c.c (cmn_err_length_specs): Change 0 to FMT_LEN_none and to STD_C89. (cmn_err_flag_specs): Change 0 to STD_C89. (cmn_err_char_table): Likewise. * config/arm/arm.c (get_arm_condition_code): Change type of code to enum arm_cond_code. (IWMMXT_BUILTIN): Change 0 to UNKNOWN. (IWMMXT_BUILTIN2): Likewise. (neon_builtin_type_bits): Don't define typedef. (neon_builtin_datum): Change type of bits field to int. (arm_expand_neon_args): Add cast to enum type. * config/ia64/ia64.c (tls_symbolic_operand_type): Change 0 to TLS_MODEL_NONE. * config/i386/i386.c (bdesc_multi_arg): Change 0 to UNKNOWN. Add casts to enum type. * config/mips/mips.c (LOONGSON_BUILTIN_ALIAS): Change 0 to MIPS_FP_COND_f. * config/mips/mips.md (jal_macro): Return enum constant. (single_insn): Likewise. * config/rs6000/rs6000.c (bdesc_altivec_preds): Change 0 to CODE_FOR_nothing. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add casts to enum type. * config/s390/s390.c (s390_tune_flags): Change type to int. (s390_arch_flags): Likewise. (s390_handle_arch_option): Change flags field of struct pta to int. * config/s390/s390.h (s390_tune_flags): Update declaration. (s390_arch_flags): Likewise. * config/sh/sh.c (prepare_move_operands): Compare tls_symbolic_operand result with enum constant. (sh_reorg): Change PUT_MODE to PUT_REG_NOTE_KIND. (sh_expand_prologue): Add cast to enum type. (sh_expand_epilogue): Likewise. (tls_symbolic_operand): Change return type to enum tls_model. (fpscr_set_from_mem): Add cast to enum type. (legitimize_pic_address): Compare tls_symbolic_operand result with enum constant. (sh_target_reg_class): Change return type to enum reg_class. * config/sh/sh.h (OVERRIDE_OPTIONS): Change CPU_xxx to PROCESSOR_xxx. * config/sh/sh-protos.h (tls_symbolic_operand): Update declaration. * config/sparc/sparc.c (sparc_override_options): Add cast to enum type. * config/sparc/sparc.md (empty_delay_slot): Return enum constant. (pic, calls_alloca, calls_eh_return, leaf_function): Likewise. (delayed_branch, tls_call_delay): Likewise. (eligible_for_sibcall_delay): Likewise. (eligible_for_return_delay): Likewise. * config/spu/spu.c (expand_builtin_args): Add cast to enum type. (spu_expand_builtin_1): Likewise. * c-typeck.c (convert_for_assignment): Issue -Wc++-compat warnings for all types of conversions. (output_init_element): Issue -Wc++-compat warning if needed when initializing a bitfield with enum type. * c-parser.c (c_parser_expression): Set original_type to original_type of right hand operand of comman operator. cp/: * semantics.c (finish_omp_clauses): Change type of c_kind to enum omp_clause_code. fortran/: * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum type. * trans-io.c (st_parameter_field): Add casts to enum type. java/: * builtins.c (java_builtins): Add casts to enum type. * verify-impl.c (check_class_constant): Add cast to enum type. (check_constant, check_wide_constant): Likewise. objc/: * objc-act.c (objc_gimplify_expr): Add casts to enum type. testsuite/: * gcc.dg/Wcxx-compat-5.c: New testcase. * gcc.dg/Wcxx-compat-6.c: New testcase. From-SVN: r146855
2009-04-27 22:25:48 +02:00
default_branch_target_register_class (void)
{
return NO_REGS;
}
reg_class_t
default_ira_change_pseudo_allocno_class (int regno ATTRIBUTE_UNUSED,
Improve TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS target hook. Improve TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS target hook. It turns out there is another case where the register allocator uses the union of register classes without checking that the cost of the resulting register class is lower than both (see https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01765.html ). This happens when the cost of the best and alternative class are both lower than the memory cost. In this case we typically end up with ALL_REGS as the allocno class, which almost invariably results in bad allocations with many redundant int<->FP moves (which are expensive on various cores). AArch64 is affected by this significantly due to supporting many scalar integer operations in SIMD. Currently the TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS hook forces the class to GENERAL_REGS if the allocno class is ALL_REGS and the register has an integer mode. This is bad if the best class happens to be FP_REGS. To handle this case as well, an extra argument is needed in the hook to pass the best class. If the allocno class is ALL_REGS, but the best class isn't, we use the best class instead (rather than using the mode to force to GENERAL_REGS or FP_REGS). Previously this might happen: r79: preferred FP_REGS, alternative GENERAL_REGS, allocno GENERAL_REGS a1 (r79,l0) best GENERAL_REGS, allocno GENERAL_REGS a1(r79,l0) costs: CALLER_SAVE_REGS:5000,5000 GENERAL_REGS:5000,5000 FP_LO_REGS:0,0 FP_REGS:0,0 ALL_REGS:10000,10000 MEM:9000,9000 The proposed allocno is ALL_REGS (despite having the highest cost!) and is then forced by the hook to GENERAL_REGS because r79 has integer mode. However FP_REGS has the lowest cost. After this patch the choice is as follows: r79: preferred FP_REGS, alternative GENERAL_REGS, allocno FP_REGS a1 (r79,l0) best FP_REGS, allocno FP_REGS As a result it is now no longer a requirement to use register move costs that are larger than the memory move cost. So it will be feasible to use realistic costs for both without a huge penalty. 2016-02-02 Wilco Dijkstra <wdijkstr@arm.com> gcc/ * ira-costs.c (find_costs_and_classes): Add extra argument. * target.def (ira_change_pseudo_allocno_class): Add parameter. * targhooks.h (ira_change_pseudo_allocno_class): Likewise. * targhooks.c (ira_change_pseudo_allocno_class): Likewise. * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class) Add best_class parameter, and return it if not ALL_REGS. * config/mips/mips.c (mips_ira_change_pseudo_allocno_class): Add parameter. * doc/tm.texi (TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS): Update target hook. From-SVN: r233084
2016-02-02 18:12:56 +01:00
reg_class_t cl,
reg_class_t best_cl ATTRIBUTE_UNUSED)
{
return cl;
}
dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. 2012-10-23 Vladimir Makarov <vmakarov@redhat.com> * dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. * dwarf2out.c: Include ira.h and lra.h. (based_loc_descr, compute_frame_pointer_to_fb_displacement): Use lra_eliminate_regs for LRA instead of eliminate_regs. * expr.c (emit_move_insn_1): Pass an additional argument to emit_move_via_integer. Use emit_move_via_integer for LRA only if the insn is recognized. * emit-rtl.c (gen_rtx_REG): Add lra_in_progress. (validate_subreg): Don't check offset for LRA and floating point modes. * final.c (final_scan_insn, cleanup_subreg_operands): Pass new argument to alter_subreg. (walk_alter_subreg, output_operand): Ditto. (alter_subreg): Add new argument. * gcse.c (calculate_bb_reg_pressure): Add parameter to ira_setup_eliminable_regset call. * ira.c: Include lra.h. (ira_init_once, ira_init, ira_finish_once): Call lra_start_once, lra_init, lra_finish_once in anyway. (ira_setup_eliminable_regset): Add parameter. Remove need_fp. Call lra_init_elimination and mark HARD_FRAME_POINTER_REGNUM as living forever if frame_pointer_needed. (setup_reg_class_relations): Set up ira_reg_class_subset. (ira_reg_equiv_invariant_p, ira_reg_equiv_const): Remove. (find_reg_equiv_invariant_const): Ditto. (setup_reg_renumber): Use ira_equiv_no_lvalue_p instead of ira_reg_equiv_invariant_p. Skip caps for LRA. (setup_reg_equiv_init, ira_update_equiv_info_by_shuffle_insn): New functions. (ira_reg_equiv_len, ira_reg_equiv): New externals. (ira_reg_equiv): New. (ira_expand_reg_equiv, init_reg_equiv, finish_reg_equiv): New functions. (no_equiv, update_equiv_regs): Use ira_reg_equiv instead of reg_equiv_init. (setup_reg_equiv): New function. (ira_use_lra_p): New global. (ira): Set up lra_simple_p and ira_conflicts_p. Set up and restore flag_caller_saves and flag_ira_region. Move initialization of ira_obstack and ira_bitmap_obstack upper. Call init_reg_equiv, setup_reg_equiv, and setup_reg_equiv_init instead of initialization of ira_reg_equiv_len, ira_reg_equiv_invariant_p, and ira_reg_equiv_const. Call ira_setup_eliminable_regset with a new argument. Don't flatten IRA IRA for LRA. Don't reassign conflict allocnos for LRA. Call finish_reg_equiv. (do_reload): Prepare code for LRA call. Call LRA. * ira.h (ira_use_lra_p): New external. (struct target_ira): Add members x_ira_class_subset_p x_ira_reg_class_subset, and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_class_subset): New macros. (ira_reg_classes_intersect_p): New macro. (struct ira_reg_equiv): New. (ira_setup_eliminable_regset): Add an argument. (ira_expand_reg_equiv, ira_update_equiv_info_by_shuffle_insn): New prototypes. * ira-color.c (color_pass, move_spill_restore, coalesce_allocnos): Use ira_equiv_no_lvalue_p. (coalesce_spill_slots, ira_sort_regnos_for_alter_reg): Ditto. * ira-emit.c (ira_create_new_reg): Call ira_expand_reg_equiv. (generate_edge_moves, change_loop) Use ira_equiv_no_lvalue_p. (emit_move_list): Simplify code. Call ira_update_equiv_info_by_shuffle_insn. Use ira_reg_equiv instead of ira_reg_equiv_invariant_p and ira_reg_equiv_const. Change assert. * ira-int.h (struct target_ira_int): Remove x_ira_class_subset_p and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_classes_intersect_p): Remove. (ira_reg_equiv_len, ira_reg_equiv_invariant_p): Ditto. (ira_reg_equiv_const): Ditto. (ira_equiv_no_lvalue_p): New function. * jump.c (true_regnum): Always use hard_regno for subreg_get_info when lra is in progress. * haifa-sched.c (sched_init): Pass new argument to ira_setup_eliminable_regset. * loop-invariant.c (calculate_loop_reg_pressure): Pass new argument to ira_setup_eliminable_regset. * lra.h: New. * lra-int.h: Ditto. * lra.c: Ditto. * lra-assigns.c: Ditto. * lra-constraints.c: Ditto. * lra-coalesce.c: Ditto. * lra-eliminations.c: Ditto. * lra-lives.c: Ditto. * lra-spills.c: Ditto. * Makefile.in (LRA_INT_H): New. (OBJS): Add lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o, lra-eliminations.o, lra-lives.o, and lra-spills.o. (dwarf2out.o): Add dependence on ira.h and lra.h. (ira.o): Add dependence on lra.h. (lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o): New entries. (lra-eliminations.o, lra-lives.o, lra-spills.o): Ditto. * output.h (alter_subreg): Add new argument. * rtlanal.c (simplify_subreg_regno): Permit mode changes for LRA. Permit ARG_POINTER_REGNUM and STACK_POINTER_REGNUM for LRA. * recog.c (general_operand, register_operand): Accept paradoxical FLOAT_MODE subregs for LRA. (scratch_operand): Accept pseudos for LRA. * rtl.h (lra_in_progress): New external. (debug_bb_n_slim, debug_bb_slim, print_value_slim): New prototypes. (debug_rtl_slim, debug_insn_slim): Ditto. * sdbout.c (sdbout_symbol): Pass new argument to alter_subreg. * sched-vis.c (print_value_slim): New. * target.def (lra_p): New hook. (register_priority): Ditto. (different_addr_displacement_p): Ditto. (spill_class): Ditto. * target-globals.h (this_target_lra_int): New external. (target_globals): New member lra_int. (restore_target_globals): Restore this_target_lra_int. * target-globals.c: Include lra-int.h. (default_target_globals): Add &default_target_lra_int. * targhooks.c (default_lra_p): New function. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * targhooks.h (default_lra_p): Declare. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * timevar.def (TV_LRA, TV_LRA_ELIMINATE, TV_LRA_INHERITANCE): New. (TV_LRA_CREATE_LIVE_RANGES, TV_LRA_ASSIGN, TV_LRA_COALESCE): New. * config/arm/arm.c (load_multiple_sequence): Pass new argument toOB alter_subreg. (store_multiple_sequence): Ditto. * config/i386/i386.h (enum ix86_tune_indices): Add X86_TUNE_GENERAL_REGS_SSE_SPILL. (TARGET_GENERAL_REGS_SSE_SPILL): New macro. * config/i386/i386.c (initial_ix86_tune_features): Set up X86_TUNE_GENERAL_REGS_SSE_SPILL for m_COREI7 and m_CORE2I7. (ix86_lra_p, ix86_register_priority): New functions. (ix86_secondary_reload): Add NON_Q_REGS, SIREG, DIREG. (inline_secondary_memory_needed): Change assert. (ix86_spill_class): New function. (TARGET_LRA_P, TARGET_REGISTER_BANK, TARGET_SPILL_CLASS): New macros. * config/m68k/m68k.c (emit_move_sequence): Pass new argument to alter_subreg. * config/m32r/m32r.c (gen_split_move_double): Ditto. * config/pa/pa.c (pa_emit_move_sequence): Ditto. * config/sh/sh.md: Ditto. * config/v850/v850.c (v850_reorg): Ditto. * config/xtensa/xtensa.c (fixup_subreg_mem): Ditto. * doc/md.texi: Add new interpretation of hint * for LRA. * doc/passes.texi: Describe LRA pass. * doc/tm.texi.in: Add TARGET_LRA_P, TARGET_REGISTER_PRIORITY, TARGET_DIFFERENT_ADDR_DISPLACEMENT_P, and TARGET_SPILL_CLASS. * doc/tm.texi: Update. From-SVN: r192719
2012-10-23 17:51:41 +02:00
extern bool
default_lra_p (void)
{
return false;
}
int
default_register_priority (int hard_regno ATTRIBUTE_UNUSED)
{
return 0;
}
extern bool
default_register_usage_leveling_p (void)
{
return false;
}
dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. 2012-10-23 Vladimir Makarov <vmakarov@redhat.com> * dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. * dwarf2out.c: Include ira.h and lra.h. (based_loc_descr, compute_frame_pointer_to_fb_displacement): Use lra_eliminate_regs for LRA instead of eliminate_regs. * expr.c (emit_move_insn_1): Pass an additional argument to emit_move_via_integer. Use emit_move_via_integer for LRA only if the insn is recognized. * emit-rtl.c (gen_rtx_REG): Add lra_in_progress. (validate_subreg): Don't check offset for LRA and floating point modes. * final.c (final_scan_insn, cleanup_subreg_operands): Pass new argument to alter_subreg. (walk_alter_subreg, output_operand): Ditto. (alter_subreg): Add new argument. * gcse.c (calculate_bb_reg_pressure): Add parameter to ira_setup_eliminable_regset call. * ira.c: Include lra.h. (ira_init_once, ira_init, ira_finish_once): Call lra_start_once, lra_init, lra_finish_once in anyway. (ira_setup_eliminable_regset): Add parameter. Remove need_fp. Call lra_init_elimination and mark HARD_FRAME_POINTER_REGNUM as living forever if frame_pointer_needed. (setup_reg_class_relations): Set up ira_reg_class_subset. (ira_reg_equiv_invariant_p, ira_reg_equiv_const): Remove. (find_reg_equiv_invariant_const): Ditto. (setup_reg_renumber): Use ira_equiv_no_lvalue_p instead of ira_reg_equiv_invariant_p. Skip caps for LRA. (setup_reg_equiv_init, ira_update_equiv_info_by_shuffle_insn): New functions. (ira_reg_equiv_len, ira_reg_equiv): New externals. (ira_reg_equiv): New. (ira_expand_reg_equiv, init_reg_equiv, finish_reg_equiv): New functions. (no_equiv, update_equiv_regs): Use ira_reg_equiv instead of reg_equiv_init. (setup_reg_equiv): New function. (ira_use_lra_p): New global. (ira): Set up lra_simple_p and ira_conflicts_p. Set up and restore flag_caller_saves and flag_ira_region. Move initialization of ira_obstack and ira_bitmap_obstack upper. Call init_reg_equiv, setup_reg_equiv, and setup_reg_equiv_init instead of initialization of ira_reg_equiv_len, ira_reg_equiv_invariant_p, and ira_reg_equiv_const. Call ira_setup_eliminable_regset with a new argument. Don't flatten IRA IRA for LRA. Don't reassign conflict allocnos for LRA. Call finish_reg_equiv. (do_reload): Prepare code for LRA call. Call LRA. * ira.h (ira_use_lra_p): New external. (struct target_ira): Add members x_ira_class_subset_p x_ira_reg_class_subset, and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_class_subset): New macros. (ira_reg_classes_intersect_p): New macro. (struct ira_reg_equiv): New. (ira_setup_eliminable_regset): Add an argument. (ira_expand_reg_equiv, ira_update_equiv_info_by_shuffle_insn): New prototypes. * ira-color.c (color_pass, move_spill_restore, coalesce_allocnos): Use ira_equiv_no_lvalue_p. (coalesce_spill_slots, ira_sort_regnos_for_alter_reg): Ditto. * ira-emit.c (ira_create_new_reg): Call ira_expand_reg_equiv. (generate_edge_moves, change_loop) Use ira_equiv_no_lvalue_p. (emit_move_list): Simplify code. Call ira_update_equiv_info_by_shuffle_insn. Use ira_reg_equiv instead of ira_reg_equiv_invariant_p and ira_reg_equiv_const. Change assert. * ira-int.h (struct target_ira_int): Remove x_ira_class_subset_p and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_classes_intersect_p): Remove. (ira_reg_equiv_len, ira_reg_equiv_invariant_p): Ditto. (ira_reg_equiv_const): Ditto. (ira_equiv_no_lvalue_p): New function. * jump.c (true_regnum): Always use hard_regno for subreg_get_info when lra is in progress. * haifa-sched.c (sched_init): Pass new argument to ira_setup_eliminable_regset. * loop-invariant.c (calculate_loop_reg_pressure): Pass new argument to ira_setup_eliminable_regset. * lra.h: New. * lra-int.h: Ditto. * lra.c: Ditto. * lra-assigns.c: Ditto. * lra-constraints.c: Ditto. * lra-coalesce.c: Ditto. * lra-eliminations.c: Ditto. * lra-lives.c: Ditto. * lra-spills.c: Ditto. * Makefile.in (LRA_INT_H): New. (OBJS): Add lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o, lra-eliminations.o, lra-lives.o, and lra-spills.o. (dwarf2out.o): Add dependence on ira.h and lra.h. (ira.o): Add dependence on lra.h. (lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o): New entries. (lra-eliminations.o, lra-lives.o, lra-spills.o): Ditto. * output.h (alter_subreg): Add new argument. * rtlanal.c (simplify_subreg_regno): Permit mode changes for LRA. Permit ARG_POINTER_REGNUM and STACK_POINTER_REGNUM for LRA. * recog.c (general_operand, register_operand): Accept paradoxical FLOAT_MODE subregs for LRA. (scratch_operand): Accept pseudos for LRA. * rtl.h (lra_in_progress): New external. (debug_bb_n_slim, debug_bb_slim, print_value_slim): New prototypes. (debug_rtl_slim, debug_insn_slim): Ditto. * sdbout.c (sdbout_symbol): Pass new argument to alter_subreg. * sched-vis.c (print_value_slim): New. * target.def (lra_p): New hook. (register_priority): Ditto. (different_addr_displacement_p): Ditto. (spill_class): Ditto. * target-globals.h (this_target_lra_int): New external. (target_globals): New member lra_int. (restore_target_globals): Restore this_target_lra_int. * target-globals.c: Include lra-int.h. (default_target_globals): Add &default_target_lra_int. * targhooks.c (default_lra_p): New function. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * targhooks.h (default_lra_p): Declare. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * timevar.def (TV_LRA, TV_LRA_ELIMINATE, TV_LRA_INHERITANCE): New. (TV_LRA_CREATE_LIVE_RANGES, TV_LRA_ASSIGN, TV_LRA_COALESCE): New. * config/arm/arm.c (load_multiple_sequence): Pass new argument toOB alter_subreg. (store_multiple_sequence): Ditto. * config/i386/i386.h (enum ix86_tune_indices): Add X86_TUNE_GENERAL_REGS_SSE_SPILL. (TARGET_GENERAL_REGS_SSE_SPILL): New macro. * config/i386/i386.c (initial_ix86_tune_features): Set up X86_TUNE_GENERAL_REGS_SSE_SPILL for m_COREI7 and m_CORE2I7. (ix86_lra_p, ix86_register_priority): New functions. (ix86_secondary_reload): Add NON_Q_REGS, SIREG, DIREG. (inline_secondary_memory_needed): Change assert. (ix86_spill_class): New function. (TARGET_LRA_P, TARGET_REGISTER_BANK, TARGET_SPILL_CLASS): New macros. * config/m68k/m68k.c (emit_move_sequence): Pass new argument to alter_subreg. * config/m32r/m32r.c (gen_split_move_double): Ditto. * config/pa/pa.c (pa_emit_move_sequence): Ditto. * config/sh/sh.md: Ditto. * config/v850/v850.c (v850_reorg): Ditto. * config/xtensa/xtensa.c (fixup_subreg_mem): Ditto. * doc/md.texi: Add new interpretation of hint * for LRA. * doc/passes.texi: Describe LRA pass. * doc/tm.texi.in: Add TARGET_LRA_P, TARGET_REGISTER_PRIORITY, TARGET_DIFFERENT_ADDR_DISPLACEMENT_P, and TARGET_SPILL_CLASS. * doc/tm.texi: Update. From-SVN: r192719
2012-10-23 17:51:41 +02:00
extern bool
default_different_addr_displacement_p (void)
{
return false;
}
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
reg_class_t
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
default_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
reg_class_t reload_class_i ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode reload_mode ATTRIBUTE_UNUSED,
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
secondary_reload_info *sri)
{
enum reg_class rclass = NO_REGS;
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
enum reg_class reload_class = (enum reg_class) reload_class_i;
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
if (sri->prev_sri && sri->prev_sri->t_icode != CODE_FOR_nothing)
{
sri->icode = sri->prev_sri->t_icode;
return NO_REGS;
}
#ifdef SECONDARY_INPUT_RELOAD_CLASS
if (in_p)
rclass = SECONDARY_INPUT_RELOAD_CLASS (reload_class, reload_mode, x);
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
#endif
#ifdef SECONDARY_OUTPUT_RELOAD_CLASS
if (! in_p)
rclass = SECONDARY_OUTPUT_RELOAD_CLASS (reload_class, reload_mode, x);
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
#endif
if (rclass != NO_REGS)
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
{
gcc/ * optabs.h (reload_in_optab, reload_out_optab, code_to_optab) (vcond_gen_code, vcondu_gen_code, movmem_optab, setmem_optab) (cmpstr_optab, cmpstrn_optab, cmpmem_optab, sync_add_optab) (sync_sub_optab, sync_ior_optab, sync_and_optab, sync_xor_optab) (sync_nand_optab, sync_old_add_optab, sync_old_sub_optab) (sync_old_ior_optab, sync_old_and_optab, sync_old_xor_optab) (sync_old_nand_optab, sync_new_add_optab, sync_new_sub_optab) (sync_new_ior_optab, sync_new_and_optab, sync_new_xor_optab) (sync_new_nand_optab): Redefine as macros. (sync_compare_and_swap, sync_lock_test_and_set, sync_lock_release): Delete. (direct_optab_index): New enum. (direct_optab_d): New structure. (direct_optab): New typedef. (direct_optab_table): Declare. (direct_optab_handler, set_direct_optab_handler): New functions. (sync_compare_and_swap_optab, sync_lock_test_and_set_optab) (sync_lock_release_optab): New macros. * optabs.c (direct_optab_table): New variable. (movcc_gen_code, vcond_gen_code, vcondu_gen_code): Delete. (prepare_cmp_insn): Use direct_optab_handler for cmpmem_optab, cmpstr_optab and cmpstrn_optab. (emit_conditional_move): Likewise for movcc_optab. (can_conditionally_move_p): Likewise for movcc_gen_code. (init_insn_codes): Clear direct_optab_table. (init_optabs): Don't initialize the new "direct optabs" here. (get_vcond_icode): Use direct_optab_handler for vcondu_gen_code and vcond_gen_code. (expand_val_compare_and_swap): Likewise sync_compare_and_swap_optab. (expand_bool_compare_and_swap): Likewise sync_compare_and_swap_optab. (expand_compare_and_swap_loop): Likewise sync_compare_and_swap_optab. (expand_sync_operation): Likewise other sync_*_optabs. (expand_sync_fetch_operation): Likewise. Rename sync_compare_and_swap to sync_compare_and_swap_optab. (expand_sync_lock_test_and_set): Use direct_optab_handler for sync_lock_test_and_set and sync_compare_and_swap, adding "_optab" to the names of both. * builtins.c (expand_builtin_strcmp): Use direct_optab_handler for cmpstr_optab and cmpstrn_optab. (expand_builtin_lock_release): Likewise sync_lock_release. * expr.c (movmem_optab, setmem_optab, cmpstr_optab, cmpstrn_optab) (cmpmem_optab, sync_add_optab, sync_sub_optab, sync_ior_optab) (sync_and_optab, sync_xor_optab, sync_nand_optab, sync_old_add_optab) (sync_old_sub_optab, sync_old_ior_optab, sync_old_and_optab) (sync_old_xor_optab, sync_old_nand_optab, sync_new_add_optab) (sync_new_sub_optab, sync_new_ior_optab, sync_new_and_optab) (sync_new_xor_optab, sync_new_nand_optab, sync_compare_and_swap) (sync_lock_test_and_set, sync_lock_release): Delete. (emit_block_move_via_movmem): Use direct_optab_handler for movmem_optab. (emit_block_move_via_setmem): Use direct_optab_handler for setmem_optab. * genopinit.c (optabs): Use set_direct_optab_handler for the new macro optabs. * omp-low.c (expand_omp_atomic_fetch_op): Update the type of the "optab" local variable. Use direct_optab_handler for optab and sync_compare_and_swap_optab. * reload1.c (reload_in_optab, reload_out_optab): Delete. * targhooks.c (default_secondary_reload): Use direct_optab_handler for reload_in_optab and reload_out_optab. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_alloc_temp_reg): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * java/builtins.c (compareAndSwapInt_builtin): Use direct_optab_handler for sync_compare_and_swap, renaming it to sync_compare_and_swap_optab. (compareAndSwapLong_builtin, compareAndSwapObject_builtin): Likewise. (VMSupportsCS8_builtin): Likewise. From-SVN: r161810
2010-07-05 00:14:56 +02:00
enum insn_code icode
= direct_optab_handler (in_p ? reload_in_optab : reload_out_optab,
reload_mode);
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
if (icode != CODE_FOR_nothing
&& !insn_operand_matches (icode, in_p, x))
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
icode = CODE_FOR_nothing;
else if (icode != CODE_FOR_nothing)
{
const char *insn_constraint, *scratch_constraint;
enum reg_class insn_class, scratch_class;
gcc_assert (insn_data[(int) icode].n_operands == 3);
insn_constraint = insn_data[(int) icode].operand[!in_p].constraint;
if (!*insn_constraint)
insn_class = ALL_REGS;
else
{
if (in_p)
{
gcc_assert (*insn_constraint == '=');
insn_constraint++;
}
common.md: New file. gcc/ * common.md: New file. * doc/md.texi: Update description of generic, machine-independent constraints. * config/s390/constraints.md (e): Delete. * Makefile.in (md_file): Include common.md. * config/m32c/t-m32c (md_file): Likewise. * genpreds.c (general_mem): New array. (generic_constraint_letters): Remove constraints now defined by common.md. (add_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Allow the first character to be '<' or '>' as well. * genoutput.c (general_mem): New array. (indep_constraints): Remove constraints now defined by common.md. (note_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Remove special handling of 'm'. * ira-costs.c (record_reg_classes): Remove special handling of constraints now defined by common.md. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * lra-constraints.c (reg_class_from_constraints): Likewise. (process_alt_operands, process_address, curr_insn_transform): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * reload.c (push_secondary_reload, scratch_reload_class) (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * targhooks.c (default_secondary_reload): Likewise. * stmt.c (parse_output_constraint): Likewise. * recog.c (preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. (asm_operand_ok): Likewise, but add a comment saying why 'o' must be handled specially. From-SVN: r211475
2014-06-11 18:59:17 +02:00
insn_class = (reg_class_for_constraint
(lookup_constraint (insn_constraint)));
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
gcc_assert (insn_class != NO_REGS);
}
scratch_constraint = insn_data[(int) icode].operand[2].constraint;
/* The scratch register's constraint must start with "=&",
except for an input reload, where only "=" is necessary,
and where it might be beneficial to re-use registers from
the input. */
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
gcc_assert (scratch_constraint[0] == '='
&& (in_p || scratch_constraint[1] == '&'));
scratch_constraint++;
if (*scratch_constraint == '&')
scratch_constraint++;
common.md: New file. gcc/ * common.md: New file. * doc/md.texi: Update description of generic, machine-independent constraints. * config/s390/constraints.md (e): Delete. * Makefile.in (md_file): Include common.md. * config/m32c/t-m32c (md_file): Likewise. * genpreds.c (general_mem): New array. (generic_constraint_letters): Remove constraints now defined by common.md. (add_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Allow the first character to be '<' or '>' as well. * genoutput.c (general_mem): New array. (indep_constraints): Remove constraints now defined by common.md. (note_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Remove special handling of 'm'. * ira-costs.c (record_reg_classes): Remove special handling of constraints now defined by common.md. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * lra-constraints.c (reg_class_from_constraints): Likewise. (process_alt_operands, process_address, curr_insn_transform): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * reload.c (push_secondary_reload, scratch_reload_class) (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * targhooks.c (default_secondary_reload): Likewise. * stmt.c (parse_output_constraint): Likewise. * recog.c (preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. (asm_operand_ok): Likewise, but add a comment saying why 'o' must be handled specially. From-SVN: r211475
2014-06-11 18:59:17 +02:00
scratch_class = (reg_class_for_constraint
(lookup_constraint (scratch_constraint)));
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
if (reg_class_subset_p (reload_class, insn_class))
{
gcc_assert (scratch_class == rclass);
rclass = NO_REGS;
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
}
else
rclass = insn_class;
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
}
if (rclass == NO_REGS)
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
sri->icode = icode;
else
sri->t_icode = icode;
}
return rclass;
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
}
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-10 01:53:09 +01:00
/* By default, if flag_pic is true, then neither local nor global relocs
should be placed in readonly memory. */
int
default_reloc_rw_mask (void)
{
return flag_pic ? 3 : 0;
}
/* By default, do no modification. */
tree default_mangle_decl_assembler_name (tree decl ATTRIBUTE_UNUSED,
tree id)
{
return id;
}
/* Default to natural alignment for vector types. */
HOST_WIDE_INT
default_vector_alignment (const_tree type)
{
HOST_WIDE_INT align = tree_to_shwi (TYPE_SIZE (type));
if (align > MAX_OFILE_ALIGNMENT)
align = MAX_OFILE_ALIGNMENT;
return align;
}
bool
alpha.c (alpha_mangle_type, [...]): Constify. * config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp, alpha_in_small_data_p, alpha_split_complex_arg, alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Constify. * config/arm/arm-protos.h (arm_mangle_type): Likewise. * config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type): Likewise. * config/bfin/bfin.c (funkind, bfin_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/darwin-protos.h (darwin_binds_local_p): Likewise. * config/darwin.c (darwin_binds_local_p): Likewise. * config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p): Likewise. * config/i386/i386-protos.h (i386_pe_binds_local_p, i386_pe_valid_dllimport_attribute_p): Likewise. * config/i386/i386.c (ix86_function_regparm, ix86_comp_type_attributes, ix86_ms_bitfield_layout_p, x86_can_output_mi_thunk, ix86_mangle_type, TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. * config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p, i386_pe_binds_local_p): Likewise. * config/ia64/ia64.c (ia64_first_cycle_multipass_dfa_lookahead_guard_spec, ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type, ia64_invalid_conversion, ia64_invalid_unary_op, ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/m32c/m32c.c (m32c_comp_type_attributes): Likewise. * config/m32r/m32r.c (m32r_in_small_data_p): Likewise. * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/mips/mips.c (mips_use_blocks_for_constant_p, mips_in_small_data_p, mips_use_anchors_for_symbol_p, mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK, mips_near_type_p, mips_far_type_p, mips_global_symbol_p, mips_symbol_binds_local_p, mips_classify_symbol): Likewise. * config/pa/pa.c (pa_commutative_p): Likewise. * config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p): Likewise. * config/rs6000/rs6000.c (rs6000_invalid_within_doloop, rs6000_ms_bitfield_layout_p, rs6000_mangle_type, rs6000_use_blocks_for_constant_p, rs6000_vector_alignment_reachable, rs6000_is_opaque_type, invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise. * config/s390/s390.c (s390_mangle_type, TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP): Likewise. * config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK, th_in_small_data_p): Likewise. * config/sh/sh.c (sh_ms_bitfield_layout_p, sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise. * config/sparc/sparc.c (sparc_can_output_mi_thunk, sparc_mangle_type): Likewise. * config/spu/spu.c (spu_vector_alignment_reachable): Likewise. * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise. * emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq): Likewise. * hooks.c (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (default_can_output_mi_thunk_no_vcall): Constify. * hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_tree_hwi_hwi_tree_false, hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0, hook_int_tree_tree_1, hook_constcharptr_tree_null, hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null, hook_constcharptr_int_tree_null, hook_constcharptr_int_tree_tree_null): Delete. (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_constcharptr_const_tree_null, hook_constcharptr_const_rtx_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null): New. (default_can_output_mi_thunk_no_vcall): Constify. * integrate.c (function_attribute_inlinable_p): Likewise. * integrate.h (function_attribute_inlinable_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * output.h (decl_readonly_section, categorize_decl_for_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Likewise. * rtl.h (rtx_renumbered_equal_p, decl_default_tls_model): Likewise. * target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P, TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P, TARGET_COMP_TYPE_ATTRIBUTES, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE, TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION, TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP, TARGET_DWARF_CALLING_CONVENTION): Likewise. * target.h (can_output_mi_thunk, needs_block_p, first_cycle_multipass_dfa_lookahead_guard_spec, vector_alignment_reachable, comp_type_attributes, function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type, commutative_p, use_blocks_for_constant_p, use_anchors_for_symbol_p, in_small_data_p, binds_local_p, vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook, invalid_within_doloop, valid_dllimport_attribute_p, split_complex_arg, invalid_arg_for_unprototyped_fn, invalid_conversion, invalid_unary_op, invalid_binary_op): Likewise. * targhooks.c (default_invalid_within_doloop, hook_invalid_arg_for_unprototyped_fn, default_builtin_vector_alignment_reachable): Likewise. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * targhooks.h (default_invalid_within_doloop, default_builtin_vector_alignment_reachable, hook_invalid_arg_for_unprototyped_fn): Constify. (hook_bool_rtx_commutative_p): Delete. (hook_bool_const_rtx_commutative_p): New. * varasm.c (bss_initializer_p, decl_default_tls_model, categorize_decl_for_section, decl_readonly_section, default_use_anchors_for_symbol_p, default_binds_local_p, default_binds_local_p_1): Constify. From-SVN: r127785
2007-08-24 21:00:59 +02:00
default_builtin_vector_alignment_reachable (const_tree type, bool is_packed)
{
if (is_packed)
return false;
/* Assuming that types whose size is > pointer-size are not guaranteed to be
naturally aligned. */
if (tree_int_cst_compare (TYPE_SIZE (type), bitsize_int (POINTER_SIZE)) > 0)
return false;
/* Assuming that types whose size is <= pointer-size
are naturally aligned. */
return true;
}
/* By default, assume that a target supports any factor of misalignment
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
memory access if it supports movmisalign patten.
is_packed is true if the memory access is defined in a packed struct. */
bool
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_builtin_support_vector_misalignment (machine_mode mode,
const_tree type
ATTRIBUTE_UNUSED,
int misalignment
ATTRIBUTE_UNUSED,
bool is_packed
ATTRIBUTE_UNUSED)
{
if (optab_handler (movmisalign_optab, mode) != CODE_FOR_nothing)
return true;
return false;
}
Turn UNITS_PER_SIMD_WORD into a target hook. 2010-09-14 H.J. Lu <hongjiu.lu@intel.com> * defaults.h (UNITS_PER_SIMD_WORD): Removed. * config/arm/arm.h (UNITS_PER_SIMD_WORD): Likewise. * config/i386/i386.h (UNITS_PER_SIMD_WORD): Likewise. * config/mips/mips.h (UNITS_PER_SIMD_WORD): Likewise. * config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Likewise. * config/sparc/sparc.h (UNITS_PER_SIMD_WORD): Likewise. * target.def: Add units_per_simd_word to vectorize. * targhooks.c (default_units_per_simd_word): New. * targhooks.h (default_units_per_simd_word): Likewise. * config/arm/arm.c (arm_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * config/mips/mips.c (mips_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * config/rs6000/rs6000.c (rs6000_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * config/sparc/sparc.c (sparc_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * tree-vect-loop.c: Replace UNITS_PER_SIMD_WORD with TARGET_VECTORIZE_UNITS_PER_SIMD_WORD in comments. * tree-vect-stmts.c (get_vectype_for_scalar_type): Replace UNITS_PER_SIMD_WORD with targetm.vectorize.units_per_simd_word. * system.h (UNITS_PER_SIMD_WORD): Poisoned. * config/i386/i386-protos.h (ix86_units_per_simd_word): Removed. * config/i386/i386.c (ix86_units_per_simd_word): Make it static. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): New. * doc/tm.texi.in: Remove UNITS_PER_SIMD_WORD. Add TARGET_VECTORIZE_UNITS_PER_SIMD_WORD. * doc/tm.texi: Regenerated. From-SVN: r164285
2010-09-14 19:02:10 +02:00
/* By default, only attempt to parallelize bitwise operations, and
possibly adds/subtracts using bit-twiddling. */
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
default_preferred_simd_mode (machine_mode mode ATTRIBUTE_UNUSED)
Turn UNITS_PER_SIMD_WORD into a target hook. 2010-09-14 H.J. Lu <hongjiu.lu@intel.com> * defaults.h (UNITS_PER_SIMD_WORD): Removed. * config/arm/arm.h (UNITS_PER_SIMD_WORD): Likewise. * config/i386/i386.h (UNITS_PER_SIMD_WORD): Likewise. * config/mips/mips.h (UNITS_PER_SIMD_WORD): Likewise. * config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Likewise. * config/sparc/sparc.h (UNITS_PER_SIMD_WORD): Likewise. * target.def: Add units_per_simd_word to vectorize. * targhooks.c (default_units_per_simd_word): New. * targhooks.h (default_units_per_simd_word): Likewise. * config/arm/arm.c (arm_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * config/mips/mips.c (mips_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * config/rs6000/rs6000.c (rs6000_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * config/sparc/sparc.c (sparc_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * tree-vect-loop.c: Replace UNITS_PER_SIMD_WORD with TARGET_VECTORIZE_UNITS_PER_SIMD_WORD in comments. * tree-vect-stmts.c (get_vectype_for_scalar_type): Replace UNITS_PER_SIMD_WORD with targetm.vectorize.units_per_simd_word. * system.h (UNITS_PER_SIMD_WORD): Poisoned. * config/i386/i386-protos.h (ix86_units_per_simd_word): Removed. * config/i386/i386.c (ix86_units_per_simd_word): Make it static. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): New. * doc/tm.texi.in: Remove UNITS_PER_SIMD_WORD. Add TARGET_VECTORIZE_UNITS_PER_SIMD_WORD. * doc/tm.texi: Regenerated. From-SVN: r164285
2010-09-14 19:02:10 +02:00
{
return word_mode;
Turn UNITS_PER_SIMD_WORD into a target hook. 2010-09-14 H.J. Lu <hongjiu.lu@intel.com> * defaults.h (UNITS_PER_SIMD_WORD): Removed. * config/arm/arm.h (UNITS_PER_SIMD_WORD): Likewise. * config/i386/i386.h (UNITS_PER_SIMD_WORD): Likewise. * config/mips/mips.h (UNITS_PER_SIMD_WORD): Likewise. * config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Likewise. * config/sparc/sparc.h (UNITS_PER_SIMD_WORD): Likewise. * target.def: Add units_per_simd_word to vectorize. * targhooks.c (default_units_per_simd_word): New. * targhooks.h (default_units_per_simd_word): Likewise. * config/arm/arm.c (arm_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * config/mips/mips.c (mips_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * config/rs6000/rs6000.c (rs6000_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * config/sparc/sparc.c (sparc_units_per_simd_word): Likewise. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): Likewise. * tree-vect-loop.c: Replace UNITS_PER_SIMD_WORD with TARGET_VECTORIZE_UNITS_PER_SIMD_WORD in comments. * tree-vect-stmts.c (get_vectype_for_scalar_type): Replace UNITS_PER_SIMD_WORD with targetm.vectorize.units_per_simd_word. * system.h (UNITS_PER_SIMD_WORD): Poisoned. * config/i386/i386-protos.h (ix86_units_per_simd_word): Removed. * config/i386/i386.c (ix86_units_per_simd_word): Make it static. (TARGET_VECTORIZE_UNITS_PER_SIMD_WORD): New. * doc/tm.texi.in: Remove UNITS_PER_SIMD_WORD. Add TARGET_VECTORIZE_UNITS_PER_SIMD_WORD. * doc/tm.texi: Regenerated. From-SVN: r164285
2010-09-14 19:02:10 +02:00
}
/* By default only the size derived from the preferred vector mode
is tried. */
unsigned int
default_autovectorize_vector_sizes (void)
{
return 0;
}
tm.texi: Regenerated. gcc/ * doc/tm.texi: Regenerated. * doc/tm.texi.in (TARGET_VECTORIZE_GET_MASK_MODE): New. * stor-layout.c (layout_type): Use mode to get vector mask size. * target.def (get_mask_mode): New. * targhooks.c (default_get_mask_mode): New. * targhooks.h (default_get_mask_mode): New. * gcc/tree-vect-stmts.c (get_same_sized_vectype): Add special case for boolean vector. * tree.c (MAX_BOOL_CACHED_PREC): New. (nonstandard_boolean_type_cache): New. (build_nonstandard_boolean_type): New. (make_vector_type): Vector mask has no canonical type. (build_truth_vector_type): New. (build_same_sized_truth_vector_type): New. (truth_type_for): Support vector masks. * tree.h (VECTOR_BOOLEAN_TYPE_P): New. (build_truth_vector_type): New. (build_same_sized_truth_vector_type): New. (build_nonstandard_boolean_type): New. * tree-cfg.c (verify_gimple_comparison) Require boolean vector type for vector comparison. (verify_gimple_assign_ternary): Likewise. * optabs.c (expand_vec_cond_expr): Accept boolean vector as condition operand. * tree-vect-stmts.c (vectorizable_condition): Use boolean vector type for vector comparison. * tree-vect-generic.c (elem_op_func): Add new operand to hold vector type. (do_unop): Adjust to modified function type. (do_binop): Likewise. (do_plus_minus): Likewise. (do_negate); Likewise. (expand_vector_piecewise): Likewise. (do_cond): Likewise. (do_compare): Use comparison instead of condition. (expand_vector_divmod): Use boolean vector type for comparison. (expand_vector_operations_1): Skip scalar mask operations. gcc/c * c-typeck.c (build_conditional_expr): Use boolean vector type for vector comparison. (build_vec_cmp): New. (build_binary_op): Use build_vec_cmp for comparison. gcc/cp * call.c (build_conditional_expr_1): Use boolean vector type for vector comparison. * typeck.c (build_vec_cmp): New. (cp_build_binary_op): Use build_vec_cmp for comparison. gcc/testsuite/ * g++.dg/ext/vector22.C: Allow VEC_COND_EXPR. From-SVN: r229128
2015-10-21 18:01:43 +02:00
/* By defaults a vector of integers is used as a mask. */
machine_mode
default_get_mask_mode (unsigned nunits, unsigned vector_size)
{
unsigned elem_size = vector_size / nunits;
machine_mode elem_mode
= smallest_mode_for_size (elem_size * BITS_PER_UNIT, MODE_INT);
machine_mode vector_mode;
tm.texi: Regenerated. gcc/ * doc/tm.texi: Regenerated. * doc/tm.texi.in (TARGET_VECTORIZE_GET_MASK_MODE): New. * stor-layout.c (layout_type): Use mode to get vector mask size. * target.def (get_mask_mode): New. * targhooks.c (default_get_mask_mode): New. * targhooks.h (default_get_mask_mode): New. * gcc/tree-vect-stmts.c (get_same_sized_vectype): Add special case for boolean vector. * tree.c (MAX_BOOL_CACHED_PREC): New. (nonstandard_boolean_type_cache): New. (build_nonstandard_boolean_type): New. (make_vector_type): Vector mask has no canonical type. (build_truth_vector_type): New. (build_same_sized_truth_vector_type): New. (truth_type_for): Support vector masks. * tree.h (VECTOR_BOOLEAN_TYPE_P): New. (build_truth_vector_type): New. (build_same_sized_truth_vector_type): New. (build_nonstandard_boolean_type): New. * tree-cfg.c (verify_gimple_comparison) Require boolean vector type for vector comparison. (verify_gimple_assign_ternary): Likewise. * optabs.c (expand_vec_cond_expr): Accept boolean vector as condition operand. * tree-vect-stmts.c (vectorizable_condition): Use boolean vector type for vector comparison. * tree-vect-generic.c (elem_op_func): Add new operand to hold vector type. (do_unop): Adjust to modified function type. (do_binop): Likewise. (do_plus_minus): Likewise. (do_negate); Likewise. (expand_vector_piecewise): Likewise. (do_cond): Likewise. (do_compare): Use comparison instead of condition. (expand_vector_divmod): Use boolean vector type for comparison. (expand_vector_operations_1): Skip scalar mask operations. gcc/c * c-typeck.c (build_conditional_expr): Use boolean vector type for vector comparison. (build_vec_cmp): New. (build_binary_op): Use build_vec_cmp for comparison. gcc/cp * call.c (build_conditional_expr_1): Use boolean vector type for vector comparison. * typeck.c (build_vec_cmp): New. (cp_build_binary_op): Use build_vec_cmp for comparison. gcc/testsuite/ * g++.dg/ext/vector22.C: Allow VEC_COND_EXPR. From-SVN: r229128
2015-10-21 18:01:43 +02:00
gcc_assert (elem_size * nunits == vector_size);
vector_mode = mode_for_vector (elem_mode, nunits);
if (!VECTOR_MODE_P (vector_mode)
|| !targetm.vector_mode_supported_p (vector_mode))
vector_mode = BLKmode;
return vector_mode;
tm.texi: Regenerated. gcc/ * doc/tm.texi: Regenerated. * doc/tm.texi.in (TARGET_VECTORIZE_GET_MASK_MODE): New. * stor-layout.c (layout_type): Use mode to get vector mask size. * target.def (get_mask_mode): New. * targhooks.c (default_get_mask_mode): New. * targhooks.h (default_get_mask_mode): New. * gcc/tree-vect-stmts.c (get_same_sized_vectype): Add special case for boolean vector. * tree.c (MAX_BOOL_CACHED_PREC): New. (nonstandard_boolean_type_cache): New. (build_nonstandard_boolean_type): New. (make_vector_type): Vector mask has no canonical type. (build_truth_vector_type): New. (build_same_sized_truth_vector_type): New. (truth_type_for): Support vector masks. * tree.h (VECTOR_BOOLEAN_TYPE_P): New. (build_truth_vector_type): New. (build_same_sized_truth_vector_type): New. (build_nonstandard_boolean_type): New. * tree-cfg.c (verify_gimple_comparison) Require boolean vector type for vector comparison. (verify_gimple_assign_ternary): Likewise. * optabs.c (expand_vec_cond_expr): Accept boolean vector as condition operand. * tree-vect-stmts.c (vectorizable_condition): Use boolean vector type for vector comparison. * tree-vect-generic.c (elem_op_func): Add new operand to hold vector type. (do_unop): Adjust to modified function type. (do_binop): Likewise. (do_plus_minus): Likewise. (do_negate); Likewise. (expand_vector_piecewise): Likewise. (do_cond): Likewise. (do_compare): Use comparison instead of condition. (expand_vector_divmod): Use boolean vector type for comparison. (expand_vector_operations_1): Skip scalar mask operations. gcc/c * c-typeck.c (build_conditional_expr): Use boolean vector type for vector comparison. (build_vec_cmp): New. (build_binary_op): Use build_vec_cmp for comparison. gcc/cp * call.c (build_conditional_expr_1): Use boolean vector type for vector comparison. * typeck.c (build_vec_cmp): New. (cp_build_binary_op): Use build_vec_cmp for comparison. gcc/testsuite/ * g++.dg/ext/vector22.C: Allow VEC_COND_EXPR. From-SVN: r229128
2015-10-21 18:01:43 +02:00
}
tm.texi: Regenerate. 2012-07-24 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * targhooks.c (default_init_cost): Add prologue and epilogue costs. (default_add_stmt_cost): Likewise; also handle NULL stmt_info. (default_finish_cost): Add prologue and epilogue costs. * targhooks.h (default_add_stmt_cost): Change parameter list. (default_finish_cost): Likewise. * target.def (init_cost): Change documentation string. (add_stmt_cost): Change documentation string and parameter list. (finish_cost): Likewise. * target.h (vect_cost_model_location): New enum. * tree-vectorizer.h (struct _slp_tree): Remove cost substruct. (struct _slp_instance): Remove cost substruct; rename stmt_cost_vec to body_cost_vec. (SLP_INSTANCE_OUTSIDE_OF_LOOP_COST): Remove. (SLP_INSTANCE_STMT_COST_VEC): Rename to SLP_INSTANCE_BODY_COST_VEC. (SLP_TREE_OUTSIDE_OF_LOOP_COST): Remove. (struct _vect_peel_extended_info): Rename stmt_cost_vec to body_cost_vec. (struct _stmt_vec_info): Remove cost substruct. (STMT_VINFO_OUTSIDE_OF_LOOP_COST): Remove. (stmt_vinfo_set_outside_of_loop_cost): Remove. (builtin_vectorization_cost): New function. (vect_get_stmt_cost): Change to use builtin_vectorization_cost. (add_stmt_cost): Change parameter list. (finish_cost): Likewise. (vect_model_simple_cost): Likewise. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): Likewise. (vect_get_load_cost): Likewise. (vect_get_known_peeling_cost): Likewise. * tree-vect-loop.c (vect_get_known_peeling_cost): Change parameter list; call record_stmt_cost for prologue and epilogue costs. (vect_estimate_min_profitable_iters): Call add_stmt_cost for prologue and epilogue costs; remove computation of vec_outside_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_model_reduction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue and epilogue costs. (vect_model_induction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue costs. * tree-vect-data-refs.c (vect_get_data_access_cost): Change parameter list for function and arguments for calls to vect_get_load_cost and vect_get_store_cost. (vect_peeling_hash_get_lowest_cost): Change argument list for calls to vect_get_data_access_cost and vect_get_known_peeling_cost; use temporary vectors prologue_cost_vec and epilogue_cost_vec for the latter call and discard their results; rename stmt_cost_vec to body_cost_vec; correct possible storage leak for body_cost_vec. (vect_peeling_hash_choose_best_peeling): Rename stmt_cost_vec to body_cost_vec. (vect_enhance_data_refs_alignment): Rename stmt_cost_vec to body_cost_vec; add extra dummy parameter on calls to vect_get_data_access_cost; tolerate null si->stmt; add vect_body to argument list on call to add_stmt_cost. * tree-vect-stmts.c (record_stmt_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; tolerate null stmt_info; call builtin_vectorization_cost; add "where" parameter on call to add_stmt_cost. (vect_model_simple_cost): Change parameter list; call record_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost; rename stmt_cost_vec to body_cost_vec. (vect_model_promotion_demotion_cost): Add vect_body argument to call to add_stmt_cost; call add_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_model_store_cost): Change parameter list; call record_stmt_cost for prologue costs; add vect_body argument to call to record_stmt_cost; rename stmt_cost_vec to body_cost_vec; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_store_cost): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost. (vect_model_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; call record_stmt_cost for prologue costs. (vectorizable_store): Change argument list for call to vect_model_store_cost. (vectorizable_load): Change argument list for call to vect_model_load_cost. (new_stmt_vec_info): Remove assignment to STMT_VINFO_OUTSIDE_OF_LOOP_COST. * config/spu/spu.c (spu_init_cost): Add prologue and epilogue costs. (spu_add_stmt_cost): Likewise; also handle NULL stmt_info. (spu_finish_cost): Add prologue and epilogue costs. * config/i386/i386.c (i386_init_cost): Add prologue and epilogue costs. (i386_add_stmt_cost): Likewise; also handle NULL stmt_info. (i386_finish_cost): Add prologue and epilogue costs. * config/rs6000/rs6000.c (rs6000_init_cost): Add prologue and epilogue costs. (rs6000_add_stmt_cost): Likewise; also handle NULL stmt_info. (rs6000_finish_cost): Add prologue and epilogue costs. * tree-vect-slp.c (vect_free_slp_instance): Rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC. (vect_create_new_slp_node): Remove assignment to SLP_TREE_OUTSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Change parameter list; change argument lists to calls to vect_model_store_cost and vect_model_simple_cost. (vect_build_slp_tree): Change parameter list; change argument lists to calls to vect_model_load_cost, vect_get_and_check_slp_defs, and recursive self-calls; remove setting of outside_cost from SLP_TREE_OUTSIDE_OF_LOOP_COST; add vect_body argument to call to record_stmt_cost. (vect_analyze_slp_instance): Rename stmt_cost_vec to body_cost_vec; rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC; remove assignment to SLP_INSTANCE_OUTSIDE_OF_LOOP_COST; record SLP prologue costs. (vect_bb_vectorization_profitable_p): Rename stmt_cost_vec to body_cost_vec; handle null ci->stmt; add vect_body argument to call to add_stmt_cost; simplify calls to targetm.vectorize. builtin_vectorization_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_update_slp_costs_according_to_vf): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to call to add_stmt_cost. From-SVN: r189836
2012-07-25 05:07:08 +02:00
/* By default, the cost model accumulates three separate costs (prologue,
loop body, and epilogue) for a vectorized loop or block. So allocate an
array of three unsigned ints, set it to zero, and return its address. */
tm.texi: Regenerate. 2012-07-13 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_VECTORIZE_INIT_COST): New hook. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * targhooks.c (default_init_cost): New function. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * targhooks.h (default_init_cost): New decl. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * target.def (init_cost): New DEFHOOK. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. * target.h (struct _stmt_vec_info): New extern decl. (stmt_vectype): Likewise. (stmt_in_inner_loop_p): Likewise. * tree-vectorizer.h (stmt_info_for_cost): New struct/typedef. (stmt_vector_for_cost): New VEC/typedef. (add_stmt_info_to_vec): New function. (struct _slp_tree): Remove cost.inside_of_loop field. (struct _slp_instance): Remove cost.inside_of_loop field; add stmt_cost_vec field. (SLP_INSTANCE_INSIDE_OF_LOOP_COST): Remove macro. (SLP_INSTANCE_STMT_COST_VEC): New accessor macro. (SLP_TREE_INSIDE_OF_LOOP_COST): Remove macro. (struct _vect_peel_extended_info): Add stmt_cost_vec field. (struct _loop_vec_info): Add target_cost_data field. (LOOP_VINFO_TARGET_COST_DATA): New accessor macro. (struct _bb_vec_info): Add target_cost_data field. (BB_VINFO_TARGET_COST_DATA): New accessor macro. (struct _stmt_vec_info): Remove cost.inside_of_loop field. (STMT_VINFO_INSIDE_OF_LOOP_COST): Remove macro. (stmt_vinfo_set_inside_of_loop_cost): Remove function. (init_cost): New function. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. (vect_model_simple_cost): Change parameter list. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): New extern decl. (vect_get_load_cost): Change parameter list. (vect_get_store_cost): Likewise. * tree-vect-loop.c (new_loop_vec_info): Call init_cost. (destroy_loop_vec_info): Call destroy_cost_data. (vect_estimate_min_profitable_iters): Remove old calculation of inside costs; call finish_cost instead. (vect_model_reduction_cost): Call add_stmt_cost instead of old inside-costs calculation. (vect_model_induction_cost): Likewise. * tree-vect-data-refs.c (vect_get_data_access_cost): Change to return a stmt_vector_for_cost; modify calls to vect_get_load_cost and vect_get_store_cost to obtain the value to return. (vect_peeling_hash_get_lowest_cost): Obtain a stmt_cost_vec from vect_get_data_access_cost and store it in the minimum peeling structure. (vect_peeling_hash_choose_best_peeling): Change the parameter list to add a (stmt_vector_for_cost *) output parameter, and set its value. (vect_enhance_data_refs_alignment): Ignore the new return value from calls to vect_get_data_access_cost; obtain stmt_cost_vec from vect_peeling_hash_choose_best_peeling and pass its contents to the target cost model. * tree-vect-stmts.c (stmt_vectype): New function. (stmt_in_inner_loop_p): Likewise. (record_stmt_cost): Likewise. (vect_model_simple_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_promotion_demotion_cost): Call add_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_store_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vect_model_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_load_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vectorizable_call): Add NULL parameter to vect_model_simple_cost call. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Add NULL parameter to vect_model_store_cost call. (vectorizable_load): Add NULL parameter to vect_model_load_cost call. (new_stmt_vec_info): Don't set STMT_VINFO_INSIDE_OF_LOOP_COST. * config/spu/spu.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (spu_init_cost): New function. (spu_add_stmt_cost): Likewise. (spu_finish_cost): Likewise. (spu_destroy_cost_data): Likewise. * config/i386/i386.c (ix86_init_cost): New function. (ix86_add_stmt_cost): Likewise. (ix86_finish_cost): Likewise. (ix86_destroy_cost_data): Likewise. (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * config/rs6000/rs6000.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (rs6000_init_cost): New function. (rs6000_add_stmt_cost): Likewise. (rs6000_finish_cost): Likewise. (rs6000_destroy_cost_data): Likewise. * tree-vect-slp.c (vect_free_slp_instance): Free stmt_cost_vec. (vect_create_new_slp_node): Don't set SLP_TREE_INSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_model_store_cost and vect_model_simple_cost calls. (vect_build_slp_tree): Remove inside_cost parameter; add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_get_and_check_slp_defs, vect_model_load_cost, and recursive vect_build_slp_tree calls; prevent calculating cost more than once for loads; remove inside_cost parameter from recursive vect_build_slp_tree calls; call record_stmt_cost instead of old calculation. (vect_analyze_slp_instance): Allocate stmt_cost_vec and save it with the instance; free it on premature exit; remove inside_cost parameter from vect_build_slp_tree call; add stmt_cost_vec parameter to vect_build_slp_tree call; don't set SLP_INSTANCE_INSIDE_OF_LOOP_COST. (new_bb_vec_info): Call init_cost. (destroy_bb_vec_info): Call destroy_cost_data. (vect_bb_vectorization_profitable_p): Call add_stmt_cost for each statement recorded with an SLP instance; call finish_cost instead of the old calculation. (vect_update_slp_costs_according_to_vf): Record statement costs from SLP instances, multiplying by the appropriate number of copies; don't update SLP_INSTANCE_INSIDE_OF_LOOP_COST. From-SVN: r189460
2012-07-13 13:12:33 +02:00
void *
default_init_cost (struct loop *loop_info ATTRIBUTE_UNUSED)
{
tm.texi: Regenerate. 2012-07-24 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * targhooks.c (default_init_cost): Add prologue and epilogue costs. (default_add_stmt_cost): Likewise; also handle NULL stmt_info. (default_finish_cost): Add prologue and epilogue costs. * targhooks.h (default_add_stmt_cost): Change parameter list. (default_finish_cost): Likewise. * target.def (init_cost): Change documentation string. (add_stmt_cost): Change documentation string and parameter list. (finish_cost): Likewise. * target.h (vect_cost_model_location): New enum. * tree-vectorizer.h (struct _slp_tree): Remove cost substruct. (struct _slp_instance): Remove cost substruct; rename stmt_cost_vec to body_cost_vec. (SLP_INSTANCE_OUTSIDE_OF_LOOP_COST): Remove. (SLP_INSTANCE_STMT_COST_VEC): Rename to SLP_INSTANCE_BODY_COST_VEC. (SLP_TREE_OUTSIDE_OF_LOOP_COST): Remove. (struct _vect_peel_extended_info): Rename stmt_cost_vec to body_cost_vec. (struct _stmt_vec_info): Remove cost substruct. (STMT_VINFO_OUTSIDE_OF_LOOP_COST): Remove. (stmt_vinfo_set_outside_of_loop_cost): Remove. (builtin_vectorization_cost): New function. (vect_get_stmt_cost): Change to use builtin_vectorization_cost. (add_stmt_cost): Change parameter list. (finish_cost): Likewise. (vect_model_simple_cost): Likewise. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): Likewise. (vect_get_load_cost): Likewise. (vect_get_known_peeling_cost): Likewise. * tree-vect-loop.c (vect_get_known_peeling_cost): Change parameter list; call record_stmt_cost for prologue and epilogue costs. (vect_estimate_min_profitable_iters): Call add_stmt_cost for prologue and epilogue costs; remove computation of vec_outside_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_model_reduction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue and epilogue costs. (vect_model_induction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue costs. * tree-vect-data-refs.c (vect_get_data_access_cost): Change parameter list for function and arguments for calls to vect_get_load_cost and vect_get_store_cost. (vect_peeling_hash_get_lowest_cost): Change argument list for calls to vect_get_data_access_cost and vect_get_known_peeling_cost; use temporary vectors prologue_cost_vec and epilogue_cost_vec for the latter call and discard their results; rename stmt_cost_vec to body_cost_vec; correct possible storage leak for body_cost_vec. (vect_peeling_hash_choose_best_peeling): Rename stmt_cost_vec to body_cost_vec. (vect_enhance_data_refs_alignment): Rename stmt_cost_vec to body_cost_vec; add extra dummy parameter on calls to vect_get_data_access_cost; tolerate null si->stmt; add vect_body to argument list on call to add_stmt_cost. * tree-vect-stmts.c (record_stmt_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; tolerate null stmt_info; call builtin_vectorization_cost; add "where" parameter on call to add_stmt_cost. (vect_model_simple_cost): Change parameter list; call record_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost; rename stmt_cost_vec to body_cost_vec. (vect_model_promotion_demotion_cost): Add vect_body argument to call to add_stmt_cost; call add_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_model_store_cost): Change parameter list; call record_stmt_cost for prologue costs; add vect_body argument to call to record_stmt_cost; rename stmt_cost_vec to body_cost_vec; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_store_cost): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost. (vect_model_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; call record_stmt_cost for prologue costs. (vectorizable_store): Change argument list for call to vect_model_store_cost. (vectorizable_load): Change argument list for call to vect_model_load_cost. (new_stmt_vec_info): Remove assignment to STMT_VINFO_OUTSIDE_OF_LOOP_COST. * config/spu/spu.c (spu_init_cost): Add prologue and epilogue costs. (spu_add_stmt_cost): Likewise; also handle NULL stmt_info. (spu_finish_cost): Add prologue and epilogue costs. * config/i386/i386.c (i386_init_cost): Add prologue and epilogue costs. (i386_add_stmt_cost): Likewise; also handle NULL stmt_info. (i386_finish_cost): Add prologue and epilogue costs. * config/rs6000/rs6000.c (rs6000_init_cost): Add prologue and epilogue costs. (rs6000_add_stmt_cost): Likewise; also handle NULL stmt_info. (rs6000_finish_cost): Add prologue and epilogue costs. * tree-vect-slp.c (vect_free_slp_instance): Rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC. (vect_create_new_slp_node): Remove assignment to SLP_TREE_OUTSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Change parameter list; change argument lists to calls to vect_model_store_cost and vect_model_simple_cost. (vect_build_slp_tree): Change parameter list; change argument lists to calls to vect_model_load_cost, vect_get_and_check_slp_defs, and recursive self-calls; remove setting of outside_cost from SLP_TREE_OUTSIDE_OF_LOOP_COST; add vect_body argument to call to record_stmt_cost. (vect_analyze_slp_instance): Rename stmt_cost_vec to body_cost_vec; rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC; remove assignment to SLP_INSTANCE_OUTSIDE_OF_LOOP_COST; record SLP prologue costs. (vect_bb_vectorization_profitable_p): Rename stmt_cost_vec to body_cost_vec; handle null ci->stmt; add vect_body argument to call to add_stmt_cost; simplify calls to targetm.vectorize. builtin_vectorization_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_update_slp_costs_according_to_vf): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to call to add_stmt_cost. From-SVN: r189836
2012-07-25 05:07:08 +02:00
unsigned *cost = XNEWVEC (unsigned, 3);
cost[vect_prologue] = cost[vect_body] = cost[vect_epilogue] = 0;
tm.texi: Regenerate. 2012-07-13 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_VECTORIZE_INIT_COST): New hook. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * targhooks.c (default_init_cost): New function. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * targhooks.h (default_init_cost): New decl. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * target.def (init_cost): New DEFHOOK. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. * target.h (struct _stmt_vec_info): New extern decl. (stmt_vectype): Likewise. (stmt_in_inner_loop_p): Likewise. * tree-vectorizer.h (stmt_info_for_cost): New struct/typedef. (stmt_vector_for_cost): New VEC/typedef. (add_stmt_info_to_vec): New function. (struct _slp_tree): Remove cost.inside_of_loop field. (struct _slp_instance): Remove cost.inside_of_loop field; add stmt_cost_vec field. (SLP_INSTANCE_INSIDE_OF_LOOP_COST): Remove macro. (SLP_INSTANCE_STMT_COST_VEC): New accessor macro. (SLP_TREE_INSIDE_OF_LOOP_COST): Remove macro. (struct _vect_peel_extended_info): Add stmt_cost_vec field. (struct _loop_vec_info): Add target_cost_data field. (LOOP_VINFO_TARGET_COST_DATA): New accessor macro. (struct _bb_vec_info): Add target_cost_data field. (BB_VINFO_TARGET_COST_DATA): New accessor macro. (struct _stmt_vec_info): Remove cost.inside_of_loop field. (STMT_VINFO_INSIDE_OF_LOOP_COST): Remove macro. (stmt_vinfo_set_inside_of_loop_cost): Remove function. (init_cost): New function. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. (vect_model_simple_cost): Change parameter list. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): New extern decl. (vect_get_load_cost): Change parameter list. (vect_get_store_cost): Likewise. * tree-vect-loop.c (new_loop_vec_info): Call init_cost. (destroy_loop_vec_info): Call destroy_cost_data. (vect_estimate_min_profitable_iters): Remove old calculation of inside costs; call finish_cost instead. (vect_model_reduction_cost): Call add_stmt_cost instead of old inside-costs calculation. (vect_model_induction_cost): Likewise. * tree-vect-data-refs.c (vect_get_data_access_cost): Change to return a stmt_vector_for_cost; modify calls to vect_get_load_cost and vect_get_store_cost to obtain the value to return. (vect_peeling_hash_get_lowest_cost): Obtain a stmt_cost_vec from vect_get_data_access_cost and store it in the minimum peeling structure. (vect_peeling_hash_choose_best_peeling): Change the parameter list to add a (stmt_vector_for_cost *) output parameter, and set its value. (vect_enhance_data_refs_alignment): Ignore the new return value from calls to vect_get_data_access_cost; obtain stmt_cost_vec from vect_peeling_hash_choose_best_peeling and pass its contents to the target cost model. * tree-vect-stmts.c (stmt_vectype): New function. (stmt_in_inner_loop_p): Likewise. (record_stmt_cost): Likewise. (vect_model_simple_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_promotion_demotion_cost): Call add_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_store_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vect_model_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_load_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vectorizable_call): Add NULL parameter to vect_model_simple_cost call. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Add NULL parameter to vect_model_store_cost call. (vectorizable_load): Add NULL parameter to vect_model_load_cost call. (new_stmt_vec_info): Don't set STMT_VINFO_INSIDE_OF_LOOP_COST. * config/spu/spu.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (spu_init_cost): New function. (spu_add_stmt_cost): Likewise. (spu_finish_cost): Likewise. (spu_destroy_cost_data): Likewise. * config/i386/i386.c (ix86_init_cost): New function. (ix86_add_stmt_cost): Likewise. (ix86_finish_cost): Likewise. (ix86_destroy_cost_data): Likewise. (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * config/rs6000/rs6000.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (rs6000_init_cost): New function. (rs6000_add_stmt_cost): Likewise. (rs6000_finish_cost): Likewise. (rs6000_destroy_cost_data): Likewise. * tree-vect-slp.c (vect_free_slp_instance): Free stmt_cost_vec. (vect_create_new_slp_node): Don't set SLP_TREE_INSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_model_store_cost and vect_model_simple_cost calls. (vect_build_slp_tree): Remove inside_cost parameter; add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_get_and_check_slp_defs, vect_model_load_cost, and recursive vect_build_slp_tree calls; prevent calculating cost more than once for loads; remove inside_cost parameter from recursive vect_build_slp_tree calls; call record_stmt_cost instead of old calculation. (vect_analyze_slp_instance): Allocate stmt_cost_vec and save it with the instance; free it on premature exit; remove inside_cost parameter from vect_build_slp_tree call; add stmt_cost_vec parameter to vect_build_slp_tree call; don't set SLP_INSTANCE_INSIDE_OF_LOOP_COST. (new_bb_vec_info): Call init_cost. (destroy_bb_vec_info): Call destroy_cost_data. (vect_bb_vectorization_profitable_p): Call add_stmt_cost for each statement recorded with an SLP instance; call finish_cost instead of the old calculation. (vect_update_slp_costs_according_to_vf): Record statement costs from SLP instances, multiplying by the appropriate number of copies; don't update SLP_INSTANCE_INSIDE_OF_LOOP_COST. From-SVN: r189460
2012-07-13 13:12:33 +02:00
return cost;
}
/* By default, the cost model looks up the cost of the given statement
kind and mode, multiplies it by the occurrence count, accumulates
tm.texi: Regenerate. 2012-07-24 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * targhooks.c (default_init_cost): Add prologue and epilogue costs. (default_add_stmt_cost): Likewise; also handle NULL stmt_info. (default_finish_cost): Add prologue and epilogue costs. * targhooks.h (default_add_stmt_cost): Change parameter list. (default_finish_cost): Likewise. * target.def (init_cost): Change documentation string. (add_stmt_cost): Change documentation string and parameter list. (finish_cost): Likewise. * target.h (vect_cost_model_location): New enum. * tree-vectorizer.h (struct _slp_tree): Remove cost substruct. (struct _slp_instance): Remove cost substruct; rename stmt_cost_vec to body_cost_vec. (SLP_INSTANCE_OUTSIDE_OF_LOOP_COST): Remove. (SLP_INSTANCE_STMT_COST_VEC): Rename to SLP_INSTANCE_BODY_COST_VEC. (SLP_TREE_OUTSIDE_OF_LOOP_COST): Remove. (struct _vect_peel_extended_info): Rename stmt_cost_vec to body_cost_vec. (struct _stmt_vec_info): Remove cost substruct. (STMT_VINFO_OUTSIDE_OF_LOOP_COST): Remove. (stmt_vinfo_set_outside_of_loop_cost): Remove. (builtin_vectorization_cost): New function. (vect_get_stmt_cost): Change to use builtin_vectorization_cost. (add_stmt_cost): Change parameter list. (finish_cost): Likewise. (vect_model_simple_cost): Likewise. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): Likewise. (vect_get_load_cost): Likewise. (vect_get_known_peeling_cost): Likewise. * tree-vect-loop.c (vect_get_known_peeling_cost): Change parameter list; call record_stmt_cost for prologue and epilogue costs. (vect_estimate_min_profitable_iters): Call add_stmt_cost for prologue and epilogue costs; remove computation of vec_outside_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_model_reduction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue and epilogue costs. (vect_model_induction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue costs. * tree-vect-data-refs.c (vect_get_data_access_cost): Change parameter list for function and arguments for calls to vect_get_load_cost and vect_get_store_cost. (vect_peeling_hash_get_lowest_cost): Change argument list for calls to vect_get_data_access_cost and vect_get_known_peeling_cost; use temporary vectors prologue_cost_vec and epilogue_cost_vec for the latter call and discard their results; rename stmt_cost_vec to body_cost_vec; correct possible storage leak for body_cost_vec. (vect_peeling_hash_choose_best_peeling): Rename stmt_cost_vec to body_cost_vec. (vect_enhance_data_refs_alignment): Rename stmt_cost_vec to body_cost_vec; add extra dummy parameter on calls to vect_get_data_access_cost; tolerate null si->stmt; add vect_body to argument list on call to add_stmt_cost. * tree-vect-stmts.c (record_stmt_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; tolerate null stmt_info; call builtin_vectorization_cost; add "where" parameter on call to add_stmt_cost. (vect_model_simple_cost): Change parameter list; call record_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost; rename stmt_cost_vec to body_cost_vec. (vect_model_promotion_demotion_cost): Add vect_body argument to call to add_stmt_cost; call add_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_model_store_cost): Change parameter list; call record_stmt_cost for prologue costs; add vect_body argument to call to record_stmt_cost; rename stmt_cost_vec to body_cost_vec; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_store_cost): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost. (vect_model_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; call record_stmt_cost for prologue costs. (vectorizable_store): Change argument list for call to vect_model_store_cost. (vectorizable_load): Change argument list for call to vect_model_load_cost. (new_stmt_vec_info): Remove assignment to STMT_VINFO_OUTSIDE_OF_LOOP_COST. * config/spu/spu.c (spu_init_cost): Add prologue and epilogue costs. (spu_add_stmt_cost): Likewise; also handle NULL stmt_info. (spu_finish_cost): Add prologue and epilogue costs. * config/i386/i386.c (i386_init_cost): Add prologue and epilogue costs. (i386_add_stmt_cost): Likewise; also handle NULL stmt_info. (i386_finish_cost): Add prologue and epilogue costs. * config/rs6000/rs6000.c (rs6000_init_cost): Add prologue and epilogue costs. (rs6000_add_stmt_cost): Likewise; also handle NULL stmt_info. (rs6000_finish_cost): Add prologue and epilogue costs. * tree-vect-slp.c (vect_free_slp_instance): Rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC. (vect_create_new_slp_node): Remove assignment to SLP_TREE_OUTSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Change parameter list; change argument lists to calls to vect_model_store_cost and vect_model_simple_cost. (vect_build_slp_tree): Change parameter list; change argument lists to calls to vect_model_load_cost, vect_get_and_check_slp_defs, and recursive self-calls; remove setting of outside_cost from SLP_TREE_OUTSIDE_OF_LOOP_COST; add vect_body argument to call to record_stmt_cost. (vect_analyze_slp_instance): Rename stmt_cost_vec to body_cost_vec; rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC; remove assignment to SLP_INSTANCE_OUTSIDE_OF_LOOP_COST; record SLP prologue costs. (vect_bb_vectorization_profitable_p): Rename stmt_cost_vec to body_cost_vec; handle null ci->stmt; add vect_body argument to call to add_stmt_cost; simplify calls to targetm.vectorize. builtin_vectorization_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_update_slp_costs_according_to_vf): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to call to add_stmt_cost. From-SVN: r189836
2012-07-25 05:07:08 +02:00
it into the cost specified by WHERE, and returns the cost added. */
tm.texi: Regenerate. 2012-07-13 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_VECTORIZE_INIT_COST): New hook. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * targhooks.c (default_init_cost): New function. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * targhooks.h (default_init_cost): New decl. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * target.def (init_cost): New DEFHOOK. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. * target.h (struct _stmt_vec_info): New extern decl. (stmt_vectype): Likewise. (stmt_in_inner_loop_p): Likewise. * tree-vectorizer.h (stmt_info_for_cost): New struct/typedef. (stmt_vector_for_cost): New VEC/typedef. (add_stmt_info_to_vec): New function. (struct _slp_tree): Remove cost.inside_of_loop field. (struct _slp_instance): Remove cost.inside_of_loop field; add stmt_cost_vec field. (SLP_INSTANCE_INSIDE_OF_LOOP_COST): Remove macro. (SLP_INSTANCE_STMT_COST_VEC): New accessor macro. (SLP_TREE_INSIDE_OF_LOOP_COST): Remove macro. (struct _vect_peel_extended_info): Add stmt_cost_vec field. (struct _loop_vec_info): Add target_cost_data field. (LOOP_VINFO_TARGET_COST_DATA): New accessor macro. (struct _bb_vec_info): Add target_cost_data field. (BB_VINFO_TARGET_COST_DATA): New accessor macro. (struct _stmt_vec_info): Remove cost.inside_of_loop field. (STMT_VINFO_INSIDE_OF_LOOP_COST): Remove macro. (stmt_vinfo_set_inside_of_loop_cost): Remove function. (init_cost): New function. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. (vect_model_simple_cost): Change parameter list. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): New extern decl. (vect_get_load_cost): Change parameter list. (vect_get_store_cost): Likewise. * tree-vect-loop.c (new_loop_vec_info): Call init_cost. (destroy_loop_vec_info): Call destroy_cost_data. (vect_estimate_min_profitable_iters): Remove old calculation of inside costs; call finish_cost instead. (vect_model_reduction_cost): Call add_stmt_cost instead of old inside-costs calculation. (vect_model_induction_cost): Likewise. * tree-vect-data-refs.c (vect_get_data_access_cost): Change to return a stmt_vector_for_cost; modify calls to vect_get_load_cost and vect_get_store_cost to obtain the value to return. (vect_peeling_hash_get_lowest_cost): Obtain a stmt_cost_vec from vect_get_data_access_cost and store it in the minimum peeling structure. (vect_peeling_hash_choose_best_peeling): Change the parameter list to add a (stmt_vector_for_cost *) output parameter, and set its value. (vect_enhance_data_refs_alignment): Ignore the new return value from calls to vect_get_data_access_cost; obtain stmt_cost_vec from vect_peeling_hash_choose_best_peeling and pass its contents to the target cost model. * tree-vect-stmts.c (stmt_vectype): New function. (stmt_in_inner_loop_p): Likewise. (record_stmt_cost): Likewise. (vect_model_simple_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_promotion_demotion_cost): Call add_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_store_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vect_model_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_load_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vectorizable_call): Add NULL parameter to vect_model_simple_cost call. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Add NULL parameter to vect_model_store_cost call. (vectorizable_load): Add NULL parameter to vect_model_load_cost call. (new_stmt_vec_info): Don't set STMT_VINFO_INSIDE_OF_LOOP_COST. * config/spu/spu.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (spu_init_cost): New function. (spu_add_stmt_cost): Likewise. (spu_finish_cost): Likewise. (spu_destroy_cost_data): Likewise. * config/i386/i386.c (ix86_init_cost): New function. (ix86_add_stmt_cost): Likewise. (ix86_finish_cost): Likewise. (ix86_destroy_cost_data): Likewise. (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * config/rs6000/rs6000.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (rs6000_init_cost): New function. (rs6000_add_stmt_cost): Likewise. (rs6000_finish_cost): Likewise. (rs6000_destroy_cost_data): Likewise. * tree-vect-slp.c (vect_free_slp_instance): Free stmt_cost_vec. (vect_create_new_slp_node): Don't set SLP_TREE_INSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_model_store_cost and vect_model_simple_cost calls. (vect_build_slp_tree): Remove inside_cost parameter; add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_get_and_check_slp_defs, vect_model_load_cost, and recursive vect_build_slp_tree calls; prevent calculating cost more than once for loads; remove inside_cost parameter from recursive vect_build_slp_tree calls; call record_stmt_cost instead of old calculation. (vect_analyze_slp_instance): Allocate stmt_cost_vec and save it with the instance; free it on premature exit; remove inside_cost parameter from vect_build_slp_tree call; add stmt_cost_vec parameter to vect_build_slp_tree call; don't set SLP_INSTANCE_INSIDE_OF_LOOP_COST. (new_bb_vec_info): Call init_cost. (destroy_bb_vec_info): Call destroy_cost_data. (vect_bb_vectorization_profitable_p): Call add_stmt_cost for each statement recorded with an SLP instance; call finish_cost instead of the old calculation. (vect_update_slp_costs_according_to_vf): Record statement costs from SLP instances, multiplying by the appropriate number of copies; don't update SLP_INSTANCE_INSIDE_OF_LOOP_COST. From-SVN: r189460
2012-07-13 13:12:33 +02:00
unsigned
default_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind,
tm.texi: Regenerate. 2012-07-24 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * targhooks.c (default_init_cost): Add prologue and epilogue costs. (default_add_stmt_cost): Likewise; also handle NULL stmt_info. (default_finish_cost): Add prologue and epilogue costs. * targhooks.h (default_add_stmt_cost): Change parameter list. (default_finish_cost): Likewise. * target.def (init_cost): Change documentation string. (add_stmt_cost): Change documentation string and parameter list. (finish_cost): Likewise. * target.h (vect_cost_model_location): New enum. * tree-vectorizer.h (struct _slp_tree): Remove cost substruct. (struct _slp_instance): Remove cost substruct; rename stmt_cost_vec to body_cost_vec. (SLP_INSTANCE_OUTSIDE_OF_LOOP_COST): Remove. (SLP_INSTANCE_STMT_COST_VEC): Rename to SLP_INSTANCE_BODY_COST_VEC. (SLP_TREE_OUTSIDE_OF_LOOP_COST): Remove. (struct _vect_peel_extended_info): Rename stmt_cost_vec to body_cost_vec. (struct _stmt_vec_info): Remove cost substruct. (STMT_VINFO_OUTSIDE_OF_LOOP_COST): Remove. (stmt_vinfo_set_outside_of_loop_cost): Remove. (builtin_vectorization_cost): New function. (vect_get_stmt_cost): Change to use builtin_vectorization_cost. (add_stmt_cost): Change parameter list. (finish_cost): Likewise. (vect_model_simple_cost): Likewise. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): Likewise. (vect_get_load_cost): Likewise. (vect_get_known_peeling_cost): Likewise. * tree-vect-loop.c (vect_get_known_peeling_cost): Change parameter list; call record_stmt_cost for prologue and epilogue costs. (vect_estimate_min_profitable_iters): Call add_stmt_cost for prologue and epilogue costs; remove computation of vec_outside_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_model_reduction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue and epilogue costs. (vect_model_induction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue costs. * tree-vect-data-refs.c (vect_get_data_access_cost): Change parameter list for function and arguments for calls to vect_get_load_cost and vect_get_store_cost. (vect_peeling_hash_get_lowest_cost): Change argument list for calls to vect_get_data_access_cost and vect_get_known_peeling_cost; use temporary vectors prologue_cost_vec and epilogue_cost_vec for the latter call and discard their results; rename stmt_cost_vec to body_cost_vec; correct possible storage leak for body_cost_vec. (vect_peeling_hash_choose_best_peeling): Rename stmt_cost_vec to body_cost_vec. (vect_enhance_data_refs_alignment): Rename stmt_cost_vec to body_cost_vec; add extra dummy parameter on calls to vect_get_data_access_cost; tolerate null si->stmt; add vect_body to argument list on call to add_stmt_cost. * tree-vect-stmts.c (record_stmt_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; tolerate null stmt_info; call builtin_vectorization_cost; add "where" parameter on call to add_stmt_cost. (vect_model_simple_cost): Change parameter list; call record_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost; rename stmt_cost_vec to body_cost_vec. (vect_model_promotion_demotion_cost): Add vect_body argument to call to add_stmt_cost; call add_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_model_store_cost): Change parameter list; call record_stmt_cost for prologue costs; add vect_body argument to call to record_stmt_cost; rename stmt_cost_vec to body_cost_vec; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_store_cost): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost. (vect_model_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; call record_stmt_cost for prologue costs. (vectorizable_store): Change argument list for call to vect_model_store_cost. (vectorizable_load): Change argument list for call to vect_model_load_cost. (new_stmt_vec_info): Remove assignment to STMT_VINFO_OUTSIDE_OF_LOOP_COST. * config/spu/spu.c (spu_init_cost): Add prologue and epilogue costs. (spu_add_stmt_cost): Likewise; also handle NULL stmt_info. (spu_finish_cost): Add prologue and epilogue costs. * config/i386/i386.c (i386_init_cost): Add prologue and epilogue costs. (i386_add_stmt_cost): Likewise; also handle NULL stmt_info. (i386_finish_cost): Add prologue and epilogue costs. * config/rs6000/rs6000.c (rs6000_init_cost): Add prologue and epilogue costs. (rs6000_add_stmt_cost): Likewise; also handle NULL stmt_info. (rs6000_finish_cost): Add prologue and epilogue costs. * tree-vect-slp.c (vect_free_slp_instance): Rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC. (vect_create_new_slp_node): Remove assignment to SLP_TREE_OUTSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Change parameter list; change argument lists to calls to vect_model_store_cost and vect_model_simple_cost. (vect_build_slp_tree): Change parameter list; change argument lists to calls to vect_model_load_cost, vect_get_and_check_slp_defs, and recursive self-calls; remove setting of outside_cost from SLP_TREE_OUTSIDE_OF_LOOP_COST; add vect_body argument to call to record_stmt_cost. (vect_analyze_slp_instance): Rename stmt_cost_vec to body_cost_vec; rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC; remove assignment to SLP_INSTANCE_OUTSIDE_OF_LOOP_COST; record SLP prologue costs. (vect_bb_vectorization_profitable_p): Rename stmt_cost_vec to body_cost_vec; handle null ci->stmt; add vect_body argument to call to add_stmt_cost; simplify calls to targetm.vectorize. builtin_vectorization_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_update_slp_costs_according_to_vf): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to call to add_stmt_cost. From-SVN: r189836
2012-07-25 05:07:08 +02:00
struct _stmt_vec_info *stmt_info, int misalign,
enum vect_cost_model_location where)
tm.texi: Regenerate. 2012-07-13 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_VECTORIZE_INIT_COST): New hook. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * targhooks.c (default_init_cost): New function. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * targhooks.h (default_init_cost): New decl. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * target.def (init_cost): New DEFHOOK. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. * target.h (struct _stmt_vec_info): New extern decl. (stmt_vectype): Likewise. (stmt_in_inner_loop_p): Likewise. * tree-vectorizer.h (stmt_info_for_cost): New struct/typedef. (stmt_vector_for_cost): New VEC/typedef. (add_stmt_info_to_vec): New function. (struct _slp_tree): Remove cost.inside_of_loop field. (struct _slp_instance): Remove cost.inside_of_loop field; add stmt_cost_vec field. (SLP_INSTANCE_INSIDE_OF_LOOP_COST): Remove macro. (SLP_INSTANCE_STMT_COST_VEC): New accessor macro. (SLP_TREE_INSIDE_OF_LOOP_COST): Remove macro. (struct _vect_peel_extended_info): Add stmt_cost_vec field. (struct _loop_vec_info): Add target_cost_data field. (LOOP_VINFO_TARGET_COST_DATA): New accessor macro. (struct _bb_vec_info): Add target_cost_data field. (BB_VINFO_TARGET_COST_DATA): New accessor macro. (struct _stmt_vec_info): Remove cost.inside_of_loop field. (STMT_VINFO_INSIDE_OF_LOOP_COST): Remove macro. (stmt_vinfo_set_inside_of_loop_cost): Remove function. (init_cost): New function. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. (vect_model_simple_cost): Change parameter list. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): New extern decl. (vect_get_load_cost): Change parameter list. (vect_get_store_cost): Likewise. * tree-vect-loop.c (new_loop_vec_info): Call init_cost. (destroy_loop_vec_info): Call destroy_cost_data. (vect_estimate_min_profitable_iters): Remove old calculation of inside costs; call finish_cost instead. (vect_model_reduction_cost): Call add_stmt_cost instead of old inside-costs calculation. (vect_model_induction_cost): Likewise. * tree-vect-data-refs.c (vect_get_data_access_cost): Change to return a stmt_vector_for_cost; modify calls to vect_get_load_cost and vect_get_store_cost to obtain the value to return. (vect_peeling_hash_get_lowest_cost): Obtain a stmt_cost_vec from vect_get_data_access_cost and store it in the minimum peeling structure. (vect_peeling_hash_choose_best_peeling): Change the parameter list to add a (stmt_vector_for_cost *) output parameter, and set its value. (vect_enhance_data_refs_alignment): Ignore the new return value from calls to vect_get_data_access_cost; obtain stmt_cost_vec from vect_peeling_hash_choose_best_peeling and pass its contents to the target cost model. * tree-vect-stmts.c (stmt_vectype): New function. (stmt_in_inner_loop_p): Likewise. (record_stmt_cost): Likewise. (vect_model_simple_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_promotion_demotion_cost): Call add_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_store_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vect_model_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_load_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vectorizable_call): Add NULL parameter to vect_model_simple_cost call. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Add NULL parameter to vect_model_store_cost call. (vectorizable_load): Add NULL parameter to vect_model_load_cost call. (new_stmt_vec_info): Don't set STMT_VINFO_INSIDE_OF_LOOP_COST. * config/spu/spu.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (spu_init_cost): New function. (spu_add_stmt_cost): Likewise. (spu_finish_cost): Likewise. (spu_destroy_cost_data): Likewise. * config/i386/i386.c (ix86_init_cost): New function. (ix86_add_stmt_cost): Likewise. (ix86_finish_cost): Likewise. (ix86_destroy_cost_data): Likewise. (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * config/rs6000/rs6000.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (rs6000_init_cost): New function. (rs6000_add_stmt_cost): Likewise. (rs6000_finish_cost): Likewise. (rs6000_destroy_cost_data): Likewise. * tree-vect-slp.c (vect_free_slp_instance): Free stmt_cost_vec. (vect_create_new_slp_node): Don't set SLP_TREE_INSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_model_store_cost and vect_model_simple_cost calls. (vect_build_slp_tree): Remove inside_cost parameter; add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_get_and_check_slp_defs, vect_model_load_cost, and recursive vect_build_slp_tree calls; prevent calculating cost more than once for loads; remove inside_cost parameter from recursive vect_build_slp_tree calls; call record_stmt_cost instead of old calculation. (vect_analyze_slp_instance): Allocate stmt_cost_vec and save it with the instance; free it on premature exit; remove inside_cost parameter from vect_build_slp_tree call; add stmt_cost_vec parameter to vect_build_slp_tree call; don't set SLP_INSTANCE_INSIDE_OF_LOOP_COST. (new_bb_vec_info): Call init_cost. (destroy_bb_vec_info): Call destroy_cost_data. (vect_bb_vectorization_profitable_p): Call add_stmt_cost for each statement recorded with an SLP instance; call finish_cost instead of the old calculation. (vect_update_slp_costs_according_to_vf): Record statement costs from SLP instances, multiplying by the appropriate number of copies; don't update SLP_INSTANCE_INSIDE_OF_LOOP_COST. From-SVN: r189460
2012-07-13 13:12:33 +02:00
{
unsigned *cost = (unsigned *) data;
unsigned retval = 0;
tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE;
int stmt_cost = targetm.vectorize.builtin_vectorization_cost (kind, vectype,
misalign);
/* Statements in an inner loop relative to the loop being
vectorized are weighted more heavily. The value here is
arbitrary and could potentially be improved with analysis. */
if (where == vect_body && stmt_info && stmt_in_inner_loop_p (stmt_info))
count *= 50; /* FIXME. */
retval = (unsigned) (count * stmt_cost);
cost[where] += retval;
tm.texi: Regenerate. 2012-07-13 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_VECTORIZE_INIT_COST): New hook. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * targhooks.c (default_init_cost): New function. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * targhooks.h (default_init_cost): New decl. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * target.def (init_cost): New DEFHOOK. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. * target.h (struct _stmt_vec_info): New extern decl. (stmt_vectype): Likewise. (stmt_in_inner_loop_p): Likewise. * tree-vectorizer.h (stmt_info_for_cost): New struct/typedef. (stmt_vector_for_cost): New VEC/typedef. (add_stmt_info_to_vec): New function. (struct _slp_tree): Remove cost.inside_of_loop field. (struct _slp_instance): Remove cost.inside_of_loop field; add stmt_cost_vec field. (SLP_INSTANCE_INSIDE_OF_LOOP_COST): Remove macro. (SLP_INSTANCE_STMT_COST_VEC): New accessor macro. (SLP_TREE_INSIDE_OF_LOOP_COST): Remove macro. (struct _vect_peel_extended_info): Add stmt_cost_vec field. (struct _loop_vec_info): Add target_cost_data field. (LOOP_VINFO_TARGET_COST_DATA): New accessor macro. (struct _bb_vec_info): Add target_cost_data field. (BB_VINFO_TARGET_COST_DATA): New accessor macro. (struct _stmt_vec_info): Remove cost.inside_of_loop field. (STMT_VINFO_INSIDE_OF_LOOP_COST): Remove macro. (stmt_vinfo_set_inside_of_loop_cost): Remove function. (init_cost): New function. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. (vect_model_simple_cost): Change parameter list. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): New extern decl. (vect_get_load_cost): Change parameter list. (vect_get_store_cost): Likewise. * tree-vect-loop.c (new_loop_vec_info): Call init_cost. (destroy_loop_vec_info): Call destroy_cost_data. (vect_estimate_min_profitable_iters): Remove old calculation of inside costs; call finish_cost instead. (vect_model_reduction_cost): Call add_stmt_cost instead of old inside-costs calculation. (vect_model_induction_cost): Likewise. * tree-vect-data-refs.c (vect_get_data_access_cost): Change to return a stmt_vector_for_cost; modify calls to vect_get_load_cost and vect_get_store_cost to obtain the value to return. (vect_peeling_hash_get_lowest_cost): Obtain a stmt_cost_vec from vect_get_data_access_cost and store it in the minimum peeling structure. (vect_peeling_hash_choose_best_peeling): Change the parameter list to add a (stmt_vector_for_cost *) output parameter, and set its value. (vect_enhance_data_refs_alignment): Ignore the new return value from calls to vect_get_data_access_cost; obtain stmt_cost_vec from vect_peeling_hash_choose_best_peeling and pass its contents to the target cost model. * tree-vect-stmts.c (stmt_vectype): New function. (stmt_in_inner_loop_p): Likewise. (record_stmt_cost): Likewise. (vect_model_simple_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_promotion_demotion_cost): Call add_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_store_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vect_model_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_load_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vectorizable_call): Add NULL parameter to vect_model_simple_cost call. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Add NULL parameter to vect_model_store_cost call. (vectorizable_load): Add NULL parameter to vect_model_load_cost call. (new_stmt_vec_info): Don't set STMT_VINFO_INSIDE_OF_LOOP_COST. * config/spu/spu.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (spu_init_cost): New function. (spu_add_stmt_cost): Likewise. (spu_finish_cost): Likewise. (spu_destroy_cost_data): Likewise. * config/i386/i386.c (ix86_init_cost): New function. (ix86_add_stmt_cost): Likewise. (ix86_finish_cost): Likewise. (ix86_destroy_cost_data): Likewise. (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * config/rs6000/rs6000.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (rs6000_init_cost): New function. (rs6000_add_stmt_cost): Likewise. (rs6000_finish_cost): Likewise. (rs6000_destroy_cost_data): Likewise. * tree-vect-slp.c (vect_free_slp_instance): Free stmt_cost_vec. (vect_create_new_slp_node): Don't set SLP_TREE_INSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_model_store_cost and vect_model_simple_cost calls. (vect_build_slp_tree): Remove inside_cost parameter; add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_get_and_check_slp_defs, vect_model_load_cost, and recursive vect_build_slp_tree calls; prevent calculating cost more than once for loads; remove inside_cost parameter from recursive vect_build_slp_tree calls; call record_stmt_cost instead of old calculation. (vect_analyze_slp_instance): Allocate stmt_cost_vec and save it with the instance; free it on premature exit; remove inside_cost parameter from vect_build_slp_tree call; add stmt_cost_vec parameter to vect_build_slp_tree call; don't set SLP_INSTANCE_INSIDE_OF_LOOP_COST. (new_bb_vec_info): Call init_cost. (destroy_bb_vec_info): Call destroy_cost_data. (vect_bb_vectorization_profitable_p): Call add_stmt_cost for each statement recorded with an SLP instance; call finish_cost instead of the old calculation. (vect_update_slp_costs_according_to_vf): Record statement costs from SLP instances, multiplying by the appropriate number of copies; don't update SLP_INSTANCE_INSIDE_OF_LOOP_COST. From-SVN: r189460
2012-07-13 13:12:33 +02:00
return retval;
}
tm.texi: Regenerate. 2012-07-24 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * targhooks.c (default_init_cost): Add prologue and epilogue costs. (default_add_stmt_cost): Likewise; also handle NULL stmt_info. (default_finish_cost): Add prologue and epilogue costs. * targhooks.h (default_add_stmt_cost): Change parameter list. (default_finish_cost): Likewise. * target.def (init_cost): Change documentation string. (add_stmt_cost): Change documentation string and parameter list. (finish_cost): Likewise. * target.h (vect_cost_model_location): New enum. * tree-vectorizer.h (struct _slp_tree): Remove cost substruct. (struct _slp_instance): Remove cost substruct; rename stmt_cost_vec to body_cost_vec. (SLP_INSTANCE_OUTSIDE_OF_LOOP_COST): Remove. (SLP_INSTANCE_STMT_COST_VEC): Rename to SLP_INSTANCE_BODY_COST_VEC. (SLP_TREE_OUTSIDE_OF_LOOP_COST): Remove. (struct _vect_peel_extended_info): Rename stmt_cost_vec to body_cost_vec. (struct _stmt_vec_info): Remove cost substruct. (STMT_VINFO_OUTSIDE_OF_LOOP_COST): Remove. (stmt_vinfo_set_outside_of_loop_cost): Remove. (builtin_vectorization_cost): New function. (vect_get_stmt_cost): Change to use builtin_vectorization_cost. (add_stmt_cost): Change parameter list. (finish_cost): Likewise. (vect_model_simple_cost): Likewise. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): Likewise. (vect_get_load_cost): Likewise. (vect_get_known_peeling_cost): Likewise. * tree-vect-loop.c (vect_get_known_peeling_cost): Change parameter list; call record_stmt_cost for prologue and epilogue costs. (vect_estimate_min_profitable_iters): Call add_stmt_cost for prologue and epilogue costs; remove computation of vec_outside_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_model_reduction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue and epilogue costs. (vect_model_induction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue costs. * tree-vect-data-refs.c (vect_get_data_access_cost): Change parameter list for function and arguments for calls to vect_get_load_cost and vect_get_store_cost. (vect_peeling_hash_get_lowest_cost): Change argument list for calls to vect_get_data_access_cost and vect_get_known_peeling_cost; use temporary vectors prologue_cost_vec and epilogue_cost_vec for the latter call and discard their results; rename stmt_cost_vec to body_cost_vec; correct possible storage leak for body_cost_vec. (vect_peeling_hash_choose_best_peeling): Rename stmt_cost_vec to body_cost_vec. (vect_enhance_data_refs_alignment): Rename stmt_cost_vec to body_cost_vec; add extra dummy parameter on calls to vect_get_data_access_cost; tolerate null si->stmt; add vect_body to argument list on call to add_stmt_cost. * tree-vect-stmts.c (record_stmt_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; tolerate null stmt_info; call builtin_vectorization_cost; add "where" parameter on call to add_stmt_cost. (vect_model_simple_cost): Change parameter list; call record_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost; rename stmt_cost_vec to body_cost_vec. (vect_model_promotion_demotion_cost): Add vect_body argument to call to add_stmt_cost; call add_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_model_store_cost): Change parameter list; call record_stmt_cost for prologue costs; add vect_body argument to call to record_stmt_cost; rename stmt_cost_vec to body_cost_vec; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_store_cost): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost. (vect_model_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; call record_stmt_cost for prologue costs. (vectorizable_store): Change argument list for call to vect_model_store_cost. (vectorizable_load): Change argument list for call to vect_model_load_cost. (new_stmt_vec_info): Remove assignment to STMT_VINFO_OUTSIDE_OF_LOOP_COST. * config/spu/spu.c (spu_init_cost): Add prologue and epilogue costs. (spu_add_stmt_cost): Likewise; also handle NULL stmt_info. (spu_finish_cost): Add prologue and epilogue costs. * config/i386/i386.c (i386_init_cost): Add prologue and epilogue costs. (i386_add_stmt_cost): Likewise; also handle NULL stmt_info. (i386_finish_cost): Add prologue and epilogue costs. * config/rs6000/rs6000.c (rs6000_init_cost): Add prologue and epilogue costs. (rs6000_add_stmt_cost): Likewise; also handle NULL stmt_info. (rs6000_finish_cost): Add prologue and epilogue costs. * tree-vect-slp.c (vect_free_slp_instance): Rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC. (vect_create_new_slp_node): Remove assignment to SLP_TREE_OUTSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Change parameter list; change argument lists to calls to vect_model_store_cost and vect_model_simple_cost. (vect_build_slp_tree): Change parameter list; change argument lists to calls to vect_model_load_cost, vect_get_and_check_slp_defs, and recursive self-calls; remove setting of outside_cost from SLP_TREE_OUTSIDE_OF_LOOP_COST; add vect_body argument to call to record_stmt_cost. (vect_analyze_slp_instance): Rename stmt_cost_vec to body_cost_vec; rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC; remove assignment to SLP_INSTANCE_OUTSIDE_OF_LOOP_COST; record SLP prologue costs. (vect_bb_vectorization_profitable_p): Rename stmt_cost_vec to body_cost_vec; handle null ci->stmt; add vect_body argument to call to add_stmt_cost; simplify calls to targetm.vectorize. builtin_vectorization_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_update_slp_costs_according_to_vf): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to call to add_stmt_cost. From-SVN: r189836
2012-07-25 05:07:08 +02:00
/* By default, the cost model just returns the accumulated costs. */
tm.texi: Regenerate. 2012-07-13 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_VECTORIZE_INIT_COST): New hook. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * targhooks.c (default_init_cost): New function. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * targhooks.h (default_init_cost): New decl. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * target.def (init_cost): New DEFHOOK. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. * target.h (struct _stmt_vec_info): New extern decl. (stmt_vectype): Likewise. (stmt_in_inner_loop_p): Likewise. * tree-vectorizer.h (stmt_info_for_cost): New struct/typedef. (stmt_vector_for_cost): New VEC/typedef. (add_stmt_info_to_vec): New function. (struct _slp_tree): Remove cost.inside_of_loop field. (struct _slp_instance): Remove cost.inside_of_loop field; add stmt_cost_vec field. (SLP_INSTANCE_INSIDE_OF_LOOP_COST): Remove macro. (SLP_INSTANCE_STMT_COST_VEC): New accessor macro. (SLP_TREE_INSIDE_OF_LOOP_COST): Remove macro. (struct _vect_peel_extended_info): Add stmt_cost_vec field. (struct _loop_vec_info): Add target_cost_data field. (LOOP_VINFO_TARGET_COST_DATA): New accessor macro. (struct _bb_vec_info): Add target_cost_data field. (BB_VINFO_TARGET_COST_DATA): New accessor macro. (struct _stmt_vec_info): Remove cost.inside_of_loop field. (STMT_VINFO_INSIDE_OF_LOOP_COST): Remove macro. (stmt_vinfo_set_inside_of_loop_cost): Remove function. (init_cost): New function. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. (vect_model_simple_cost): Change parameter list. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): New extern decl. (vect_get_load_cost): Change parameter list. (vect_get_store_cost): Likewise. * tree-vect-loop.c (new_loop_vec_info): Call init_cost. (destroy_loop_vec_info): Call destroy_cost_data. (vect_estimate_min_profitable_iters): Remove old calculation of inside costs; call finish_cost instead. (vect_model_reduction_cost): Call add_stmt_cost instead of old inside-costs calculation. (vect_model_induction_cost): Likewise. * tree-vect-data-refs.c (vect_get_data_access_cost): Change to return a stmt_vector_for_cost; modify calls to vect_get_load_cost and vect_get_store_cost to obtain the value to return. (vect_peeling_hash_get_lowest_cost): Obtain a stmt_cost_vec from vect_get_data_access_cost and store it in the minimum peeling structure. (vect_peeling_hash_choose_best_peeling): Change the parameter list to add a (stmt_vector_for_cost *) output parameter, and set its value. (vect_enhance_data_refs_alignment): Ignore the new return value from calls to vect_get_data_access_cost; obtain stmt_cost_vec from vect_peeling_hash_choose_best_peeling and pass its contents to the target cost model. * tree-vect-stmts.c (stmt_vectype): New function. (stmt_in_inner_loop_p): Likewise. (record_stmt_cost): Likewise. (vect_model_simple_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_promotion_demotion_cost): Call add_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_store_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vect_model_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_load_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vectorizable_call): Add NULL parameter to vect_model_simple_cost call. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Add NULL parameter to vect_model_store_cost call. (vectorizable_load): Add NULL parameter to vect_model_load_cost call. (new_stmt_vec_info): Don't set STMT_VINFO_INSIDE_OF_LOOP_COST. * config/spu/spu.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (spu_init_cost): New function. (spu_add_stmt_cost): Likewise. (spu_finish_cost): Likewise. (spu_destroy_cost_data): Likewise. * config/i386/i386.c (ix86_init_cost): New function. (ix86_add_stmt_cost): Likewise. (ix86_finish_cost): Likewise. (ix86_destroy_cost_data): Likewise. (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * config/rs6000/rs6000.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (rs6000_init_cost): New function. (rs6000_add_stmt_cost): Likewise. (rs6000_finish_cost): Likewise. (rs6000_destroy_cost_data): Likewise. * tree-vect-slp.c (vect_free_slp_instance): Free stmt_cost_vec. (vect_create_new_slp_node): Don't set SLP_TREE_INSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_model_store_cost and vect_model_simple_cost calls. (vect_build_slp_tree): Remove inside_cost parameter; add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_get_and_check_slp_defs, vect_model_load_cost, and recursive vect_build_slp_tree calls; prevent calculating cost more than once for loads; remove inside_cost parameter from recursive vect_build_slp_tree calls; call record_stmt_cost instead of old calculation. (vect_analyze_slp_instance): Allocate stmt_cost_vec and save it with the instance; free it on premature exit; remove inside_cost parameter from vect_build_slp_tree call; add stmt_cost_vec parameter to vect_build_slp_tree call; don't set SLP_INSTANCE_INSIDE_OF_LOOP_COST. (new_bb_vec_info): Call init_cost. (destroy_bb_vec_info): Call destroy_cost_data. (vect_bb_vectorization_profitable_p): Call add_stmt_cost for each statement recorded with an SLP instance; call finish_cost instead of the old calculation. (vect_update_slp_costs_according_to_vf): Record statement costs from SLP instances, multiplying by the appropriate number of copies; don't update SLP_INSTANCE_INSIDE_OF_LOOP_COST. From-SVN: r189460
2012-07-13 13:12:33 +02:00
tm.texi: Regenerate. 2012-07-24 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * targhooks.c (default_init_cost): Add prologue and epilogue costs. (default_add_stmt_cost): Likewise; also handle NULL stmt_info. (default_finish_cost): Add prologue and epilogue costs. * targhooks.h (default_add_stmt_cost): Change parameter list. (default_finish_cost): Likewise. * target.def (init_cost): Change documentation string. (add_stmt_cost): Change documentation string and parameter list. (finish_cost): Likewise. * target.h (vect_cost_model_location): New enum. * tree-vectorizer.h (struct _slp_tree): Remove cost substruct. (struct _slp_instance): Remove cost substruct; rename stmt_cost_vec to body_cost_vec. (SLP_INSTANCE_OUTSIDE_OF_LOOP_COST): Remove. (SLP_INSTANCE_STMT_COST_VEC): Rename to SLP_INSTANCE_BODY_COST_VEC. (SLP_TREE_OUTSIDE_OF_LOOP_COST): Remove. (struct _vect_peel_extended_info): Rename stmt_cost_vec to body_cost_vec. (struct _stmt_vec_info): Remove cost substruct. (STMT_VINFO_OUTSIDE_OF_LOOP_COST): Remove. (stmt_vinfo_set_outside_of_loop_cost): Remove. (builtin_vectorization_cost): New function. (vect_get_stmt_cost): Change to use builtin_vectorization_cost. (add_stmt_cost): Change parameter list. (finish_cost): Likewise. (vect_model_simple_cost): Likewise. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): Likewise. (vect_get_load_cost): Likewise. (vect_get_known_peeling_cost): Likewise. * tree-vect-loop.c (vect_get_known_peeling_cost): Change parameter list; call record_stmt_cost for prologue and epilogue costs. (vect_estimate_min_profitable_iters): Call add_stmt_cost for prologue and epilogue costs; remove computation of vec_outside_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_model_reduction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue and epilogue costs. (vect_model_induction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue costs. * tree-vect-data-refs.c (vect_get_data_access_cost): Change parameter list for function and arguments for calls to vect_get_load_cost and vect_get_store_cost. (vect_peeling_hash_get_lowest_cost): Change argument list for calls to vect_get_data_access_cost and vect_get_known_peeling_cost; use temporary vectors prologue_cost_vec and epilogue_cost_vec for the latter call and discard their results; rename stmt_cost_vec to body_cost_vec; correct possible storage leak for body_cost_vec. (vect_peeling_hash_choose_best_peeling): Rename stmt_cost_vec to body_cost_vec. (vect_enhance_data_refs_alignment): Rename stmt_cost_vec to body_cost_vec; add extra dummy parameter on calls to vect_get_data_access_cost; tolerate null si->stmt; add vect_body to argument list on call to add_stmt_cost. * tree-vect-stmts.c (record_stmt_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; tolerate null stmt_info; call builtin_vectorization_cost; add "where" parameter on call to add_stmt_cost. (vect_model_simple_cost): Change parameter list; call record_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost; rename stmt_cost_vec to body_cost_vec. (vect_model_promotion_demotion_cost): Add vect_body argument to call to add_stmt_cost; call add_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_model_store_cost): Change parameter list; call record_stmt_cost for prologue costs; add vect_body argument to call to record_stmt_cost; rename stmt_cost_vec to body_cost_vec; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_store_cost): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost. (vect_model_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; call record_stmt_cost for prologue costs. (vectorizable_store): Change argument list for call to vect_model_store_cost. (vectorizable_load): Change argument list for call to vect_model_load_cost. (new_stmt_vec_info): Remove assignment to STMT_VINFO_OUTSIDE_OF_LOOP_COST. * config/spu/spu.c (spu_init_cost): Add prologue and epilogue costs. (spu_add_stmt_cost): Likewise; also handle NULL stmt_info. (spu_finish_cost): Add prologue and epilogue costs. * config/i386/i386.c (i386_init_cost): Add prologue and epilogue costs. (i386_add_stmt_cost): Likewise; also handle NULL stmt_info. (i386_finish_cost): Add prologue and epilogue costs. * config/rs6000/rs6000.c (rs6000_init_cost): Add prologue and epilogue costs. (rs6000_add_stmt_cost): Likewise; also handle NULL stmt_info. (rs6000_finish_cost): Add prologue and epilogue costs. * tree-vect-slp.c (vect_free_slp_instance): Rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC. (vect_create_new_slp_node): Remove assignment to SLP_TREE_OUTSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Change parameter list; change argument lists to calls to vect_model_store_cost and vect_model_simple_cost. (vect_build_slp_tree): Change parameter list; change argument lists to calls to vect_model_load_cost, vect_get_and_check_slp_defs, and recursive self-calls; remove setting of outside_cost from SLP_TREE_OUTSIDE_OF_LOOP_COST; add vect_body argument to call to record_stmt_cost. (vect_analyze_slp_instance): Rename stmt_cost_vec to body_cost_vec; rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC; remove assignment to SLP_INSTANCE_OUTSIDE_OF_LOOP_COST; record SLP prologue costs. (vect_bb_vectorization_profitable_p): Rename stmt_cost_vec to body_cost_vec; handle null ci->stmt; add vect_body argument to call to add_stmt_cost; simplify calls to targetm.vectorize. builtin_vectorization_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_update_slp_costs_according_to_vf): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to call to add_stmt_cost. From-SVN: r189836
2012-07-25 05:07:08 +02:00
void
default_finish_cost (void *data, unsigned *prologue_cost,
unsigned *body_cost, unsigned *epilogue_cost)
tm.texi: Regenerate. 2012-07-13 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_VECTORIZE_INIT_COST): New hook. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * targhooks.c (default_init_cost): New function. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * targhooks.h (default_init_cost): New decl. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * target.def (init_cost): New DEFHOOK. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. * target.h (struct _stmt_vec_info): New extern decl. (stmt_vectype): Likewise. (stmt_in_inner_loop_p): Likewise. * tree-vectorizer.h (stmt_info_for_cost): New struct/typedef. (stmt_vector_for_cost): New VEC/typedef. (add_stmt_info_to_vec): New function. (struct _slp_tree): Remove cost.inside_of_loop field. (struct _slp_instance): Remove cost.inside_of_loop field; add stmt_cost_vec field. (SLP_INSTANCE_INSIDE_OF_LOOP_COST): Remove macro. (SLP_INSTANCE_STMT_COST_VEC): New accessor macro. (SLP_TREE_INSIDE_OF_LOOP_COST): Remove macro. (struct _vect_peel_extended_info): Add stmt_cost_vec field. (struct _loop_vec_info): Add target_cost_data field. (LOOP_VINFO_TARGET_COST_DATA): New accessor macro. (struct _bb_vec_info): Add target_cost_data field. (BB_VINFO_TARGET_COST_DATA): New accessor macro. (struct _stmt_vec_info): Remove cost.inside_of_loop field. (STMT_VINFO_INSIDE_OF_LOOP_COST): Remove macro. (stmt_vinfo_set_inside_of_loop_cost): Remove function. (init_cost): New function. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. (vect_model_simple_cost): Change parameter list. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): New extern decl. (vect_get_load_cost): Change parameter list. (vect_get_store_cost): Likewise. * tree-vect-loop.c (new_loop_vec_info): Call init_cost. (destroy_loop_vec_info): Call destroy_cost_data. (vect_estimate_min_profitable_iters): Remove old calculation of inside costs; call finish_cost instead. (vect_model_reduction_cost): Call add_stmt_cost instead of old inside-costs calculation. (vect_model_induction_cost): Likewise. * tree-vect-data-refs.c (vect_get_data_access_cost): Change to return a stmt_vector_for_cost; modify calls to vect_get_load_cost and vect_get_store_cost to obtain the value to return. (vect_peeling_hash_get_lowest_cost): Obtain a stmt_cost_vec from vect_get_data_access_cost and store it in the minimum peeling structure. (vect_peeling_hash_choose_best_peeling): Change the parameter list to add a (stmt_vector_for_cost *) output parameter, and set its value. (vect_enhance_data_refs_alignment): Ignore the new return value from calls to vect_get_data_access_cost; obtain stmt_cost_vec from vect_peeling_hash_choose_best_peeling and pass its contents to the target cost model. * tree-vect-stmts.c (stmt_vectype): New function. (stmt_in_inner_loop_p): Likewise. (record_stmt_cost): Likewise. (vect_model_simple_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_promotion_demotion_cost): Call add_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_store_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vect_model_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_load_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vectorizable_call): Add NULL parameter to vect_model_simple_cost call. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Add NULL parameter to vect_model_store_cost call. (vectorizable_load): Add NULL parameter to vect_model_load_cost call. (new_stmt_vec_info): Don't set STMT_VINFO_INSIDE_OF_LOOP_COST. * config/spu/spu.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (spu_init_cost): New function. (spu_add_stmt_cost): Likewise. (spu_finish_cost): Likewise. (spu_destroy_cost_data): Likewise. * config/i386/i386.c (ix86_init_cost): New function. (ix86_add_stmt_cost): Likewise. (ix86_finish_cost): Likewise. (ix86_destroy_cost_data): Likewise. (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * config/rs6000/rs6000.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (rs6000_init_cost): New function. (rs6000_add_stmt_cost): Likewise. (rs6000_finish_cost): Likewise. (rs6000_destroy_cost_data): Likewise. * tree-vect-slp.c (vect_free_slp_instance): Free stmt_cost_vec. (vect_create_new_slp_node): Don't set SLP_TREE_INSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_model_store_cost and vect_model_simple_cost calls. (vect_build_slp_tree): Remove inside_cost parameter; add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_get_and_check_slp_defs, vect_model_load_cost, and recursive vect_build_slp_tree calls; prevent calculating cost more than once for loads; remove inside_cost parameter from recursive vect_build_slp_tree calls; call record_stmt_cost instead of old calculation. (vect_analyze_slp_instance): Allocate stmt_cost_vec and save it with the instance; free it on premature exit; remove inside_cost parameter from vect_build_slp_tree call; add stmt_cost_vec parameter to vect_build_slp_tree call; don't set SLP_INSTANCE_INSIDE_OF_LOOP_COST. (new_bb_vec_info): Call init_cost. (destroy_bb_vec_info): Call destroy_cost_data. (vect_bb_vectorization_profitable_p): Call add_stmt_cost for each statement recorded with an SLP instance; call finish_cost instead of the old calculation. (vect_update_slp_costs_according_to_vf): Record statement costs from SLP instances, multiplying by the appropriate number of copies; don't update SLP_INSTANCE_INSIDE_OF_LOOP_COST. From-SVN: r189460
2012-07-13 13:12:33 +02:00
{
tm.texi: Regenerate. 2012-07-24 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * targhooks.c (default_init_cost): Add prologue and epilogue costs. (default_add_stmt_cost): Likewise; also handle NULL stmt_info. (default_finish_cost): Add prologue and epilogue costs. * targhooks.h (default_add_stmt_cost): Change parameter list. (default_finish_cost): Likewise. * target.def (init_cost): Change documentation string. (add_stmt_cost): Change documentation string and parameter list. (finish_cost): Likewise. * target.h (vect_cost_model_location): New enum. * tree-vectorizer.h (struct _slp_tree): Remove cost substruct. (struct _slp_instance): Remove cost substruct; rename stmt_cost_vec to body_cost_vec. (SLP_INSTANCE_OUTSIDE_OF_LOOP_COST): Remove. (SLP_INSTANCE_STMT_COST_VEC): Rename to SLP_INSTANCE_BODY_COST_VEC. (SLP_TREE_OUTSIDE_OF_LOOP_COST): Remove. (struct _vect_peel_extended_info): Rename stmt_cost_vec to body_cost_vec. (struct _stmt_vec_info): Remove cost substruct. (STMT_VINFO_OUTSIDE_OF_LOOP_COST): Remove. (stmt_vinfo_set_outside_of_loop_cost): Remove. (builtin_vectorization_cost): New function. (vect_get_stmt_cost): Change to use builtin_vectorization_cost. (add_stmt_cost): Change parameter list. (finish_cost): Likewise. (vect_model_simple_cost): Likewise. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): Likewise. (vect_get_load_cost): Likewise. (vect_get_known_peeling_cost): Likewise. * tree-vect-loop.c (vect_get_known_peeling_cost): Change parameter list; call record_stmt_cost for prologue and epilogue costs. (vect_estimate_min_profitable_iters): Call add_stmt_cost for prologue and epilogue costs; remove computation of vec_outside_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_model_reduction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue and epilogue costs. (vect_model_induction_cost): Revise call to add_stmt_cost for body costs; call add_stmt_cost for prologue costs. * tree-vect-data-refs.c (vect_get_data_access_cost): Change parameter list for function and arguments for calls to vect_get_load_cost and vect_get_store_cost. (vect_peeling_hash_get_lowest_cost): Change argument list for calls to vect_get_data_access_cost and vect_get_known_peeling_cost; use temporary vectors prologue_cost_vec and epilogue_cost_vec for the latter call and discard their results; rename stmt_cost_vec to body_cost_vec; correct possible storage leak for body_cost_vec. (vect_peeling_hash_choose_best_peeling): Rename stmt_cost_vec to body_cost_vec. (vect_enhance_data_refs_alignment): Rename stmt_cost_vec to body_cost_vec; add extra dummy parameter on calls to vect_get_data_access_cost; tolerate null si->stmt; add vect_body to argument list on call to add_stmt_cost. * tree-vect-stmts.c (record_stmt_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; tolerate null stmt_info; call builtin_vectorization_cost; add "where" parameter on call to add_stmt_cost. (vect_model_simple_cost): Change parameter list; call record_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost; rename stmt_cost_vec to body_cost_vec. (vect_model_promotion_demotion_cost): Add vect_body argument to call to add_stmt_cost; call add_stmt_cost for prologue costs; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_model_store_cost): Change parameter list; call record_stmt_cost for prologue costs; add vect_body argument to call to record_stmt_cost; rename stmt_cost_vec to body_cost_vec; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_store_cost): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost. (vect_model_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; remove call to stmt_vinfo_set_outside_of_loop_cost. (vect_get_load_cost): Change parameter list; rename stmt_cost_vec to body_cost_vec; add vect_body argument to calls to record_stmt_cost; call record_stmt_cost for prologue costs. (vectorizable_store): Change argument list for call to vect_model_store_cost. (vectorizable_load): Change argument list for call to vect_model_load_cost. (new_stmt_vec_info): Remove assignment to STMT_VINFO_OUTSIDE_OF_LOOP_COST. * config/spu/spu.c (spu_init_cost): Add prologue and epilogue costs. (spu_add_stmt_cost): Likewise; also handle NULL stmt_info. (spu_finish_cost): Add prologue and epilogue costs. * config/i386/i386.c (i386_init_cost): Add prologue and epilogue costs. (i386_add_stmt_cost): Likewise; also handle NULL stmt_info. (i386_finish_cost): Add prologue and epilogue costs. * config/rs6000/rs6000.c (rs6000_init_cost): Add prologue and epilogue costs. (rs6000_add_stmt_cost): Likewise; also handle NULL stmt_info. (rs6000_finish_cost): Add prologue and epilogue costs. * tree-vect-slp.c (vect_free_slp_instance): Rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC. (vect_create_new_slp_node): Remove assignment to SLP_TREE_OUTSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Change parameter list; change argument lists to calls to vect_model_store_cost and vect_model_simple_cost. (vect_build_slp_tree): Change parameter list; change argument lists to calls to vect_model_load_cost, vect_get_and_check_slp_defs, and recursive self-calls; remove setting of outside_cost from SLP_TREE_OUTSIDE_OF_LOOP_COST; add vect_body argument to call to record_stmt_cost. (vect_analyze_slp_instance): Rename stmt_cost_vec to body_cost_vec; rename SLP_INSTANCE_STMT_COST_VEC to SLP_INSTANCE_BODY_COST_VEC; remove assignment to SLP_INSTANCE_OUTSIDE_OF_LOOP_COST; record SLP prologue costs. (vect_bb_vectorization_profitable_p): Rename stmt_cost_vec to body_cost_vec; handle null ci->stmt; add vect_body argument to call to add_stmt_cost; simplify calls to targetm.vectorize. builtin_vectorization_cost; return vec_prologue_cost and vec_epilogue_cost from finish_cost. (vect_update_slp_costs_according_to_vf): Rename stmt_cost_vec to body_cost_vec; add vect_body argument to call to add_stmt_cost. From-SVN: r189836
2012-07-25 05:07:08 +02:00
unsigned *cost = (unsigned *) data;
*prologue_cost = cost[vect_prologue];
*body_cost = cost[vect_body];
*epilogue_cost = cost[vect_epilogue];
tm.texi: Regenerate. 2012-07-13 Bill Schmidt <wschmidt@linux.ibm.com> * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_VECTORIZE_INIT_COST): New hook. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * targhooks.c (default_init_cost): New function. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * targhooks.h (default_init_cost): New decl. (default_add_stmt_cost): Likewise. (default_finish_cost): Likewise. (default_destroy_cost_data): Likewise. * target.def (init_cost): New DEFHOOK. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. * target.h (struct _stmt_vec_info): New extern decl. (stmt_vectype): Likewise. (stmt_in_inner_loop_p): Likewise. * tree-vectorizer.h (stmt_info_for_cost): New struct/typedef. (stmt_vector_for_cost): New VEC/typedef. (add_stmt_info_to_vec): New function. (struct _slp_tree): Remove cost.inside_of_loop field. (struct _slp_instance): Remove cost.inside_of_loop field; add stmt_cost_vec field. (SLP_INSTANCE_INSIDE_OF_LOOP_COST): Remove macro. (SLP_INSTANCE_STMT_COST_VEC): New accessor macro. (SLP_TREE_INSIDE_OF_LOOP_COST): Remove macro. (struct _vect_peel_extended_info): Add stmt_cost_vec field. (struct _loop_vec_info): Add target_cost_data field. (LOOP_VINFO_TARGET_COST_DATA): New accessor macro. (struct _bb_vec_info): Add target_cost_data field. (BB_VINFO_TARGET_COST_DATA): New accessor macro. (struct _stmt_vec_info): Remove cost.inside_of_loop field. (STMT_VINFO_INSIDE_OF_LOOP_COST): Remove macro. (stmt_vinfo_set_inside_of_loop_cost): Remove function. (init_cost): New function. (add_stmt_cost): Likewise. (finish_cost): Likewise. (destroy_cost_data): Likewise. (vect_model_simple_cost): Change parameter list. (vect_model_store_cost): Likewise. (vect_model_load_cost): Likewise. (record_stmt_cost): New extern decl. (vect_get_load_cost): Change parameter list. (vect_get_store_cost): Likewise. * tree-vect-loop.c (new_loop_vec_info): Call init_cost. (destroy_loop_vec_info): Call destroy_cost_data. (vect_estimate_min_profitable_iters): Remove old calculation of inside costs; call finish_cost instead. (vect_model_reduction_cost): Call add_stmt_cost instead of old inside-costs calculation. (vect_model_induction_cost): Likewise. * tree-vect-data-refs.c (vect_get_data_access_cost): Change to return a stmt_vector_for_cost; modify calls to vect_get_load_cost and vect_get_store_cost to obtain the value to return. (vect_peeling_hash_get_lowest_cost): Obtain a stmt_cost_vec from vect_get_data_access_cost and store it in the minimum peeling structure. (vect_peeling_hash_choose_best_peeling): Change the parameter list to add a (stmt_vector_for_cost *) output parameter, and set its value. (vect_enhance_data_refs_alignment): Ignore the new return value from calls to vect_get_data_access_cost; obtain stmt_cost_vec from vect_peeling_hash_choose_best_peeling and pass its contents to the target cost model. * tree-vect-stmts.c (stmt_vectype): New function. (stmt_in_inner_loop_p): Likewise. (record_stmt_cost): Likewise. (vect_model_simple_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_promotion_demotion_cost): Call add_stmt_cost instead of old calculation; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_model_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_store_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_store_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vect_model_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation; add stmt_cost_vec parameter to vect_get_load_cost call; don't call stmt_vinfo_set_inside_of_loop_cost. (vect_get_load_cost): Add stmt_cost_vec parameter; call record_stmt_cost instead of old calculation. (vectorizable_call): Add NULL parameter to vect_model_simple_cost call. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Add NULL parameter to vect_model_store_cost call. (vectorizable_load): Add NULL parameter to vect_model_load_cost call. (new_stmt_vec_info): Don't set STMT_VINFO_INSIDE_OF_LOOP_COST. * config/spu/spu.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (spu_init_cost): New function. (spu_add_stmt_cost): Likewise. (spu_finish_cost): Likewise. (spu_destroy_cost_data): Likewise. * config/i386/i386.c (ix86_init_cost): New function. (ix86_add_stmt_cost): Likewise. (ix86_finish_cost): Likewise. (ix86_destroy_cost_data): Likewise. (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * config/rs6000/rs6000.c (TARGET_VECTORIZE_INIT_COST): New macro def. (TARGET_VECTORIZE_ADD_STMT_COST): Likewise. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (rs6000_init_cost): New function. (rs6000_add_stmt_cost): Likewise. (rs6000_finish_cost): Likewise. (rs6000_destroy_cost_data): Likewise. * tree-vect-slp.c (vect_free_slp_instance): Free stmt_cost_vec. (vect_create_new_slp_node): Don't set SLP_TREE_INSIDE_OF_LOOP_COST. (vect_get_and_check_slp_defs): Add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_model_store_cost and vect_model_simple_cost calls. (vect_build_slp_tree): Remove inside_cost parameter; add stmt_cost_vec parameter; add stmt_cost_vec parameter to vect_get_and_check_slp_defs, vect_model_load_cost, and recursive vect_build_slp_tree calls; prevent calculating cost more than once for loads; remove inside_cost parameter from recursive vect_build_slp_tree calls; call record_stmt_cost instead of old calculation. (vect_analyze_slp_instance): Allocate stmt_cost_vec and save it with the instance; free it on premature exit; remove inside_cost parameter from vect_build_slp_tree call; add stmt_cost_vec parameter to vect_build_slp_tree call; don't set SLP_INSTANCE_INSIDE_OF_LOOP_COST. (new_bb_vec_info): Call init_cost. (destroy_bb_vec_info): Call destroy_cost_data. (vect_bb_vectorization_profitable_p): Call add_stmt_cost for each statement recorded with an SLP instance; call finish_cost instead of the old calculation. (vect_update_slp_costs_according_to_vf): Record statement costs from SLP instances, multiplying by the appropriate number of copies; don't update SLP_INSTANCE_INSIDE_OF_LOOP_COST. From-SVN: r189460
2012-07-13 13:12:33 +02:00
}
/* Free the cost data. */
void
default_destroy_cost_data (void *data)
{
free (data);
}
tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153573
2009-10-26 22:57:10 +01:00
/* Determine whether or not a pointer mode is valid. Assume defaults
of ptr_mode or Pmode - can be overridden. */
bool
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_valid_pointer_mode (machine_mode mode)
tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153573
2009-10-26 22:57:10 +01:00
{
return (mode == ptr_mode || mode == Pmode);
}
/* Determine whether the memory reference specified by REF may alias
the C libraries errno location. */
bool
default_ref_may_alias_errno (ao_ref *ref)
{
tree base = ao_ref_base (ref);
/* The default implementation assumes the errno location is
a declaration of type int or is always accessed via a
pointer to int. We assume that accesses to errno are
not deliberately obfuscated (even in conforming ways). */
if (TYPE_UNSIGNED (TREE_TYPE (base))
|| TYPE_MODE (TREE_TYPE (base)) != TYPE_MODE (integer_type_node))
return false;
/* The default implementation assumes an errno location
declaration is never defined in the current compilation unit. */
if (DECL_P (base)
&& !TREE_STATIC (base))
return true;
else if (TREE_CODE (base) == MEM_REF
&& TREE_CODE (TREE_OPERAND (base, 0)) == SSA_NAME)
{
struct ptr_info_def *pi = SSA_NAME_PTR_INFO (TREE_OPERAND (base, 0));
return !pi || pi->pt.anything || pi->pt.nonlocal;
}
return false;
}
/* Return the mode for a pointer to a given ADDRSPACE,
defaulting to ptr_mode for all address spaces. */
tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153573
2009-10-26 22:57:10 +01:00
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153573
2009-10-26 22:57:10 +01:00
default_addr_space_pointer_mode (addr_space_t addrspace ATTRIBUTE_UNUSED)
{
return ptr_mode;
}
/* Return the mode for an address in a given ADDRSPACE,
defaulting to Pmode for all address spaces. */
tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153573
2009-10-26 22:57:10 +01:00
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153573
2009-10-26 22:57:10 +01:00
default_addr_space_address_mode (addr_space_t addrspace ATTRIBUTE_UNUSED)
{
return Pmode;
}
/* Named address space version of valid_pointer_mode.
To match the above, the same modes apply to all address spaces. */
tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153573
2009-10-26 22:57:10 +01:00
bool
default_addr_space_valid_pointer_mode (machine_mode mode,
addr_space_t as ATTRIBUTE_UNUSED)
tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153573
2009-10-26 22:57:10 +01:00
{
return targetm.valid_pointer_mode (mode);
}
/* Some places still assume that all pointer or address modes are the
standard Pmode and ptr_mode. These optimizations become invalid if
the target actually supports multiple different modes. For now,
we disable such optimizations on such targets, using this function. */
bool
target_default_pointer_address_modes_p (void)
{
if (targetm.addr_space.address_mode != default_addr_space_address_mode)
return false;
if (targetm.addr_space.pointer_mode != default_addr_space_pointer_mode)
return false;
return true;
}
/* Named address space version of legitimate_address_p.
By default, all address spaces have the same form. */
extend.texi (Named Address Spaces): New section. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/extend.texi (Named Address Spaces): New section. * coretypes.h (addr_space_t): New type. (ADDR_SPACE_GENERIC): New define. (ADDR_SPACE_GENERIC_P): New macro. * doc/tm.texi (Named Address Spaces): New section. (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document. (TARGET_ADDR_SPACE_SUBSET_P): Document. (TARGET_ADDR_SPACE_CONVERT): Document. * target.h (struct gcc_target): Add addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise. (TARGET_ADDR_SPACE_SUBSET_P): Likewise. (TARGET_ADDR_SPACE_CONVERT): Likewise. (TARGET_ADDR_SPACE_HOOKS): Likewise. (TARGET_INITIALIZER): Initialize addr_space hooks. * targhooks.c (default_addr_space_legitimate_address_p): New function. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * targhooks.h (default_addr_space_legitimate_address_p): Add prototype. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * doc/rtl.texi (MEM_ADDR_SPACE): Document. * rtl.h (mem_attrs): Add ADDRSPACE memory attribute. (MEM_ADDR_SPACE): New macro. * emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set address space memory attribute. (mem_attrs_htab_hash): Handle address space memory attribute. (mem_attrs_htab_eq): Likewise. (set_mem_attributes_minus_bitpos): Likewise. (set_mem_alias_set): Likewise. (set_mem_align): Likewise. (set_mem_expr): Likewise. (set_mem_offset): Likewise. (set_mem_size): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. (widen_memoy_address): Likewise. (get_spill_slot_decl): Likewise. (set_mem_attrs_for_spill): Likewise. (set_mem_addr_space): New function. * emit-rtl.h (set_mem_addr_space): Add prototype. * print-rtl.c (print_rtx): Print address space memory attribute. * expr.c (expand_assignment): Set address space memory attribute of generated MEM RTXes as appropriate. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. * tree.h (struct tree_base): Add address_space bitfield. Reduce size of "spare" bitfield. (TYPE_ADDR_SPACE): New macro. (ENCODE_QUAL_ADDR_SPACE): Likewise. (DECODE_QUAL_ADDR_SPACE): Likewise. (CLEAR_QUAL_ADDR_SPACE): Likewise. (KEEP_QUAL_ADDR_SPACE): Likewise. (TYPE_QUALS): Encode type address space. (TYPE_QUALS_NO_ADDR_SPACE): New macro. * tree.c (set_type_quals): Set type address space. (build_array_type): Inherit array address space from element type. * print-tree.c (print_node_brief): Print type address space. (print_node): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * explow.c (memory_address): Rename to ... (memory_address_addr_space): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * recog.c (memory_address_p): Rename to ... (memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (offsettable_address_p): Rename to ... (offsettable_address_addr_space_p): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * reload.c (strict_memory_address_p): Rename to ... (strict_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (maybe_memory_address_p): Rename to ... (maybe_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. * expr.h (memory_address_addr_space): Add prototype. (memory_address): Define as macro. * recog.h (memory_address_addr_space_p): Add prototype. (memory_address_p): Define as macro. (offsettable_address_addr_space_p): Add prototype. (offsettable_address_p): Define as macro. (strict_memory_address_addr_space_p): Add prototype. (strict_memory_address_p): Define as macro. * combine.c (find_split_point): Use address-space aware variants of memory address routines. * emit-rtl.c (operand_subword): Likewise. (change_address_1): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. * expr.c (emit_move_insn): Likewise. (expand_assignment): Likewise. (expand_expr_real_1): Likewise. * recog.c (verify_changes): Likewise. (general_operand): Likewise. (offsettable_memref_p): Likewise. (offsettable_nonstrict_memref_p): Likewise. (constrain_operands): Likewise. * reload.c (get_secondary_mem): Likewise. (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (find_reloads_subreg_address): Likewise. * reload1.c (reload): Likewise. * rtlhooks.c (gen_lowpart_if_possible): Likewise. * rtl.h (address_cost): Add ADDRSPACE argument. * rtlanal.c (address_cost): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. * loop-invariant.c (create_new_invariant): Update address_cost call. * tree-ssa-loop-ivopts.c (computation_cost): Likewise. * fwprop.c (should_replace_address): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (propagate_rtx_1): Update call to should_replace_address. * tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE argument. * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add ADDRSPACE argument. Use per-address-space instead of global cache. Use address-space aware variant of memory address routines. (get_address_cost): Likewise. (get_computation_cost_at): Update calls. * tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (create_mem_ref_raw): Update call to valid_mem_ref_p. (most_expensive_mult_to_index): Update call to multiplier_allowed_in_address_p. * dwarf2out.c (modified_type_die): Output DW_AT_address_class attribute to indicate named address spaces. * varasm.c (get_variable_section): DECLs in named address spaces cannot be "common". * reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS for addresses in a non-generic address space. * expr.c (emit_block_move_hints): Do not use libcalls for memory in non-generic address spaces. (clear_storage_hints): Likewise. (expand_assignment): Likewise. * fold-const.c (operand_equal_p): Expressions refering to different address spaces are not equivalent. * rtl.c (rtx_equal_p_cb): MEMs refering to different address spaces are not equivalent. (rtx_equal_p): Likewise. * cse.c (exp_equiv_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * reload.c (operands_match_p): Likewise. * alias.c (nonoverlapping_memrefs_p): MEMs refering to different address spaces may alias. (true_dependence): Likewise. (canon_true_dependence): Likewise. (write_dependence_p): Likewise. * dse.c (canon_address): Handle named address spaces. * ifcvt.c (noce_try_cmove_arith): Likewise. * tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code. * expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR. * convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR to handle conversions between different address spaces. * fold-const.c (fold_convert_loc): Likewise. (fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. * gimple-pretty-print.c (dump_unary_rhs): Likewise. * tree-cfg.c (verify_gimple_assign_unary): Likewise. * tree-inline.c (estimate_operator_cost): Likewise. * tree-ssa.c (useless_type_conversion_p): Conversions between pointers to different address spaces are not useless. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153572
2009-10-26 22:55:59 +01:00
bool
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_addr_space_legitimate_address_p (machine_mode mode, rtx mem,
bool strict,
addr_space_t as ATTRIBUTE_UNUSED)
extend.texi (Named Address Spaces): New section. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/extend.texi (Named Address Spaces): New section. * coretypes.h (addr_space_t): New type. (ADDR_SPACE_GENERIC): New define. (ADDR_SPACE_GENERIC_P): New macro. * doc/tm.texi (Named Address Spaces): New section. (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document. (TARGET_ADDR_SPACE_SUBSET_P): Document. (TARGET_ADDR_SPACE_CONVERT): Document. * target.h (struct gcc_target): Add addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise. (TARGET_ADDR_SPACE_SUBSET_P): Likewise. (TARGET_ADDR_SPACE_CONVERT): Likewise. (TARGET_ADDR_SPACE_HOOKS): Likewise. (TARGET_INITIALIZER): Initialize addr_space hooks. * targhooks.c (default_addr_space_legitimate_address_p): New function. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * targhooks.h (default_addr_space_legitimate_address_p): Add prototype. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * doc/rtl.texi (MEM_ADDR_SPACE): Document. * rtl.h (mem_attrs): Add ADDRSPACE memory attribute. (MEM_ADDR_SPACE): New macro. * emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set address space memory attribute. (mem_attrs_htab_hash): Handle address space memory attribute. (mem_attrs_htab_eq): Likewise. (set_mem_attributes_minus_bitpos): Likewise. (set_mem_alias_set): Likewise. (set_mem_align): Likewise. (set_mem_expr): Likewise. (set_mem_offset): Likewise. (set_mem_size): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. (widen_memoy_address): Likewise. (get_spill_slot_decl): Likewise. (set_mem_attrs_for_spill): Likewise. (set_mem_addr_space): New function. * emit-rtl.h (set_mem_addr_space): Add prototype. * print-rtl.c (print_rtx): Print address space memory attribute. * expr.c (expand_assignment): Set address space memory attribute of generated MEM RTXes as appropriate. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. * tree.h (struct tree_base): Add address_space bitfield. Reduce size of "spare" bitfield. (TYPE_ADDR_SPACE): New macro. (ENCODE_QUAL_ADDR_SPACE): Likewise. (DECODE_QUAL_ADDR_SPACE): Likewise. (CLEAR_QUAL_ADDR_SPACE): Likewise. (KEEP_QUAL_ADDR_SPACE): Likewise. (TYPE_QUALS): Encode type address space. (TYPE_QUALS_NO_ADDR_SPACE): New macro. * tree.c (set_type_quals): Set type address space. (build_array_type): Inherit array address space from element type. * print-tree.c (print_node_brief): Print type address space. (print_node): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * explow.c (memory_address): Rename to ... (memory_address_addr_space): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * recog.c (memory_address_p): Rename to ... (memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (offsettable_address_p): Rename to ... (offsettable_address_addr_space_p): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * reload.c (strict_memory_address_p): Rename to ... (strict_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (maybe_memory_address_p): Rename to ... (maybe_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. * expr.h (memory_address_addr_space): Add prototype. (memory_address): Define as macro. * recog.h (memory_address_addr_space_p): Add prototype. (memory_address_p): Define as macro. (offsettable_address_addr_space_p): Add prototype. (offsettable_address_p): Define as macro. (strict_memory_address_addr_space_p): Add prototype. (strict_memory_address_p): Define as macro. * combine.c (find_split_point): Use address-space aware variants of memory address routines. * emit-rtl.c (operand_subword): Likewise. (change_address_1): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. * expr.c (emit_move_insn): Likewise. (expand_assignment): Likewise. (expand_expr_real_1): Likewise. * recog.c (verify_changes): Likewise. (general_operand): Likewise. (offsettable_memref_p): Likewise. (offsettable_nonstrict_memref_p): Likewise. (constrain_operands): Likewise. * reload.c (get_secondary_mem): Likewise. (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (find_reloads_subreg_address): Likewise. * reload1.c (reload): Likewise. * rtlhooks.c (gen_lowpart_if_possible): Likewise. * rtl.h (address_cost): Add ADDRSPACE argument. * rtlanal.c (address_cost): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. * loop-invariant.c (create_new_invariant): Update address_cost call. * tree-ssa-loop-ivopts.c (computation_cost): Likewise. * fwprop.c (should_replace_address): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (propagate_rtx_1): Update call to should_replace_address. * tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE argument. * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add ADDRSPACE argument. Use per-address-space instead of global cache. Use address-space aware variant of memory address routines. (get_address_cost): Likewise. (get_computation_cost_at): Update calls. * tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (create_mem_ref_raw): Update call to valid_mem_ref_p. (most_expensive_mult_to_index): Update call to multiplier_allowed_in_address_p. * dwarf2out.c (modified_type_die): Output DW_AT_address_class attribute to indicate named address spaces. * varasm.c (get_variable_section): DECLs in named address spaces cannot be "common". * reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS for addresses in a non-generic address space. * expr.c (emit_block_move_hints): Do not use libcalls for memory in non-generic address spaces. (clear_storage_hints): Likewise. (expand_assignment): Likewise. * fold-const.c (operand_equal_p): Expressions refering to different address spaces are not equivalent. * rtl.c (rtx_equal_p_cb): MEMs refering to different address spaces are not equivalent. (rtx_equal_p): Likewise. * cse.c (exp_equiv_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * reload.c (operands_match_p): Likewise. * alias.c (nonoverlapping_memrefs_p): MEMs refering to different address spaces may alias. (true_dependence): Likewise. (canon_true_dependence): Likewise. (write_dependence_p): Likewise. * dse.c (canon_address): Handle named address spaces. * ifcvt.c (noce_try_cmove_arith): Likewise. * tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code. * expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR. * convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR to handle conversions between different address spaces. * fold-const.c (fold_convert_loc): Likewise. (fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. * gimple-pretty-print.c (dump_unary_rhs): Likewise. * tree-cfg.c (verify_gimple_assign_unary): Likewise. * tree-inline.c (estimate_operator_cost): Likewise. * tree-ssa.c (useless_type_conversion_p): Conversions between pointers to different address spaces are not useless. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153572
2009-10-26 22:55:59 +01:00
{
return targetm.legitimate_address_p (mode, mem, strict);
}
/* Named address space version of LEGITIMIZE_ADDRESS.
By default, all address spaces have the same form. */
extend.texi (Named Address Spaces): New section. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/extend.texi (Named Address Spaces): New section. * coretypes.h (addr_space_t): New type. (ADDR_SPACE_GENERIC): New define. (ADDR_SPACE_GENERIC_P): New macro. * doc/tm.texi (Named Address Spaces): New section. (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document. (TARGET_ADDR_SPACE_SUBSET_P): Document. (TARGET_ADDR_SPACE_CONVERT): Document. * target.h (struct gcc_target): Add addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise. (TARGET_ADDR_SPACE_SUBSET_P): Likewise. (TARGET_ADDR_SPACE_CONVERT): Likewise. (TARGET_ADDR_SPACE_HOOKS): Likewise. (TARGET_INITIALIZER): Initialize addr_space hooks. * targhooks.c (default_addr_space_legitimate_address_p): New function. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * targhooks.h (default_addr_space_legitimate_address_p): Add prototype. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * doc/rtl.texi (MEM_ADDR_SPACE): Document. * rtl.h (mem_attrs): Add ADDRSPACE memory attribute. (MEM_ADDR_SPACE): New macro. * emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set address space memory attribute. (mem_attrs_htab_hash): Handle address space memory attribute. (mem_attrs_htab_eq): Likewise. (set_mem_attributes_minus_bitpos): Likewise. (set_mem_alias_set): Likewise. (set_mem_align): Likewise. (set_mem_expr): Likewise. (set_mem_offset): Likewise. (set_mem_size): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. (widen_memoy_address): Likewise. (get_spill_slot_decl): Likewise. (set_mem_attrs_for_spill): Likewise. (set_mem_addr_space): New function. * emit-rtl.h (set_mem_addr_space): Add prototype. * print-rtl.c (print_rtx): Print address space memory attribute. * expr.c (expand_assignment): Set address space memory attribute of generated MEM RTXes as appropriate. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. * tree.h (struct tree_base): Add address_space bitfield. Reduce size of "spare" bitfield. (TYPE_ADDR_SPACE): New macro. (ENCODE_QUAL_ADDR_SPACE): Likewise. (DECODE_QUAL_ADDR_SPACE): Likewise. (CLEAR_QUAL_ADDR_SPACE): Likewise. (KEEP_QUAL_ADDR_SPACE): Likewise. (TYPE_QUALS): Encode type address space. (TYPE_QUALS_NO_ADDR_SPACE): New macro. * tree.c (set_type_quals): Set type address space. (build_array_type): Inherit array address space from element type. * print-tree.c (print_node_brief): Print type address space. (print_node): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * explow.c (memory_address): Rename to ... (memory_address_addr_space): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * recog.c (memory_address_p): Rename to ... (memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (offsettable_address_p): Rename to ... (offsettable_address_addr_space_p): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * reload.c (strict_memory_address_p): Rename to ... (strict_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (maybe_memory_address_p): Rename to ... (maybe_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. * expr.h (memory_address_addr_space): Add prototype. (memory_address): Define as macro. * recog.h (memory_address_addr_space_p): Add prototype. (memory_address_p): Define as macro. (offsettable_address_addr_space_p): Add prototype. (offsettable_address_p): Define as macro. (strict_memory_address_addr_space_p): Add prototype. (strict_memory_address_p): Define as macro. * combine.c (find_split_point): Use address-space aware variants of memory address routines. * emit-rtl.c (operand_subword): Likewise. (change_address_1): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. * expr.c (emit_move_insn): Likewise. (expand_assignment): Likewise. (expand_expr_real_1): Likewise. * recog.c (verify_changes): Likewise. (general_operand): Likewise. (offsettable_memref_p): Likewise. (offsettable_nonstrict_memref_p): Likewise. (constrain_operands): Likewise. * reload.c (get_secondary_mem): Likewise. (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (find_reloads_subreg_address): Likewise. * reload1.c (reload): Likewise. * rtlhooks.c (gen_lowpart_if_possible): Likewise. * rtl.h (address_cost): Add ADDRSPACE argument. * rtlanal.c (address_cost): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. * loop-invariant.c (create_new_invariant): Update address_cost call. * tree-ssa-loop-ivopts.c (computation_cost): Likewise. * fwprop.c (should_replace_address): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (propagate_rtx_1): Update call to should_replace_address. * tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE argument. * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add ADDRSPACE argument. Use per-address-space instead of global cache. Use address-space aware variant of memory address routines. (get_address_cost): Likewise. (get_computation_cost_at): Update calls. * tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (create_mem_ref_raw): Update call to valid_mem_ref_p. (most_expensive_mult_to_index): Update call to multiplier_allowed_in_address_p. * dwarf2out.c (modified_type_die): Output DW_AT_address_class attribute to indicate named address spaces. * varasm.c (get_variable_section): DECLs in named address spaces cannot be "common". * reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS for addresses in a non-generic address space. * expr.c (emit_block_move_hints): Do not use libcalls for memory in non-generic address spaces. (clear_storage_hints): Likewise. (expand_assignment): Likewise. * fold-const.c (operand_equal_p): Expressions refering to different address spaces are not equivalent. * rtl.c (rtx_equal_p_cb): MEMs refering to different address spaces are not equivalent. (rtx_equal_p): Likewise. * cse.c (exp_equiv_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * reload.c (operands_match_p): Likewise. * alias.c (nonoverlapping_memrefs_p): MEMs refering to different address spaces may alias. (true_dependence): Likewise. (canon_true_dependence): Likewise. (write_dependence_p): Likewise. * dse.c (canon_address): Handle named address spaces. * ifcvt.c (noce_try_cmove_arith): Likewise. * tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code. * expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR. * convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR to handle conversions between different address spaces. * fold-const.c (fold_convert_loc): Likewise. (fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. * gimple-pretty-print.c (dump_unary_rhs): Likewise. * tree-cfg.c (verify_gimple_assign_unary): Likewise. * tree-inline.c (estimate_operator_cost): Likewise. * tree-ssa.c (useless_type_conversion_p): Conversions between pointers to different address spaces are not useless. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153572
2009-10-26 22:55:59 +01:00
rtx
default_addr_space_legitimize_address (rtx x, rtx oldx, machine_mode mode,
addr_space_t as ATTRIBUTE_UNUSED)
extend.texi (Named Address Spaces): New section. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/extend.texi (Named Address Spaces): New section. * coretypes.h (addr_space_t): New type. (ADDR_SPACE_GENERIC): New define. (ADDR_SPACE_GENERIC_P): New macro. * doc/tm.texi (Named Address Spaces): New section. (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document. (TARGET_ADDR_SPACE_SUBSET_P): Document. (TARGET_ADDR_SPACE_CONVERT): Document. * target.h (struct gcc_target): Add addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise. (TARGET_ADDR_SPACE_SUBSET_P): Likewise. (TARGET_ADDR_SPACE_CONVERT): Likewise. (TARGET_ADDR_SPACE_HOOKS): Likewise. (TARGET_INITIALIZER): Initialize addr_space hooks. * targhooks.c (default_addr_space_legitimate_address_p): New function. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * targhooks.h (default_addr_space_legitimate_address_p): Add prototype. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * doc/rtl.texi (MEM_ADDR_SPACE): Document. * rtl.h (mem_attrs): Add ADDRSPACE memory attribute. (MEM_ADDR_SPACE): New macro. * emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set address space memory attribute. (mem_attrs_htab_hash): Handle address space memory attribute. (mem_attrs_htab_eq): Likewise. (set_mem_attributes_minus_bitpos): Likewise. (set_mem_alias_set): Likewise. (set_mem_align): Likewise. (set_mem_expr): Likewise. (set_mem_offset): Likewise. (set_mem_size): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. (widen_memoy_address): Likewise. (get_spill_slot_decl): Likewise. (set_mem_attrs_for_spill): Likewise. (set_mem_addr_space): New function. * emit-rtl.h (set_mem_addr_space): Add prototype. * print-rtl.c (print_rtx): Print address space memory attribute. * expr.c (expand_assignment): Set address space memory attribute of generated MEM RTXes as appropriate. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. * tree.h (struct tree_base): Add address_space bitfield. Reduce size of "spare" bitfield. (TYPE_ADDR_SPACE): New macro. (ENCODE_QUAL_ADDR_SPACE): Likewise. (DECODE_QUAL_ADDR_SPACE): Likewise. (CLEAR_QUAL_ADDR_SPACE): Likewise. (KEEP_QUAL_ADDR_SPACE): Likewise. (TYPE_QUALS): Encode type address space. (TYPE_QUALS_NO_ADDR_SPACE): New macro. * tree.c (set_type_quals): Set type address space. (build_array_type): Inherit array address space from element type. * print-tree.c (print_node_brief): Print type address space. (print_node): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * explow.c (memory_address): Rename to ... (memory_address_addr_space): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * recog.c (memory_address_p): Rename to ... (memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (offsettable_address_p): Rename to ... (offsettable_address_addr_space_p): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * reload.c (strict_memory_address_p): Rename to ... (strict_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (maybe_memory_address_p): Rename to ... (maybe_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. * expr.h (memory_address_addr_space): Add prototype. (memory_address): Define as macro. * recog.h (memory_address_addr_space_p): Add prototype. (memory_address_p): Define as macro. (offsettable_address_addr_space_p): Add prototype. (offsettable_address_p): Define as macro. (strict_memory_address_addr_space_p): Add prototype. (strict_memory_address_p): Define as macro. * combine.c (find_split_point): Use address-space aware variants of memory address routines. * emit-rtl.c (operand_subword): Likewise. (change_address_1): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. * expr.c (emit_move_insn): Likewise. (expand_assignment): Likewise. (expand_expr_real_1): Likewise. * recog.c (verify_changes): Likewise. (general_operand): Likewise. (offsettable_memref_p): Likewise. (offsettable_nonstrict_memref_p): Likewise. (constrain_operands): Likewise. * reload.c (get_secondary_mem): Likewise. (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (find_reloads_subreg_address): Likewise. * reload1.c (reload): Likewise. * rtlhooks.c (gen_lowpart_if_possible): Likewise. * rtl.h (address_cost): Add ADDRSPACE argument. * rtlanal.c (address_cost): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. * loop-invariant.c (create_new_invariant): Update address_cost call. * tree-ssa-loop-ivopts.c (computation_cost): Likewise. * fwprop.c (should_replace_address): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (propagate_rtx_1): Update call to should_replace_address. * tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE argument. * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add ADDRSPACE argument. Use per-address-space instead of global cache. Use address-space aware variant of memory address routines. (get_address_cost): Likewise. (get_computation_cost_at): Update calls. * tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (create_mem_ref_raw): Update call to valid_mem_ref_p. (most_expensive_mult_to_index): Update call to multiplier_allowed_in_address_p. * dwarf2out.c (modified_type_die): Output DW_AT_address_class attribute to indicate named address spaces. * varasm.c (get_variable_section): DECLs in named address spaces cannot be "common". * reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS for addresses in a non-generic address space. * expr.c (emit_block_move_hints): Do not use libcalls for memory in non-generic address spaces. (clear_storage_hints): Likewise. (expand_assignment): Likewise. * fold-const.c (operand_equal_p): Expressions refering to different address spaces are not equivalent. * rtl.c (rtx_equal_p_cb): MEMs refering to different address spaces are not equivalent. (rtx_equal_p): Likewise. * cse.c (exp_equiv_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * reload.c (operands_match_p): Likewise. * alias.c (nonoverlapping_memrefs_p): MEMs refering to different address spaces may alias. (true_dependence): Likewise. (canon_true_dependence): Likewise. (write_dependence_p): Likewise. * dse.c (canon_address): Handle named address spaces. * ifcvt.c (noce_try_cmove_arith): Likewise. * tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code. * expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR. * convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR to handle conversions between different address spaces. * fold-const.c (fold_convert_loc): Likewise. (fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. * gimple-pretty-print.c (dump_unary_rhs): Likewise. * tree-cfg.c (verify_gimple_assign_unary): Likewise. * tree-inline.c (estimate_operator_cost): Likewise. * tree-ssa.c (useless_type_conversion_p): Conversions between pointers to different address spaces are not useless. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153572
2009-10-26 22:55:59 +01:00
{
return targetm.legitimize_address (x, oldx, mode);
}
/* The default hook for determining if one named address space is a subset of
another and to return which address space to use as the common address
space. */
bool
default_addr_space_subset_p (addr_space_t subset, addr_space_t superset)
{
return (subset == superset);
}
/* The default hook for determining if 0 within a named address
space is a valid address. */
bool
default_addr_space_zero_address_valid (addr_space_t as ATTRIBUTE_UNUSED)
{
return false;
}
/* The default hook for debugging the address space is to return the
address space number to indicate DW_AT_address_class. */
int
default_addr_space_debug (addr_space_t as)
{
return as;
}
extend.texi (Named Address Spaces): New section. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/extend.texi (Named Address Spaces): New section. * coretypes.h (addr_space_t): New type. (ADDR_SPACE_GENERIC): New define. (ADDR_SPACE_GENERIC_P): New macro. * doc/tm.texi (Named Address Spaces): New section. (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document. (TARGET_ADDR_SPACE_SUBSET_P): Document. (TARGET_ADDR_SPACE_CONVERT): Document. * target.h (struct gcc_target): Add addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise. (TARGET_ADDR_SPACE_SUBSET_P): Likewise. (TARGET_ADDR_SPACE_CONVERT): Likewise. (TARGET_ADDR_SPACE_HOOKS): Likewise. (TARGET_INITIALIZER): Initialize addr_space hooks. * targhooks.c (default_addr_space_legitimate_address_p): New function. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * targhooks.h (default_addr_space_legitimate_address_p): Add prototype. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * doc/rtl.texi (MEM_ADDR_SPACE): Document. * rtl.h (mem_attrs): Add ADDRSPACE memory attribute. (MEM_ADDR_SPACE): New macro. * emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set address space memory attribute. (mem_attrs_htab_hash): Handle address space memory attribute. (mem_attrs_htab_eq): Likewise. (set_mem_attributes_minus_bitpos): Likewise. (set_mem_alias_set): Likewise. (set_mem_align): Likewise. (set_mem_expr): Likewise. (set_mem_offset): Likewise. (set_mem_size): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. (widen_memoy_address): Likewise. (get_spill_slot_decl): Likewise. (set_mem_attrs_for_spill): Likewise. (set_mem_addr_space): New function. * emit-rtl.h (set_mem_addr_space): Add prototype. * print-rtl.c (print_rtx): Print address space memory attribute. * expr.c (expand_assignment): Set address space memory attribute of generated MEM RTXes as appropriate. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. * tree.h (struct tree_base): Add address_space bitfield. Reduce size of "spare" bitfield. (TYPE_ADDR_SPACE): New macro. (ENCODE_QUAL_ADDR_SPACE): Likewise. (DECODE_QUAL_ADDR_SPACE): Likewise. (CLEAR_QUAL_ADDR_SPACE): Likewise. (KEEP_QUAL_ADDR_SPACE): Likewise. (TYPE_QUALS): Encode type address space. (TYPE_QUALS_NO_ADDR_SPACE): New macro. * tree.c (set_type_quals): Set type address space. (build_array_type): Inherit array address space from element type. * print-tree.c (print_node_brief): Print type address space. (print_node): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * explow.c (memory_address): Rename to ... (memory_address_addr_space): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * recog.c (memory_address_p): Rename to ... (memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (offsettable_address_p): Rename to ... (offsettable_address_addr_space_p): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * reload.c (strict_memory_address_p): Rename to ... (strict_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (maybe_memory_address_p): Rename to ... (maybe_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. * expr.h (memory_address_addr_space): Add prototype. (memory_address): Define as macro. * recog.h (memory_address_addr_space_p): Add prototype. (memory_address_p): Define as macro. (offsettable_address_addr_space_p): Add prototype. (offsettable_address_p): Define as macro. (strict_memory_address_addr_space_p): Add prototype. (strict_memory_address_p): Define as macro. * combine.c (find_split_point): Use address-space aware variants of memory address routines. * emit-rtl.c (operand_subword): Likewise. (change_address_1): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. * expr.c (emit_move_insn): Likewise. (expand_assignment): Likewise. (expand_expr_real_1): Likewise. * recog.c (verify_changes): Likewise. (general_operand): Likewise. (offsettable_memref_p): Likewise. (offsettable_nonstrict_memref_p): Likewise. (constrain_operands): Likewise. * reload.c (get_secondary_mem): Likewise. (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (find_reloads_subreg_address): Likewise. * reload1.c (reload): Likewise. * rtlhooks.c (gen_lowpart_if_possible): Likewise. * rtl.h (address_cost): Add ADDRSPACE argument. * rtlanal.c (address_cost): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. * loop-invariant.c (create_new_invariant): Update address_cost call. * tree-ssa-loop-ivopts.c (computation_cost): Likewise. * fwprop.c (should_replace_address): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (propagate_rtx_1): Update call to should_replace_address. * tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE argument. * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add ADDRSPACE argument. Use per-address-space instead of global cache. Use address-space aware variant of memory address routines. (get_address_cost): Likewise. (get_computation_cost_at): Update calls. * tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (create_mem_ref_raw): Update call to valid_mem_ref_p. (most_expensive_mult_to_index): Update call to multiplier_allowed_in_address_p. * dwarf2out.c (modified_type_die): Output DW_AT_address_class attribute to indicate named address spaces. * varasm.c (get_variable_section): DECLs in named address spaces cannot be "common". * reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS for addresses in a non-generic address space. * expr.c (emit_block_move_hints): Do not use libcalls for memory in non-generic address spaces. (clear_storage_hints): Likewise. (expand_assignment): Likewise. * fold-const.c (operand_equal_p): Expressions refering to different address spaces are not equivalent. * rtl.c (rtx_equal_p_cb): MEMs refering to different address spaces are not equivalent. (rtx_equal_p): Likewise. * cse.c (exp_equiv_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * reload.c (operands_match_p): Likewise. * alias.c (nonoverlapping_memrefs_p): MEMs refering to different address spaces may alias. (true_dependence): Likewise. (canon_true_dependence): Likewise. (write_dependence_p): Likewise. * dse.c (canon_address): Handle named address spaces. * ifcvt.c (noce_try_cmove_arith): Likewise. * tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code. * expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR. * convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR to handle conversions between different address spaces. * fold-const.c (fold_convert_loc): Likewise. (fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. * gimple-pretty-print.c (dump_unary_rhs): Likewise. * tree-cfg.c (verify_gimple_assign_unary): Likewise. * tree-inline.c (estimate_operator_cost): Likewise. * tree-ssa.c (useless_type_conversion_p): Conversions between pointers to different address spaces are not useless. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153572
2009-10-26 22:55:59 +01:00
/* The default hook for TARGET_ADDR_SPACE_CONVERT. This hook should never be
called for targets with only a generic address space. */
rtx
default_addr_space_convert (rtx op ATTRIBUTE_UNUSED,
tree from_type ATTRIBUTE_UNUSED,
tree to_type ATTRIBUTE_UNUSED)
{
gcc_unreachable ();
}
bool
default_hard_regno_scratch_ok (unsigned int regno ATTRIBUTE_UNUSED)
{
return true;
}
/* The default implementation of TARGET_MODE_DEPENDENT_ADDRESS_P. */
bool
re PR middle-end/54635 (Add addr_space_t argument to TARGET_MODE_DEPENDENT_ADDRESS_P) PR middle-end/54635 * doc/tm.texi.in (TARGET_MODE_DEPENDENT_ADDRESS_P): Document new parameter addrspace. * doc/tm.texi: Regenerate. * target.def (mode_dependent_address_p): Add addr_space_t parameter. * targhooks.h (default_mode_dependent_address_p): Ditto. * targhooks.c (default_mode_dependent_address_p): Ditto. * expr.c (convert_move): Pass address space to mode_dependent_address_p. * combine.c (combine_simplify_rtx): Ditto. (make_extraction): Ditto. (simplify_shift_const_1): Ditto. (gen_lowpart_for_combine): Ditto. * lower-subreg.c (simple_move_operand): Ditto. * recog.c (simplify_while_replacing): Ditto. (offsettable_address_addr_space_p): Ditto. (mode_dependent_address_p): Ditto. * simplify-rtx.c (simplify_unary_operation_1): Ditto. (simplify_subreg): Ditto. * config/m68k/m68k.md: Ditto. * config/vax/vax.md: Ditto. * config/vax/constraints.md (Q): Ditto. * config/vax/predicates.md (indexed_memory_operand): Ditto. * config/alpha/alpha.c (alpha_mode_dependent_address_p): Add unused addr_space_t parameter. * config/avr/avr.c (avr_mode_dependent_address_p): Ditto. * config/h8300/h8300.c (h8300_mode_dependent_address_p): Ditto. * config/m32r/m32r.c (m32r_mode_dependent_address_p): Ditto. * config/rs6000/rs6000.c (rs6000_mode_dependent_address_p): Ditto. * config/rx/rx.c (rx_mode_dependent_address_p): Ditto. * config/sparc/sparc.c (sparc_mode_dependent_address_p): Ditto. * config/stormy16/stormy16.c (xstormy16_mode_dependent_address_p): Ditto. * config/vax/vax.c (vax_mode_dependent_address_p): Ditto. * config/xtensa/xtensa.c (xtensa_mode_dependent_address_p): Ditto. From-SVN: r191761
2012-09-26 15:46:29 +02:00
default_mode_dependent_address_p (const_rtx addr ATTRIBUTE_UNUSED,
addr_space_t addrspace ATTRIBUTE_UNUSED)
{
return false;
}
bool
default_target_option_valid_attribute_p (tree ARG_UNUSED (fndecl),
tree ARG_UNUSED (name),
tree ARG_UNUSED (args),
int ARG_UNUSED (flags))
{
warning (OPT_Wattributes,
"target attribute is not supported on this machine");
return false;
}
bool
default_target_option_pragma_parse (tree ARG_UNUSED (args),
tree ARG_UNUSED (pop_target))
{
/* If args is NULL the caller is handle_pragma_pop_options (). In that case,
emit no warning because "#pragma GCC pop_target" is valid on targets that
do not have the "target" pragma. */
if (args)
warning (OPT_Wpragmas,
"#pragma GCC target is not supported for this machine");
return false;
}
bool
default_target_can_inline_p (tree caller, tree callee)
{
bool ret = false;
tree callee_opts = DECL_FUNCTION_SPECIFIC_TARGET (callee);
tree caller_opts = DECL_FUNCTION_SPECIFIC_TARGET (caller);
/* If callee has no option attributes, then it is ok to inline */
if (!callee_opts)
ret = true;
/* If caller has no option attributes, but callee does then it is not ok to
inline */
else if (!caller_opts)
ret = false;
/* If both caller and callee have attributes, assume that if the
pointer is different, the two functions have different target
options since build_target_option_node uses a hash table for the
options. */
else
ret = (callee_opts == caller_opts);
return ret;
}
/* If the machine does not have a case insn that compares the bounds,
this means extra overhead for dispatch tables, which raises the
threshold for using them. */
unsigned int
default_case_values_threshold (void)
{
return (targetm.have_casesi () ? 4 : 5);
}
bool
default_have_conditional_execution (void)
{
return HAVE_conditional_execution;
}
expr.h: Remove prototypes of functions defined in builtins.c. * expr.h: Remove prototypes of functions defined in builtins.c. * tree.h: (build_call_expr_*, build_string_literal): Add prototypes. Remove prototypes of functions defined in builtins.c. * builtins.h: Update prototype list to include all exported functions. * builtins.c: (default_libc_has_function, gnu_libc_has_function, no_c99_libc_has_function): Move to targhooks.c (build_string_literal, build_call_expr_loc_array, build_call_expr_loc_vec, build_call_expr_loc, build_call_expr): Move to tree.c. (expand_builtin_object_size, fold_builtin_object_size): Make static. * targhooks.c (default_libc_has_function, gnu_libc_has_function, no_c99_libc_has_function): Relocate from builtins.c. * tree.c: Include builtins.h. (build_call_expr_loc_array, build_call_expr_loc_vec, build_call_expr_loc, build_call_expr, build_string_literal): Relocate from builtins.c. * fold-const.h (fold_fma): Move prototype to builtins.h. * realmpfr.h (do_mpc_arg2): Move prototype to builtins.h. * fortran/trans.c (trans_runtime_error_vararg): Call fold_build_call_array_loc instead of fold_builtin_call_array. * asan.c: Include builtins.h. * cfgexpand.c: Likewise. * convert.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * gimple-fold.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimplify.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * lto-streamer-out.c: Likewise. * stmt.c: Likewise. * tree-inline.c: Likewise. * tree-object-size.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-streamer-in.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. c * c-decl.c: Include builtins.h. * c-parser.c: Likewise. cp * decl.c: Include builtins.h. * semantics.c: Likewise. go * go-gcc.cc: Include builtins.h. lto * lto-symtab.c: Include builtins.h. config * aarch64/aarch64.c: Include builtins.h. * alpha/alpha.c: Likewise. * arc/arc.c: Likewise. * arm/arm.c: Likewise. * avr/avr.c: Likewise. * bfin/bfin.c: Likewise. * c6x/c6x.c: Likewise. * cr16/cr16.c: Likewise. * cris/cris.c: Likewise. * epiphany/epiphany.c: Likewise. * fr30/fr30.c: Likewise. * frv/frv.c: Likewise. * h8300/h8300.c: Likewise. * i386/i386.c: Likewise. * i386/winnt.c: Likewise. * ia64/ia64.c: Likewise. * iq2000/iq2000.c: Likewise. * lm32/lm32.c: Likewise. * m32c/m32c.c: Likewise. * m32r/m32r.c: Likewise. * m68k/m68k.c: Likewise. * mcore/mcore.c: Likewise. * mep/mep.c: Likewise. * microblaze/microblaze.c: Likewise. * mips/mips.c: Likewise. * mmix/mmix.c: Likewise. * mn10300/mn10300.c: Likewise. * moxie/moxie.c: Likewise. * msp430/msp430.c: Likewise. * nds32/nds32.c: Likewise. * pa/pa.c: Likewise. * pdp11/pdp11.c: Likewise. * picochip/picochip.c: Likewise. * rl78/rl78.c: Likewise. * rs6000/rs6000.c: Likewise. * rx/rx.c: Likewise. * s390/s390.c: Likewise. * score/score.c: Likewise. * sh/sh.c: Likewise. * sparc/sparc.c: Likewise. * spu/spu.c: Likewise. * stormy16/stormy16.c: Likewise. * tilegx/tilegx.c: Likewise. * tilepro/tilepro.c: Likewise. * v850/v850.c: Likewise. * vax/vax.c: Likewise. * xtensa/xtensa.c: Likewise. From-SVN: r211145
2014-06-02 22:13:44 +02:00
/* By default we assume that c99 functions are present at the runtime,
but sincos is not. */
bool
default_libc_has_function (enum function_class fn_class)
{
if (fn_class == function_c94
|| fn_class == function_c99_misc
|| fn_class == function_c99_math_complex)
return true;
return false;
}
bool
gnu_libc_has_function (enum function_class fn_class ATTRIBUTE_UNUSED)
{
return true;
}
bool
no_c99_libc_has_function (enum function_class fn_class ATTRIBUTE_UNUSED)
{
return false;
}
tree
default_builtin_tm_load_store (tree ARG_UNUSED (type))
{
return NULL_TREE;
}
/* Compute cost of moving registers to/from memory. */
int
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_memory_move_cost (machine_mode mode ATTRIBUTE_UNUSED,
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
reg_class_t rclass ATTRIBUTE_UNUSED,
bool in ATTRIBUTE_UNUSED)
{
#ifndef MEMORY_MOVE_COST
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
return (4 + memory_move_secondary_cost (mode, (enum reg_class) rclass, in));
#else
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
return MEMORY_MOVE_COST (mode, (enum reg_class) rclass, in);
#endif
}
2010-06-27 13:40:42 +02:00
/* Compute cost of moving data from a register of class FROM to one of
TO, using MODE. */
int
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_register_move_cost (machine_mode mode ATTRIBUTE_UNUSED,
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
reg_class_t from ATTRIBUTE_UNUSED,
reg_class_t to ATTRIBUTE_UNUSED)
2010-06-27 13:40:42 +02:00
{
#ifndef REGISTER_MOVE_COST
return 2;
#else
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
return REGISTER_MOVE_COST (mode, (enum reg_class) from, (enum reg_class) to);
2010-06-27 13:40:42 +02:00
#endif
}
/* For hooks which use the MOVE_RATIO macro, this gives the legacy default
cgraph.c: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. * cgraph.c: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. * target.def: Likewise. * sel-sched.c: Likewise. * config/mips/mips.c: Likewise. * config/arc/arc.md: Likewise. * config/arm/cortex-a57.md: Likewise. * config/arm/arm.c: Likewise. * config/arm/neon.md: Likewise. * config/arm/arm-c.c: Likewise. * config/vms/vms-c.c: Likewise. * config/s390/s390.c: Likewise. * config/i386/znver1.md: Likewise. * config/i386/i386.c: Likewise. * config/ia64/hpux-unix2003.h: Likewise. * config/msp430/msp430.md: Likewise. * config/rx/rx.c: Likewise. * config/rx/rx.md: Likewise. * config/aarch64/aarch64-simd.md: Likewise. * config/aarch64/aarch64.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/bfin/bfin.c: Likewise. * config/cris/cris.opt: Likewise. * config/rs6000/rs6000.c: Likewise. * target.h: Likewise. * spellcheck.c: Likewise. * ira-build.c: Likewise. * tree-inline.c: Likewise. * builtins.c: Likewise. * lra-constraints.c: Likewise. * explow.c: Likewise. * hwint.h: Likewise. * targhooks.c: Likewise. * tree-vect-data-refs.c: Likewise. * expr.c: Likewise. * doc/tm.texi: Likewise. * doc/extend.texi: Likewise. * doc/install.texi: Likewise. * doc/md.texi: Likewise. * tree-ssa-tail-merge.c: Likewise. * sched-int.h: Likewise. * match.pd: Likewise. * sched-ebb.c: Likewise. * target.def (omit_struct_return_reg): Likewise. * gimple-ssa-isolate-paths.c: Likewise. (find_implicit_erroneous_behaviour): Renamed to... (find_implicit_erroneous_behavior): ... this. (find_explicit_erroneous_behaviour): Renamed to... (find_explicit_erroneous_behavior): ... this. (gimple_ssa_isolate_erroneous_paths): Adjust caller. gcc/cp/ * error.c: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. * decl.c: Likewise. * typeck.c (cp_build_binary_op): Fix up behavior spelling in diagnostics. * init.c (build_delete): Likewise. gcc/objc/ * objc-act.c: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. * objc-map.h: Likewise. gcc/go/ * gofrontend/lex.cc: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. * gccgo.texi: Likewise. gcc/ada/ * prj-tree.ads: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. * prep.adb: Likewise. * prj.ads: Likewise. * prepcomp.adb: Likewise. * g-socket.ads: Likewise. * s-imgrea.adb: Likewise. * a-calend.adb: Likewise. * exp_disp.adb: Likewise. * doc/gnat_ugn/gnat_utility_programs.rst: Likewise. * g-socket.adb: Likewise. * sem_ch12.adb: Likewise. * terminals.c: Likewise. gcc/testsuite/ * objc.dg/gnu-api-2-method.m: Spelling fixes - behaviour -> behavior and neighbour -> neighbor. * objc.dg/attributes/method-nonnull-1.m: Likewise. * objc.dg/gnu-api-2-class-meta.m: Likewise. * c-c++-common/Wvarargs.c: Likewise. * c-c++-common/goacc/host_data-5.c: Likewise. * obj-c++.dg/gnu-api-2-class-meta.mm: Likewise. * obj-c++.dg/attributes/method-nonnull-1.mm: Likewise. * obj-c++.dg/gnu-api-2-method.mm: Likewise. * gcc.target/aarch64/pr60697.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vldX_lane.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vqshl.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vshuffle.inc: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrshl.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vldX_dup.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vstX_lane.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vqrshl.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vldX.c: Likewise. * gcc.target/aarch64/aapcs64/ice_2.c: Likewise. * gcc.target/aarch64/aapcs64/test_23.c: Likewise. * gcc.target/aarch64/vrnd_f64_1.c: Likewise. * g++.dg/warn/Wconversion-real-integer-3.C: Likewise. * g++.dg/lookup/koenig5.C: Likewise. * g++.dg/ext/no-asm-2.C: Likewise. * gfortran.dg/bounds_check_array_ctor_3.f90: Likewise. * gfortran.dg/bounds_check_array_ctor_7.f90: Likewise. * gfortran.dg/used_types_16.f90: Likewise. * gfortran.dg/assumed_rank_bounds_1.f90: Likewise. * gfortran.dg/bounds_check_array_ctor_1.f90: Likewise. * gfortran.dg/assumed_rank_bounds_2.f90: Likewise. * gfortran.dg/bounds_check_array_ctor_4.f90: Likewise. * gfortran.dg/abstract_type_6.f03: Likewise. * gfortran.dg/bounds_check_array_ctor_5.f90: Likewise. * gfortran.dg/used_types_15.f90: Likewise. * gfortran.dg/bounds_check_array_ctor_8.f90: Likewise. * gfortran.dg/exit_3.f08: Likewise. * gfortran.dg/open_status_2.f90: Likewise. * gfortran.dg/derived_pointer_recursion_2.f90: Likewise. * gfortran.dg/intrinsic_std_1.f90: Likewise. * gfortran.dg/associate_1.f03: Likewise. * gfortran.dg/bounds_check_array_ctor_2.f90: Likewise. * gfortran.dg/intrinsic_std_6.f90: Likewise. * gfortran.dg/bounds_check_array_ctor_6.f90: Likewise. * gcc.dg/builtin-object-size-1.c: Likewise. * gcc.dg/noreturn-6.c: Likewise. * gcc.dg/builtin-stringop-chk-1.c: Likewise. * gcc.dg/globalalias.c: Likewise. * gcc.dg/builtins-config.h: Likewise. * gcc.dg/pr30457.c: Likewise. * gcc.c-torture/compile/volatile-1.c: Likewise. * gcc.c-torture/execute/20101011-1.c: Likewise. * c-c++-common/Waddress-1.c: Likewise. From-SVN: r233358
2016-02-12 00:53:54 +01:00
behavior. SPEED_P is true if we are compiling for speed. */
unsigned int
get_move_ratio (bool speed_p ATTRIBUTE_UNUSED)
{
unsigned int move_ratio;
#ifdef MOVE_RATIO
move_ratio = (unsigned int) MOVE_RATIO (speed_p);
#else
#if defined (HAVE_movmemqi) || defined (HAVE_movmemhi) || defined (HAVE_movmemsi) || defined (HAVE_movmemdi) || defined (HAVE_movmemti)
move_ratio = 2;
#else /* No movmem patterns, pick a default. */
move_ratio = ((speed_p) ? 15 : 3);
#endif
#endif
return move_ratio;
}
/* Return TRUE if the move_by_pieces/set_by_pieces infrastructure should be
used; return FALSE if the movmem/setmem optab should be expanded, or
a call to memcpy emitted. */
bool
default_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size,
unsigned int alignment,
enum by_pieces_operation op,
bool speed_p)
{
unsigned int max_size = 0;
unsigned int ratio = 0;
switch (op)
{
case CLEAR_BY_PIECES:
max_size = STORE_MAX_PIECES;
ratio = CLEAR_RATIO (speed_p);
break;
case MOVE_BY_PIECES:
max_size = MOVE_MAX_PIECES;
ratio = get_move_ratio (speed_p);
break;
case SET_BY_PIECES:
max_size = STORE_MAX_PIECES;
ratio = SET_RATIO (speed_p);
break;
case STORE_BY_PIECES:
max_size = STORE_MAX_PIECES;
ratio = get_move_ratio (speed_p);
break;
}
return move_by_pieces_ninsns (size, alignment, max_size + 1) < ratio;
}
bool
default_profile_before_prologue (void)
{
#ifdef PROFILE_BEFORE_PROLOGUE
return true;
#else
return false;
#endif
}
/* The default implementation of TARGET_PREFERRED_RELOAD_CLASS. */
reg_class_t
default_preferred_reload_class (rtx x ATTRIBUTE_UNUSED,
reg_class_t rclass)
{
#ifdef PREFERRED_RELOAD_CLASS
return (reg_class_t) PREFERRED_RELOAD_CLASS (x, (enum reg_class) rclass);
#else
return rclass;
#endif
}
/* The default implementation of TARGET_OUTPUT_PREFERRED_RELOAD_CLASS. */
reg_class_t
default_preferred_output_reload_class (rtx x ATTRIBUTE_UNUSED,
reg_class_t rclass)
{
return rclass;
}
/* The default implementation of TARGET_PREFERRED_RENAME_CLASS. */
reg_class_t
default_preferred_rename_class (reg_class_t rclass ATTRIBUTE_UNUSED)
{
return NO_REGS;
}
/* The default implementation of TARGET_CLASS_LIKELY_SPILLED_P. */
bool
default_class_likely_spilled_p (reg_class_t rclass)
{
return (reg_class_size[(int) rclass] == 1);
}
target.def (class_max_nregs): New hook. * target.def (class_max_nregs): New hook. * doc/tm.texi.in (TARGET_CLASS_MAX_NREGS): Document. * doc/tm.texi: Regenerate. * targhooks.c (default_class_max_nregs): New function. * targhooks.h (default_class_max_nregs): Declare. * ira.h (target_ira): Change type x_ira_reg_class_max_nregs and x_ira_reg_class_min_nregs arrays to unsigned char. * ira.c (setup_reg_class_nregs): Use TARGET_CLASS_MAX_NREGS target hook instead of CLASS_MAX_NREGS macro. * reginfo.c (restore_register_info): Ditto. * ira-conflicts.c (process_regs_for_copy): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. Change type rclass and aclass vars to reg_class_t. * ira-costs.c (record_reg_classes): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. Change type rclass var to reg_class_t. * reload.c (combine_reloads, find_reloads, find_reloads_address_1): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. * config/i386/i386.h (CLASS_MAX_NREGS): Remove. * config/i386/i386.c (ix86_class_max_nregs): New function. (ix86_register_move_cost): Use TARGET_CLASS_MAX_NREGS target hook instead of CLASS_MAX_NREGS macro. (TARGET_CLASS_MAX_NREGS): Define. * config/avr/avr.h (CLASS_MAX_NREGS): Remove. * config/avr/avr-protos.h (class_max_nregs): Remove declaration. * config/avr/avr.c (class_max_nregs): Remove function. * config/alpha/alpha.h (CLASS_MAX_NREGS): Remove. * config/spu/spu.h (CLASS_MAX_NREGS): Remove. * config/mep/mep.h (CLASS_MAX_NREGS): Remove. * config/m32r/m32r.h (CLASS_MAX_NREGS): Remove. * config/microblaze/microblaze.h (CLASS_MAX_NREGS): Remove. * config/xtensa/xtensa.h (CLASS_MAX_NREGS): Remove. * config/stormy16/stormy16.h (CLASS_MAX_NREGS): Remove. * config/lm32/lm32.h (CLASS_MAX_NREGS): Remove. * config/moxie/moxie.h (CLASS_MAX_NREGS): Remove. * config/iq2000/iq2000.h (CLASS_MAX_NREGS): Remove. * config/mn10300/mn10300.h (CLASS_MAX_NREGS): Remove. * config/score/score.h (CLASS_MAX_NREGS): Remove. * config/vax/vax.h (CLASS_MAX_NREGS): Remove. * config/h8300/h8300.h (CLASS_MAX_NREGS): Remove. * config/v850/v850.h (CLASS_MAX_NREGS): Remove. From-SVN: r176490
2011-07-20 00:34:31 +02:00
/* The default implementation of TARGET_CLASS_MAX_NREGS. */
unsigned char
default_class_max_nregs (reg_class_t rclass ATTRIBUTE_UNUSED,
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode mode ATTRIBUTE_UNUSED)
target.def (class_max_nregs): New hook. * target.def (class_max_nregs): New hook. * doc/tm.texi.in (TARGET_CLASS_MAX_NREGS): Document. * doc/tm.texi: Regenerate. * targhooks.c (default_class_max_nregs): New function. * targhooks.h (default_class_max_nregs): Declare. * ira.h (target_ira): Change type x_ira_reg_class_max_nregs and x_ira_reg_class_min_nregs arrays to unsigned char. * ira.c (setup_reg_class_nregs): Use TARGET_CLASS_MAX_NREGS target hook instead of CLASS_MAX_NREGS macro. * reginfo.c (restore_register_info): Ditto. * ira-conflicts.c (process_regs_for_copy): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. Change type rclass and aclass vars to reg_class_t. * ira-costs.c (record_reg_classes): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. Change type rclass var to reg_class_t. * reload.c (combine_reloads, find_reloads, find_reloads_address_1): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. * config/i386/i386.h (CLASS_MAX_NREGS): Remove. * config/i386/i386.c (ix86_class_max_nregs): New function. (ix86_register_move_cost): Use TARGET_CLASS_MAX_NREGS target hook instead of CLASS_MAX_NREGS macro. (TARGET_CLASS_MAX_NREGS): Define. * config/avr/avr.h (CLASS_MAX_NREGS): Remove. * config/avr/avr-protos.h (class_max_nregs): Remove declaration. * config/avr/avr.c (class_max_nregs): Remove function. * config/alpha/alpha.h (CLASS_MAX_NREGS): Remove. * config/spu/spu.h (CLASS_MAX_NREGS): Remove. * config/mep/mep.h (CLASS_MAX_NREGS): Remove. * config/m32r/m32r.h (CLASS_MAX_NREGS): Remove. * config/microblaze/microblaze.h (CLASS_MAX_NREGS): Remove. * config/xtensa/xtensa.h (CLASS_MAX_NREGS): Remove. * config/stormy16/stormy16.h (CLASS_MAX_NREGS): Remove. * config/lm32/lm32.h (CLASS_MAX_NREGS): Remove. * config/moxie/moxie.h (CLASS_MAX_NREGS): Remove. * config/iq2000/iq2000.h (CLASS_MAX_NREGS): Remove. * config/mn10300/mn10300.h (CLASS_MAX_NREGS): Remove. * config/score/score.h (CLASS_MAX_NREGS): Remove. * config/vax/vax.h (CLASS_MAX_NREGS): Remove. * config/h8300/h8300.h (CLASS_MAX_NREGS): Remove. * config/v850/v850.h (CLASS_MAX_NREGS): Remove. From-SVN: r176490
2011-07-20 00:34:31 +02:00
{
#ifdef CLASS_MAX_NREGS
return (unsigned char) CLASS_MAX_NREGS ((enum reg_class) rclass, mode);
#else
return ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD);
#endif
}
/* Determine the debugging unwind mechanism for the target. */
enum unwind_info_type
default_debug_unwind_info (void)
{
/* If the target wants to force the use of dwarf2 unwind info, let it. */
/* ??? Change all users to the hook, then poison this. */
#ifdef DWARF2_FRAME_INFO
if (DWARF2_FRAME_INFO)
return UI_DWARF2;
#endif
/* Otherwise, only turn it on if dwarf2 debugging is enabled. */
#ifdef DWARF2_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG)
return UI_DWARF2;
#endif
return UI_NONE;
}
/* Determine the correct mode for a Dwarf frame register that represents
register REGNO. */
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
default_dwarf_frame_reg_mode (int regno)
{
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode save_mode = reg_raw_mode[regno];
if (HARD_REGNO_CALL_PART_CLOBBERED (regno, save_mode))
save_mode = choose_hard_reg_mode (regno, 1, true);
return save_mode;
}
/* To be used by targets where reg_raw_mode doesn't return the right
mode for registers used in apply_builtin_return and apply_builtin_arg. */
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
alloc-pool.c, [...]: Add missing whitespace before "(". gcc/ * alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c, cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c, cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c, combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c, dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, errors.c, except.c, expmed.c, expr.c, file-find.c, final.c, fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c, gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c, genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c, genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c, gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c, gimple.h, godump.c, graphite-clast-to-gimple.c, graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c, graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c, hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c, lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c, mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c, pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c, predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c, profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c, reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c, statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h, system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c, tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h, tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c, tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c, tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c, tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c, varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing whitespace before "(". From-SVN: r203004
2013-09-28 10:42:34 +02:00
default_get_reg_raw_mode (int regno)
{
return reg_raw_mode[regno];
}
/* Return true if a leaf function should stay leaf even with profiling
enabled. */
bool
default_keep_leaf_when_profiled ()
{
return false;
}
common.opt (main_input_filename, [...]): New Variable entries. * common.opt (main_input_filename, main_input_basename, main_input_baselength): New Variable entries. From toplev.c. * final.c (output_quoted_string): Move from toplev.c. * output.h (output_quoted_string): Move from toplev.h. * opts-global.c (read_cmdline_options): Use gcc_options pointer to access main_input_filename, main_input_baselength and main_input_basename. * targhooks.c: Include intl.h and opts.h. (option_affects_pch_p, default_get_pch_validity): Move from toplev.c. * targhooks.h (option_affects_pch_p, default_get_pch_validity): Move from toplev.h. * toplev.c (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (output_quoted_string): Move to final.c. (warn_deprecated_use): Move to tree.c. (option_affects_pch_p, default_get_pch_validity, pch_option_mismatch, default_pch_valid_p): Move to targhooks.c. * toplev.h (skip_leading_substring): Move to tree-dump.c. (warn_deprecated_use): Move to tree.h. (output_quoted_string): Move to output.h. (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (default_get_pch_validity, default_pch_valid_p): Move to targhooks.c. * tree-dump.c (skip_leading_substring): Move from toplev.h. * tree.c (warn_deprecated_use): Move from toplev.c. * tree.h (warn_deprecated_use): Move from toplev.h. * c-typeck.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/cris/cris.c, config/crx/crx.c, config/fr30/fr30.c, config/frv/frv.c, config/h8300/h8300.c, config/ia64/ia64.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mep/mep.c, config/microblaze/microblaze.c, config/mips/mips.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/pa/pa.c, config/pdp11/pdp11.c, config/picochip/picochip.c, config/s390/s390.c, config/score/score.c, config/sh/sh.c, config/sparc/sparc.c, config/spu/spu.c, config/stormy16/stormy16.c, config/v850/v850.c, config/vax/vax.c, config/xtensa/xtensa.c, gimple-low.c, graphite-sese-to-poly.c, plugin.c, tree-cfg.c, tree-inline.c, varasm.c, xcoffout.c: Don't include toplev.h. * Makefile.in (c-typeck.o, tree-inline.o, tree-cfg.o, gimple-low.o, graphite-sese-to-poly.o, targhooks.o, plugin.o, varasm.o, xcoffout.o): Update dependencies. * config/arm/t-arm (arm.o): Update dependencies. * config/spu/t-spu-elf (spu.o): Update dependencies. cp: * cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h. * Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o): Update dependencies. java: * jcf-parse.c: Don't include toplev.h. * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h. From-SVN: r167329
2010-12-01 14:46:36 +01:00
/* Return true if the state of option OPTION should be stored in PCH files
and checked by default_pch_valid_p. Store the option's current state
in STATE if so. */
static inline bool
option_affects_pch_p (int option, struct cl_option_state *state)
{
if ((cl_options[option].flags & CL_TARGET) == 0)
return false;
if ((cl_options[option].flags & CL_PCH_IGNORE) != 0)
return false;
common.opt (main_input_filename, [...]): New Variable entries. * common.opt (main_input_filename, main_input_basename, main_input_baselength): New Variable entries. From toplev.c. * final.c (output_quoted_string): Move from toplev.c. * output.h (output_quoted_string): Move from toplev.h. * opts-global.c (read_cmdline_options): Use gcc_options pointer to access main_input_filename, main_input_baselength and main_input_basename. * targhooks.c: Include intl.h and opts.h. (option_affects_pch_p, default_get_pch_validity): Move from toplev.c. * targhooks.h (option_affects_pch_p, default_get_pch_validity): Move from toplev.h. * toplev.c (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (output_quoted_string): Move to final.c. (warn_deprecated_use): Move to tree.c. (option_affects_pch_p, default_get_pch_validity, pch_option_mismatch, default_pch_valid_p): Move to targhooks.c. * toplev.h (skip_leading_substring): Move to tree-dump.c. (warn_deprecated_use): Move to tree.h. (output_quoted_string): Move to output.h. (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (default_get_pch_validity, default_pch_valid_p): Move to targhooks.c. * tree-dump.c (skip_leading_substring): Move from toplev.h. * tree.c (warn_deprecated_use): Move from toplev.c. * tree.h (warn_deprecated_use): Move from toplev.h. * c-typeck.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/cris/cris.c, config/crx/crx.c, config/fr30/fr30.c, config/frv/frv.c, config/h8300/h8300.c, config/ia64/ia64.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mep/mep.c, config/microblaze/microblaze.c, config/mips/mips.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/pa/pa.c, config/pdp11/pdp11.c, config/picochip/picochip.c, config/s390/s390.c, config/score/score.c, config/sh/sh.c, config/sparc/sparc.c, config/spu/spu.c, config/stormy16/stormy16.c, config/v850/v850.c, config/vax/vax.c, config/xtensa/xtensa.c, gimple-low.c, graphite-sese-to-poly.c, plugin.c, tree-cfg.c, tree-inline.c, varasm.c, xcoffout.c: Don't include toplev.h. * Makefile.in (c-typeck.o, tree-inline.o, tree-cfg.o, gimple-low.o, graphite-sese-to-poly.o, targhooks.o, plugin.o, varasm.o, xcoffout.o): Update dependencies. * config/arm/t-arm (arm.o): Update dependencies. * config/spu/t-spu-elf (spu.o): Update dependencies. cp: * cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h. * Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o): Update dependencies. java: * jcf-parse.c: Don't include toplev.h. * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h. From-SVN: r167329
2010-12-01 14:46:36 +01:00
if (option_flag_var (option, &global_options) == &target_flags)
if (targetm.check_pch_target_flags)
return false;
return get_option_state (&global_options, option, state);
}
/* Default version of get_pch_validity.
By default, every flag difference is fatal; that will be mostly right for
most targets, but completely right for very few. */
void *
default_get_pch_validity (size_t *sz)
{
struct cl_option_state state;
size_t i;
char *result, *r;
*sz = 2;
if (targetm.check_pch_target_flags)
*sz += sizeof (target_flags);
for (i = 0; i < cl_options_count; i++)
if (option_affects_pch_p (i, &state))
*sz += state.size;
result = r = XNEWVEC (char, *sz);
r[0] = flag_pic;
r[1] = flag_pie;
r += 2;
if (targetm.check_pch_target_flags)
{
memcpy (r, &target_flags, sizeof (target_flags));
r += sizeof (target_flags);
}
for (i = 0; i < cl_options_count; i++)
if (option_affects_pch_p (i, &state))
{
memcpy (r, state.data, state.size);
r += state.size;
}
return result;
}
/* Return a message which says that a PCH file was created with a different
setting of OPTION. */
static const char *
pch_option_mismatch (const char *option)
{
return xasprintf (_("created and used with differing settings of '%s'"),
option);
common.opt (main_input_filename, [...]): New Variable entries. * common.opt (main_input_filename, main_input_basename, main_input_baselength): New Variable entries. From toplev.c. * final.c (output_quoted_string): Move from toplev.c. * output.h (output_quoted_string): Move from toplev.h. * opts-global.c (read_cmdline_options): Use gcc_options pointer to access main_input_filename, main_input_baselength and main_input_basename. * targhooks.c: Include intl.h and opts.h. (option_affects_pch_p, default_get_pch_validity): Move from toplev.c. * targhooks.h (option_affects_pch_p, default_get_pch_validity): Move from toplev.h. * toplev.c (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (output_quoted_string): Move to final.c. (warn_deprecated_use): Move to tree.c. (option_affects_pch_p, default_get_pch_validity, pch_option_mismatch, default_pch_valid_p): Move to targhooks.c. * toplev.h (skip_leading_substring): Move to tree-dump.c. (warn_deprecated_use): Move to tree.h. (output_quoted_string): Move to output.h. (main_input_filename, main_input_basename, main_input_baselength): Move to common.opt. (default_get_pch_validity, default_pch_valid_p): Move to targhooks.c. * tree-dump.c (skip_leading_substring): Move from toplev.h. * tree.c (warn_deprecated_use): Move from toplev.c. * tree.h (warn_deprecated_use): Move from toplev.h. * c-typeck.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/cris/cris.c, config/crx/crx.c, config/fr30/fr30.c, config/frv/frv.c, config/h8300/h8300.c, config/ia64/ia64.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mep/mep.c, config/microblaze/microblaze.c, config/mips/mips.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/pa/pa.c, config/pdp11/pdp11.c, config/picochip/picochip.c, config/s390/s390.c, config/score/score.c, config/sh/sh.c, config/sparc/sparc.c, config/spu/spu.c, config/stormy16/stormy16.c, config/v850/v850.c, config/vax/vax.c, config/xtensa/xtensa.c, gimple-low.c, graphite-sese-to-poly.c, plugin.c, tree-cfg.c, tree-inline.c, varasm.c, xcoffout.c: Don't include toplev.h. * Makefile.in (c-typeck.o, tree-inline.o, tree-cfg.o, gimple-low.o, graphite-sese-to-poly.o, targhooks.o, plugin.o, varasm.o, xcoffout.o): Update dependencies. * config/arm/t-arm (arm.o): Update dependencies. * config/spu/t-spu-elf (spu.o): Update dependencies. cp: * cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h. * Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o): Update dependencies. java: * jcf-parse.c: Don't include toplev.h. * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h. From-SVN: r167329
2010-12-01 14:46:36 +01:00
}
/* Default version of pch_valid_p. */
const char *
default_pch_valid_p (const void *data_p, size_t len)
{
struct cl_option_state state;
const char *data = (const char *)data_p;
size_t i;
/* -fpic and -fpie also usually make a PCH invalid. */
if (data[0] != flag_pic)
return _("created and used with different settings of -fpic");
if (data[1] != flag_pie)
return _("created and used with different settings of -fpie");
data += 2;
/* Check target_flags. */
if (targetm.check_pch_target_flags)
{
int tf;
const char *r;
memcpy (&tf, data, sizeof (target_flags));
data += sizeof (target_flags);
len -= sizeof (target_flags);
r = targetm.check_pch_target_flags (tf);
if (r != NULL)
return r;
}
for (i = 0; i < cl_options_count; i++)
if (option_affects_pch_p (i, &state))
{
if (memcmp (data, state.data, state.size) != 0)
return pch_option_mismatch (cl_options[i].opt_text);
data += state.size;
len -= state.size;
}
return NULL;
}
Improve cstore code generation on 64-bit sparc. One major suboptimal area of the sparc back end is cstore generation on 64-bit. Due to the way arguments and return values of functions must be promoted, the ideal mode for cstore's result would be DImode. But this hasn't been done because of a fundamental limitation of the cstore patterns. They require a fixed mode be used for the boolean result value. I've decided to work around this by building a target hook which specifies the type to use for conditional store results, and then I use a special predicate for operans 0 in the cstore expanders so that they still match even when we use DImode. The default version of the target hook just does what it does now, so no other target should be impacted by this at all. Regstrapped on 32-bit sparc-linux-gnu and I've run the testsuite with "-m64" to validate the 64-bit side. gcc/ * target.def (cstore_mode): New hook. * target.h: Include insn-codes.h * targhooks.c: Likewise. (default_cstore_mode): New function. * targhooks.h: Declare it. * doc/tm.texi.in: New hook slot for TARGET_CSTORE_MODE. * doc/tm.texi: Rebuild. * expmed.c (emit_cstore): Obtain cstore boolean result mode using target hook, rather than inspecting the insn_data. * config/sparc/sparc.c (sparc_cstore_mode): New function. (TARGET_CSTORE_MODE): Redefine. (emit_scc_insn): When TARGET_ARCH64, emit new 64-bit boolean result patterns. * config/sparc/predicates.md (cstore_result_operand): New special predicate. * config/sparc/sparc.md (cstoresi4, cstoredi4, cstore<F:mode>4): Use it for operand 0. (*seqsi_special): Rewrite using 'P' mode iterator on operand 0. (*snesi_special): Likewise. (*snesi_zero): Likewise. (*seqsi_zero): Likewise. (*sltu_insn): Likewise. (*sgeu_insn): Likewise. (*seqdi_special): Make operand 0 and comparison operation be of DImode. (*snedi_special): Likewise. (*snedi_special_vis3): Likewise. (*neg_snesi_zero): Rename to *neg_snesisi_zero. (*neg_snesi_sign_extend): Rename to *neg_snesidi_zero. (*snesi_zero_extend): Delete, covered by 'P' mode iterator. (*neg_seqsi_zero): Rename to *neg_seqsisi_zero. (*neg_seqsi_sign_extend): Rename to *neg_seqsidi_zero. (*seqsi_zero_extend): Delete, covered by 'P' mode iterator. (*sltu_extend_sp64): Likewise. (*neg_sltu_insn): Rename to *neg_sltusi_insn. (*neg_sltu_extend_sp64): Rename to *neg_sltudi_insn. (*sgeu_extend_sp64): Delete, covered by 'P' mode iterator. (*neg_sgeu_insn): Rename to *neg_sgeusi_insn. (*neg_sgeu_extend_sp64): Rename to *neg_sgeudi_insn. gcc/testsuite/ * gcc.target/sparc/setcc-4.c: New test. * gcc.target/sparc/setcc-5.c: New test. From-SVN: r197679
2013-04-10 21:41:57 +02:00
/* Default version of cstore_mode. */
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
machine_mode
Improve cstore code generation on 64-bit sparc. One major suboptimal area of the sparc back end is cstore generation on 64-bit. Due to the way arguments and return values of functions must be promoted, the ideal mode for cstore's result would be DImode. But this hasn't been done because of a fundamental limitation of the cstore patterns. They require a fixed mode be used for the boolean result value. I've decided to work around this by building a target hook which specifies the type to use for conditional store results, and then I use a special predicate for operans 0 in the cstore expanders so that they still match even when we use DImode. The default version of the target hook just does what it does now, so no other target should be impacted by this at all. Regstrapped on 32-bit sparc-linux-gnu and I've run the testsuite with "-m64" to validate the 64-bit side. gcc/ * target.def (cstore_mode): New hook. * target.h: Include insn-codes.h * targhooks.c: Likewise. (default_cstore_mode): New function. * targhooks.h: Declare it. * doc/tm.texi.in: New hook slot for TARGET_CSTORE_MODE. * doc/tm.texi: Rebuild. * expmed.c (emit_cstore): Obtain cstore boolean result mode using target hook, rather than inspecting the insn_data. * config/sparc/sparc.c (sparc_cstore_mode): New function. (TARGET_CSTORE_MODE): Redefine. (emit_scc_insn): When TARGET_ARCH64, emit new 64-bit boolean result patterns. * config/sparc/predicates.md (cstore_result_operand): New special predicate. * config/sparc/sparc.md (cstoresi4, cstoredi4, cstore<F:mode>4): Use it for operand 0. (*seqsi_special): Rewrite using 'P' mode iterator on operand 0. (*snesi_special): Likewise. (*snesi_zero): Likewise. (*seqsi_zero): Likewise. (*sltu_insn): Likewise. (*sgeu_insn): Likewise. (*seqdi_special): Make operand 0 and comparison operation be of DImode. (*snedi_special): Likewise. (*snedi_special_vis3): Likewise. (*neg_snesi_zero): Rename to *neg_snesisi_zero. (*neg_snesi_sign_extend): Rename to *neg_snesidi_zero. (*snesi_zero_extend): Delete, covered by 'P' mode iterator. (*neg_seqsi_zero): Rename to *neg_seqsisi_zero. (*neg_seqsi_sign_extend): Rename to *neg_seqsidi_zero. (*seqsi_zero_extend): Delete, covered by 'P' mode iterator. (*sltu_extend_sp64): Likewise. (*neg_sltu_insn): Rename to *neg_sltusi_insn. (*neg_sltu_extend_sp64): Rename to *neg_sltudi_insn. (*sgeu_extend_sp64): Delete, covered by 'P' mode iterator. (*neg_sgeu_insn): Rename to *neg_sgeusi_insn. (*neg_sgeu_extend_sp64): Rename to *neg_sgeudi_insn. gcc/testsuite/ * gcc.target/sparc/setcc-4.c: New test. * gcc.target/sparc/setcc-5.c: New test. From-SVN: r197679
2013-04-10 21:41:57 +02:00
default_cstore_mode (enum insn_code icode)
{
return insn_data[(int) icode].operand[0].mode;
}
/* Default version of member_type_forces_blk. */
bool
decl.c, [...]: Remove redundant enum from machine_mode. gcc/ada/ * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c: Remove redundant enum from machine_mode. gcc/c-family/ * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant enum from machine_mode. gcc/c/ * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from machine_mode. gcc/cp/ * constexpr.c: Remove redundant enum from machine_mode. gcc/fortran/ * trans-types.c, trans-types.h: Remove redundant enum from machine_mode. gcc/go/ * go-lang.c: Remove redundant enum from machine_mode. gcc/java/ * builtins.c, java-tree.h, typeck.c: Remove redundant enum from machine_mode. gcc/lto/ * lto-lang.c: Remove redundant enum from machine_mode. gcc/ * addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c, builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h, cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md, config/aarch64/aarch64.c, config/aarch64/aarch64.h, config/aarch64/aarch64.md, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/arc/predicates.md, config/arm/aarch-common-protos.h, config/arm/aarch-common.c, config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h, config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md, config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c, config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md, config/cr16/cr16-protos.h, config/cr16/cr16.c, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md, config/darwin-protos.h, config/darwin.c, config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c, config/epiphany/epiphany.md, config/fr30/fr30.c, config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md, config/h8300/h8300-protos.h, config/h8300/h8300.c, config/i386/i386-builtin-types.awk, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md, config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/iq2000/iq2000-protos.h, config/iq2000/iq2000.c, config/iq2000/iq2000.md, config/lm32/lm32-protos.h, config/lm32/lm32.c, config/m32c/m32c-protos.h, config/m32c/m32c.c, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m68k/m68k-protos.h, config/m68k/m68k.c, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c, config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c, config/mips/mips-protos.h, config/mips/mips.c, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430-protos.h, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-protos.h, config/nds32/nds32.c, config/nios2/nios2-protos.h, config/nios2/nios2.c, config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c, config/rs6000/altivec.md, config/rs6000/rs6000-c.c, config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c, config/s390/predicates.md, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c, config/sh/sh.md, config/sparc/predicates.md, config/sparc/sparc-protos.h, config/sparc/sparc.c, config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c, config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h, config/tilepro/tilepro.c, config/v850/v850-protos.h, config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h, config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h, config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h, dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi, doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c, dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h, except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c, fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h, fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c, genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c, graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h, libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c, lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c, lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h, output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h, recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h, rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c, sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c, simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def, targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c, tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Remove redundant enum from machine_mode. gcc/ * gengtype.c (main): Treat machine_mode as a scalar typedef. * genmodes.c (emit_insn_modes_h): Hide inline functions if USED_FOR_TARGET. From-SVN: r216834
2014-10-29 13:02:45 +01:00
default_member_type_forces_blk (const_tree, machine_mode)
{
return false;
}
ipa-chkp.c: New. gcc/ 2014-11-05 Ilya Enkovich <ilya.enkovich@intel.com> * ipa-chkp.c: New. * ipa-chkp.h: New. * tree-chkp.c: New. * tree-chkp.h: New. * tree-chkp-opt.c: New. * rtl-chkp.c: New. * rtl-chkp.h: New. * Makefile.in (OBJS): Add ipa-chkp.o, rtl-chkp.o, tree-chkp.o tree-chkp-opt.o. (GTFILES): Add tree-chkp.c. * mode-classes.def (MODE_POINTER_BOUNDS): New. * tree.def (POINTER_BOUNDS_TYPE): New. * genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS. (POINTER_BOUNDS_MODE): New. (make_pointer_bounds_mode): New. * machmode.h (POINTER_BOUNDS_MODE_P): New. * stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS. (layout_type): Support POINTER_BOUNDS_TYPE. * tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE. * tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE. * tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE. (type_contains_placeholder_1): Likewise. (build_common_tree_nodes): Initialize pointer_bounds_type_node. * tree.h (POINTER_BOUNDS_TYPE_P): New. (pointer_bounds_type_node): New. (POINTER_BOUNDS_P): New. (BOUNDED_TYPE_P): New. (BOUNDED_P): New. (CALL_WITH_BOUNDS_P): New. * gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS. (gimple_call_with_bounds_p): New. (gimple_call_set_with_bounds): New. (gimple_return_retbnd): New. (gimple_return_set_retbnd): New * gimple.c (gimple_build_return): Increase number of ops for return statement. (gimple_build_call_from_tree): Propagate CALL_WITH_BOUNDS_P flag. * gimple-pretty-print.c (dump_gimple_return): Print second op. * rtl.h (CALL_EXPR_WITH_BOUNDS_P): New. * gimplify.c (gimplify_init_constructor): Avoid infinite loop during gimplification of bounds initializer. * calls.c: Include tree-chkp.h, rtl-chkp.h, bitmap.h. (special_function_p): Use original decl name when analyzing instrumentation clone. (arg_data): Add fields special_slot, pointer_arg and pointer_offset. (store_bounds): New. (emit_call_1): Propagate instrumentation flag for CALL. (initialize_argument_information): Compute pointer_arg, pointer_offset and special_slot for pointer bounds arguments. (finalize_must_preallocate): Preallocate when storing bounds in bounds table. (compute_argument_addresses): Skip pointer bounds. (expand_call): Store bounds into tables separately. Return result joined with resulting bounds. * cfgexpand.c: Include tree-chkp.h, rtl-chkp.h. (expand_call_stmt): Propagate bounds flag for CALL_EXPR. (expand_return): Add returned bounds arg. Handle returned bounds. (expand_gimple_stmt_1): Adjust to new expand_return signature. (gimple_expand_cfg): Reset rtx bounds map. * expr.c: Include tree-chkp.h, rtl-chkp.h. (expand_assignment): Handle returned bounds. (store_expr_with_bounds): New. Replaces store_expr with new bounds target argument. Handle bounds returned by calls. (store_expr): Now wraps store_expr_with_bounds. * expr.h (store_expr_with_bounds): New. * function.c: Include tree-chkp.h, rtl-chkp.h. (bounds_parm_data): New. (use_register_for_decl): Do not registerize decls used for bounds stores and loads. (assign_parms_augmented_arg_list): Add bounds of the result structure pointer as the second argument. (assign_parm_find_entry_rtl): Mark bounds are never passed on the stack. (assign_parm_is_stack_parm): Likewise. (assign_parm_load_bounds): New. (assign_bounds): New. (assign_parms): Load bounds and determine a location for returned bounds. (diddle_return_value_1): New. (diddle_return_value): Handle returned bounds. * function.h (rtl_data): Add field for returned bounds. * varasm.c: Include tree-chkp.h. (output_constant): Support POINTER_BOUNDS_TYPE. (output_constant_pool_2): Support MODE_POINTER_BOUNDS. (ultimate_transparent_alias_target): Move up. (make_decl_rtl): For instrumented function use name of the original decl. (assemble_start_function): Mark function as global in case it is instrumentation clone of the global function. (do_assemble_alias): Follow transparent alias chain for identifier. Check if original alias is public. (maybe_assemble_visibility): Use visibility of the original function for instrumented version. (default_unique_section): Likewise. * emit-rtl.c (immed_double_const): Support MODE_POINTER_BOUNDS. (init_emit_once): Build pointer bounds zero constants. * explow.c (trunc_int_for_mode): Support MODE_POINTER_BOUNDS. * target.def (builtin_chkp_function): New. (chkp_bound_type): New. (chkp_bound_mode): New. (chkp_make_bounds_constant): New. (chkp_initialize_bounds): New. (load_bounds_for_arg): New. (store_bounds_for_arg): New. (load_returned_bounds): New. (store_returned_bounds): New. (chkp_function_value_bounds): New. (setup_incoming_vararg_bounds): New. (function_arg): Update hook description with new possible return value CONST_INT. * targhooks.h (default_load_bounds_for_arg): New. (default_store_bounds_for_arg): New. (default_load_returned_bounds): New. (default_store_returned_bounds): New. (default_chkp_bound_type): New. (default_chkp_bound_mode): New. (default_builtin_chkp_function): New. (default_chkp_function_value_bounds): New. (default_chkp_make_bounds_constant): New. (default_chkp_initialize_bounds): New. (default_setup_incoming_vararg_bounds): New. * targhooks.c (default_load_bounds_for_arg): New. (default_store_bounds_for_arg): New. (default_load_returned_bounds): New. (default_store_returned_bounds): New. (default_chkp_bound_type): New. (default_chkp_bound_mode); New. (default_builtin_chkp_function): New. (default_chkp_function_value_bounds): New. (default_chkp_make_bounds_constant): New. (default_chkp_initialize_bounds): New. (default_setup_incoming_vararg_bounds): New. * builtin-types.def (BT_BND): New. (BT_FN_PTR_CONST_PTR): New. (BT_FN_CONST_PTR_CONST_PTR): New. (BT_FN_BND_CONST_PTR): New. (BT_FN_CONST_PTR_BND): New. (BT_FN_PTR_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR): New. (BT_FN_VOID_PTRPTR_CONST_PTR): New. (BT_FN_VOID_CONST_PTR_SIZE): New. (BT_FN_VOID_PTR_BND): New. (BT_FN_CONST_PTR_CONST_PTR_CONST_PTR): New. (BT_FN_BND_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New. (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): New. * chkp-builtins.def: New. * builtins.def: include chkp-builtins.def. (DEF_CHKP_BUILTIN): New. * builtins.c: Include tree-chkp.h and rtl-chkp.h. (expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS, BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS, BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS, BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS, BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS, BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND, BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL, BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET, BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_NARROW, BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER. (std_expand_builtin_va_start): Init bounds for va_list. * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add __CHKP__ macro when Pointer Bounds Checker is on. * params.def (PARAM_CHKP_MAX_CTOR_SIZE): New. * passes.def (pass_ipa_chkp_versioning): New. (pass_early_local_passes): Renamed to pass_build_ssa_passes. (pass_fixup_cfg): Moved to pass_chkp_instrumentation_passes. (pass_chkp_instrumentation_passes): New. (pass_ipa_chkp_produce_thunks): New. (pass_local_optimization_passes): New. (pass_chkp_opt): New. * tree-pass.h (make_pass_ipa_chkp_versioning): New. (make_pass_ipa_chkp_produce_thunks): New. (make_pass_chkp): New. (make_pass_chkp_opt): New. (make_pass_early_local_passes): Renamed to ... (make_pass_build_ssa_passes): This. (make_pass_chkp_instrumentation_passes): New. (make_pass_local_optimization_passes): New. * passes.c (pass_manager::execute_early_local_passes): Execute early passes in three steps. (execute_all_early_local_passes): Renamed to ... (execute_build_ssa_passes): This. (pass_data_early_local_passes): Renamed to ... (pass_data_build_ssa_passes): This. (pass_early_local_passes): Renamed to ... (pass_build_ssa_passes): This. (pass_data_chkp_instrumentation_passes): New. (pass_chkp_instrumentation_passes): New. (pass_data_local_optimization_passes): New. (pass_local_optimization_passes): New. (make_pass_early_local_passes): Renamed to ... (make_pass_build_ssa_passes): This. (make_pass_chkp_instrumentation_passes): New. (make_pass_local_optimization_passes): New. * c-family/c.opt (fcheck-pointer-bounds): New. (fchkp-check-incomplete-type): New. (fchkp-zero-input-bounds-for-main): New. (fchkp-first-field-has-own-bounds): New. (fchkp-narrow-bounds): New. (fchkp-narrow-to-innermost-array): New. (fchkp-optimize): New. (fchkp-use-fast-string-functions): New. (fchkp-use-nochk-string-functions): New. (fchkp-use-static-bounds): New. (fchkp-use-static-const-bounds): New. (fchkp-treat-zero-dynamic-size-as-infinite): New. (fchkp-check-read): New. (fchkp-check-write): New. (fchkp-store-bounds): New. (fchkp-instrument-calls): New. (fchkp-instrument-marked-only): New. (Wchkp): New. * c-family/c-common.c (handle_bnd_variable_size_attribute): New. (handle_bnd_legacy): New. (handle_bnd_instrument): New. (c_common_attribute_table): Add bnd_variable_size, bnd_legacy and bnd_instrument. Fix documentation. (c_common_format_attribute_table): Likewsie. * toplev.c: include tree-chkp.h. (process_options): Check Pointer Bounds Checker is supported. (compile_file): Add chkp_finish_file call. * ipa-cp.c (initialize_node_lattices): Use cgraph_local_p to handle instrumentation clones properly. (propagate_constants_accross_call): Do not propagate through instrumentation thunks. * ipa-pure-const.c (propagate_pure_const): Support IPA_REF_CHKP. * ipa-inline.c (early_inliner): Check edge has summary allocated. * ipa-split.c: Include tree-chkp.h. (find_retbnd): New. (split_part_set_ssa_name_p): New. (consider_split): Do not split retbnd and retval producers. (insert_bndret_call_after): new. (split_function): Propagate Pointer Bounds Checker instrumentation marks and handle returned bounds. * tree-ssa-sccvn.h (vn_reference_op_struct): Transform opcode into bit field and add with_bounds field. * tree-ssa-sccvn.c (copy_reference_ops_from_call): Set with_bounds field for instrumented calls. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Restore CALL_WITH_BOUNDS_P flag for calls. * tree-ssa-ccp.c: Include tree-chkp.h. (insert_clobber_before_stack_restore): Handle BUILT_IN_CHKP_BNDRET calls. * tree-ssa-dce.c: Include tree-chkp.h. (propagate_necessity): For free call fed by alloc check bounds are also provided by the same alloc. (eliminate_unnecessary_stmts): Handle BUILT_IN_CHKP_BNDRET used by free calls. * tree-inline.c: Include tree-chkp.h. (declare_return_variable): Add arg holding returned bounds slot. Create and initialize returned bounds var. (remap_gimple_stmt): Handle returned bounds. Return sequence of statements instead of a single statement. (insert_init_stmt): Add declaration. (remap_gimple_seq): Adjust to new remap_gimple_stmt signature. (copy_bb): Adjust to changed return type of remap_gimple_stmt. Properly handle bounds in va_arg_pack and va_arg_pack_len. (expand_call_inline): Handle returned bounds. Add bounds copy for generated mem to mem assignments. * tree-inline.h (copy_body_data): Add fields retbnd and assign_stmts. * value-prof.c: Include tree-chkp.h. (gimple_ic): Support returned bounds. * ipa.c (cgraph_build_static_cdtor_1): Support contructors with "chkp ctor" and "bnd_legacy" attributes. (symtab_remove_unreachable_nodes): Keep initial values for pointer bounds to be used for checks eliminations. (process_references): Handle IPA_REF_CHKP. (walk_polymorphic_call_targets): Likewise. * ipa-visibility.c (cgraph_externally_visible_p): Mark instrumented 'main' as externally visible. (function_and_variable_visibility): Filter instrumentation thunks. * cgraph.h (cgraph_thunk_info): Add add_pointer_bounds_args field. (cgraph_node): Add instrumented_version, orig_decl and instrumentation_clone fields. (symtab_node::get_alias_target): Allow IPA_REF_CHKP reference. (varpool_node): Add need_bounds_init field. (cgraph_local_p): New. * cgraph.c: Include tree-chkp.h. (cgraph_node::remove): Fix instrumented_version of the referenced node if any. (cgraph_node::dump): Dump instrumentation_clone and instrumented_version fields. (cgraph_node::verify_node): Check correctness of IPA_REF_CHKP references and instrumentation thunks. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Keep all not instrumented instrumentation clones alive. (cgraph_redirect_edge_call_stmt_to_callee): Support returned bounds. * cgraphbuild.c (rebuild_cgraph_edges): Rebuild IPA_REF_CHKP reference. (cgraph_rebuild_references): Likewise. * cgraphunit.c: Include tree-chkp.h. (assemble_thunks_and_aliases): Skip thunks calling instrumneted function version. (varpool_finalize_decl): Register statically initialized decls in Pointer Bounds Checker. (walk_polymorphic_call_targets): Do not mark generated call to __builtin_unreachable as with_bounds. (output_weakrefs): If there are both instrumented and original versions, output only one of them. (cgraph_node::expand_thunk): Set with_bounds flag for created call statement. * ipa-ref.h (ipa_ref_use): Add IPA_REF_CHKP. (ipa_ref): increase size of use field. * symtab.c (ipa_ref_use_name): Add element for IPA_REF_CHKP. * varpool.c (dump_varpool_node): Dump need_bounds_init field. (ctor_for_folding): Do not fold constant bounds vars. * lto-streamer.h (LTO_minor_version): Change minor version from 0 to 1. * lto-cgraph.c (compute_ltrans_boundary): Keep initial values for pointer bounds. (lto_output_node): Output instrumentation_clone, thunk.add_pointer_bounds_args and orig_decl field. (lto_output_ref): Adjust to new ipa_ref::use field size. (input_overwrite_node): Read instrumentation_clone field. (input_node): Read thunk.add_pointer_bounds_args and orig_decl fields. (input_ref): Adjust to new ipa_ref::use field size. (input_cgraph_1): Compute instrumented_version fields and restore IDENTIFIER_TRANSPARENT_ALIAS chains. (lto_output_varpool_node): Output need_bounds_init value. (input_varpool_node): Read need_bounds_init value. * lto-partition.c (add_symbol_to_partition_1): Keep original and instrumented versions together. (privatize_symbol_name): Restore transparent alias chain if required. (add_references_to_partition): Add references to pointer bounds vars. * dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE. * dwarf2out.c (gen_subprogram_die): Ignore bound args. (gen_type_die_with_usage): Skip pointer bounds. (dwarf2out_global_decl): Likewise. (is_base_type): Support POINTER_BOUNDS_TYPE. (gen_formal_types_die): Skip pointer bounds. (gen_decl_die): Likewise. * var-tracking.c (vt_add_function_parameters): Skip bounds parameters. * ipa-icf.c (sem_function::merge): Do not merge when instrumentation thunk still exists. (sem_variable::merge): Reset need_bounds_init flag. * doc/extend.texi: Document Pointer Bounds Checker built-in functions and attributes. * doc/tm.texi.in (TARGET_LOAD_BOUNDS_FOR_ARG): New. (TARGET_STORE_BOUNDS_FOR_ARG): New. (TARGET_LOAD_RETURNED_BOUNDS): New. (TARGET_STORE_RETURNED_BOUNDS): New. (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New. (TARGET_SETUP_INCOMING_VARARG_BOUNDS): New. (TARGET_BUILTIN_CHKP_FUNCTION): New. (TARGET_CHKP_BOUND_TYPE): New. (TARGET_CHKP_BOUND_MODE): New. (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New. (TARGET_CHKP_INITIALIZE_BOUNDS): New. * doc/tm.texi: Regenerated. * doc/rtl.texi (MODE_POINTER_BOUNDS): New. (BND32mode): New. (BND64mode): New. * doc/invoke.texi (-mmpx): New. (-mno-mpx): New. (chkp-max-ctor-size): New. * config/i386/constraints.md (w): New. (Ti): New. (Tb): New. * config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__. * config/i386/i386-modes.def (BND32): New. (BND64): New. * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New. * config/i386/i386.c: Include tree-chkp.h, rtl-chkp.h, tree-iterator.h. (regclass_map): Add bound registers. (dbx_register_map): Likewise. (dbx64_register_map): Likewise. (svr4_dbx_register_map): Likewise. (isa_opts): Add -mmpx. (PTA_MPX): New. (ix86_option_override_internal): Support MPX ISA. (ix86_conditional_register_usage): Support bound registers. (ix86_code_end): Add MPX bnd prefix. (output_set_got): Likewise. (print_reg): Avoid prefixes for bound registers. (ix86_print_operand): Add '!' (MPX bnd) print prefix support. (ix86_print_operand_punct_valid_p): Likewise. (ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and UNSPEC_BNDLDX_ADDR. (ix86_output_call_insn): Add MPX bnd prefix to branch instructions. (ix86_class_likely_spilled_p): Add bound regs support. (ix86_hard_regno_mode_ok): Likewise. (x86_order_regs_for_local_alloc): Likewise. (ix86_bnd_prefixed_insn_p): New. (ix86_builtins): Add IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER. (builtin_isa): Add leaf_p and nothrow_p fields. (def_builtin): Initialize leaf_p and nothrow_p. (ix86_add_new_builtins): Handle leaf_p and nothrow_p flags. (bdesc_mpx): New. (bdesc_mpx_const): New. (ix86_init_mpx_builtins): New. (ix86_init_builtins): Call ix86_init_mpx_builtins. (ix86_emit_cmove): New. (ix86_emit_move_max): New. (ix86_expand_builtin): Expand IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER. (ix86_function_value_bounds): New. (ix86_builtin_mpx_function): New. (ix86_get_arg_address_for_bt): New. (ix86_load_bounds): New. (ix86_store_bounds): New. (ix86_load_returned_bounds): New. (ix86_store_returned_bounds): New. (ix86_mpx_bound_mode): New. (ix86_make_bounds_constant): New. (ix86_initialize_bounds): (TARGET_LOAD_BOUNDS_FOR_ARG): New. (TARGET_STORE_BOUNDS_FOR_ARG): New. (TARGET_LOAD_RETURNED_BOUNDS): New. (TARGET_STORE_RETURNED_BOUNDS): New. (TARGET_CHKP_BOUND_MODE): New. (TARGET_BUILTIN_CHKP_FUNCTION): New. (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New. (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New. (TARGET_CHKP_INITIALIZE_BOUNDS): New. (ix86_option_override_internal): Do not support x32 with MPX. (init_cumulative_args): Init stdarg, bnd_regno, bnds_in_bt and force_bnd_pass. (function_arg_advance_32): Return number of used integer registers. (function_arg_advance_64): Likewise. (function_arg_advance_ms_64): Likewise. (ix86_function_arg_advance): Handle pointer bounds. (ix86_function_arg): Likewise. (ix86_function_value_regno_p): Mark fisrt bounds registers as possible function value. (ix86_function_value_1): Handle pointer bounds type/mode (ix86_return_in_memory): Likewise. (ix86_print_operand): Analyse insn to decide abounf "bnd" prefix. (ix86_expand_call): Generate returned bounds. (ix86_setup_incoming_vararg_bounds): New. (ix86_va_start): Initialize bounds for pointers in va_list. (TARGET_SETUP_INCOMING_VARARG_BOUNDS): New. * config/i386/i386.h (TARGET_MPX): New. (TARGET_MPX_P): New. (FIRST_PSEUDO_REGISTER): Fix to new value. (FIXED_REGISTERS): Add bound registers. (CALL_USED_REGISTERS): Likewise. (REG_ALLOC_ORDER): Likewise. (HARD_REGNO_NREGS): Likewise. (VALID_BND_REG_MODE): New. (FIRST_BND_REG): New. (LAST_BND_REG): New. (reg_class): Add BND_REGS. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Likewise. (BND_REGNO_P): New. (ANY_BND_REG_P): New. (BNDmode): New. (HI_REGISTER_NAMES): Add bound registers. (ix86_args): Add bnd_regno, bnds_in_bt, force_bnd_pass and stdarg fields. * config/i386/i386.md (UNSPEC_BNDMK): New. (UNSPEC_BNDMK_ADDR): New. (UNSPEC_BNDSTX): New. (UNSPEC_BNDLDX): New. (UNSPEC_BNDLDX_ADDR): New. (UNSPEC_BNDCL): New. (UNSPEC_BNDCU): New. (UNSPEC_BNDCN): New. (UNSPEC_MPX_FENCE): New. (UNSPEC_SIZEOF): New. (BND0_REG): New. (BND1_REG): New. (type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst. (length_immediate): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (prefix_rep): Check for bnd prefix. (prefix_0f): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (length_nobnd): New. (length): Use length_nobnd when specified. (memory): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (BND): New. (bnd_ptr): New. (BNDCHECK): New. (bndcheck): New. (*jcc_1): Add MPX bnd prefix. (*jcc_2): Likewise. (jump): Likewise. (*indirect_jump): Likewise. (*tablejump_1): Likewise. (simple_return_internal): Likewise. (simple_return_internal_long): Likewise. (simple_return_pop_internal): Likewise. (simple_return_indirect_internal): Likewise. (<mode>_mk): New. (*<mode>_mk): New. (mov<mode>): New. (*mov<mode>_internal_mpx): New. (<mode>_<bndcheck>): New. (*<mode>_<bndcheck>): New. (<mode>_ldx): New. (*<mode>_ldx): New. (<mode>_stx): New. (*<mode>_stx): New. move_size_reloc_<mode>): New. * config/i386/predicates.md (address_mpx_no_base_operand): New. (address_mpx_no_index_operand): New. (bnd_mem_operator): New. (symbol_operand): New. (x86_64_immediate_size_operand): New. * config/i386/i386.opt (mmpx): New. * config/i386/i386-builtin-types.def (BND): New. (ULONG): New. (BND_FTYPE_PCVOID_ULONG): New. (VOID_FTYPE_BND_PCVOID): New. (VOID_FTYPE_PCVOID_PCVOID_BND): New. (BND_FTYPE_PCVOID_PCVOID): New. (BND_FTYPE_PCVOID): New. (BND_FTYPE_BND_BND): New. (PVOID_FTYPE_PVOID_PVOID_ULONG): New. (PVOID_FTYPE_PCVOID_BND_ULONG): New. (ULONG_FTYPE_VOID): New. (PVOID_FTYPE_BND): New. gcc/testsuite/ 2014-11-05 Ilya Enkovich <ilya.enkovich@intel.com> * gcc.target/i386/chkp-builtins-1.c: New. * gcc.target/i386/chkp-builtins-2.c: New. * gcc.target/i386/chkp-builtins-3.c: New. * gcc.target/i386/chkp-builtins-4.c: New. * gcc.target/i386/chkp-remove-bndint-1.c: New. * gcc.target/i386/chkp-remove-bndint-2.c: New. * gcc.target/i386/chkp-const-check-1.c: New. * gcc.target/i386/chkp-const-check-2.c: New. * gcc.target/i386/chkp-lifetime-1.c: New. * gcc.dg/pr37858.c: Replace early_local_cleanups pass name with build_ssa_passes. From-SVN: r217125
2014-11-05 13:42:03 +01:00
rtx
default_load_bounds_for_arg (rtx addr ATTRIBUTE_UNUSED,
rtx ptr ATTRIBUTE_UNUSED,
rtx bnd ATTRIBUTE_UNUSED)
{
gcc_unreachable ();
}
void
default_store_bounds_for_arg (rtx val ATTRIBUTE_UNUSED,
rtx addr ATTRIBUTE_UNUSED,
rtx bounds ATTRIBUTE_UNUSED,
rtx to ATTRIBUTE_UNUSED)
{
gcc_unreachable ();
}
rtx
default_load_returned_bounds (rtx slot ATTRIBUTE_UNUSED)
{
gcc_unreachable ();
}
void
default_store_returned_bounds (rtx slot ATTRIBUTE_UNUSED,
rtx bounds ATTRIBUTE_UNUSED)
{
gcc_unreachable ();
}
/* Default version of canonicalize_comparison. */
void
default_canonicalize_comparison (int *, rtx *, rtx *, bool)
{
}
tree-core.h (enum cv_qualifier): Add TYPE_QUAL_ATOMIC. gcc: 2013-11-05 Andrew MacLeod <amacleod@redhat.com> Joseph Myers <joseph@codesourcery.com> * tree-core.h (enum cv_qualifier): Add TYPE_QUAL_ATOMIC. (enum tree_index): Add TI_ATOMICQI_TYPE, TI_ATOMICHI_TYPE, TI_ATOMICSI_TYPE, TI_ATOMICDI_TYPE and TI_ATOMICTI_TYPE. (struct tree_base): Add atomic_flag field. * tree.h (TYPE_ATOMIC): New accessor macro. (TYPE_QUALS, TYPE_QUALS_NO_ADDR_SPACE): Add TYPE_QUAL_ATOMIC. (TYPE_QUALS_NO_ADDR_SPACE_NO_ATOMIC): New macro. (atomicQI_type_node, atomicHI_type_node, atomicSI_type_node) (atomicDI_type_node, atomicTI_type_node): New macros for type nodes. * tree.c (set_type_quals): Set TYPE_ATOMIC. (find_atomic_core_type): New function. (build_qualified_type): Adjust alignment for qualified types. (build_atomic_base): New function (build_common_tree_nodes): Build atomicQI_type_node, atomicHI_type_node, atomicSI_type_node, atomicDI_type_node and atomicTI_type_node. * print-tree.c (print_node): Print atomic qualifier. * tree-pretty-print.c (dump_generic_node): Print atomic type attribute. * target.def (atomic_assign_expand_fenv): New hook. * doc/tm.texi.in (TARGET_ATOMIC_ASSIGN_EXPAND_FENV): New @hook. * doc/tm.texi: Regenerate. * targhooks.c (default_atomic_assign_expand_fenv): New function. * targhooks.h (default_atomic_assign_expand_fenv): Declare. * sync-builtins.def (__atomic_feraiseexcept): New built-in function. * config/i386/i386-builtin-types.def (VOID_FTYPE_PUSHORT): New function type. * config/i386/i386.c (enum ix86_builtins): Add IX86_BUILTIN_FNSTENV, IX86_BUILTIN_FLDENV, IX86_BUILTIN_FNSTSW and IX86_BUILTIN_FNCLEX. (bdesc_special_args): Add __builtin_ia32_fnstenv, __builtin_ia32_fldenv, __builtin_ia32_fnstsw and __builtin_ia32_fnclex. (ix86_expand_builtin): Handle the new built-in functions. (ix86_atomic_assign_expand_fenv): New function. (TARGET_ATOMIC_ASSIGN_EXPAND_FENV): New macro. * config/i386/i386.md (UNSPECV_FNSTENV, UNSPECV_FLDENV) (UNSPECV_FNSTSW, UNSPECV_FNCLEX): New unspecs. (fnstenv, fldenv, fnstsw, fnclex): New insns. gcc/c-family: 2013-11-05 Andrew MacLeod <amacleod@redhat.com> Joseph Myers <joseph@codesourcery.com> * c-common.h (enum rid): Add RID_ATOMIC. * c-common.c (c_common_reswords): Add _Atomic. (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument. (keyword_is_type_qualifier): Accept RID_ATOMIC. * c-format.c (check_format_types): Check for extra _Atomic qualifiers in format argument. * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier. (pp_c_type_qualifier_list): Mention _Atomic in comment. gcc/c: 2013-11-05 Joseph Myers <joseph@codesourcery.com> Andrew MacLeod <amacleod@redhat.com> * c-aux-info.c (gen_type): Handle atomic qualifier. * c-decl.c (validate_proto_after_old_defn): Do not remove atomic qualifiers when compating types. (shadow_tag_warned): Handle atomic_p in declspecs. (quals_from_declspecs): Likewise. (start_decl): Use c_type_promotes_to when promoting argument types. (grokdeclarator): Handle _Atomic. (get_parm_info): Diagnose any qualifier on "void" as only parameter. (store_parm_decls_oldstyle): Do not remove atomic qualifiers when comparing types. Use c_type_promotes_to when promoting argument types. (finish_function): Use c_type_promotes_to when promoting argument types. (build_null_declspecs): Handle atomic_p in declspecs. (declspecs_add_qual): Handle RID_ATOMIC. * c-parser.c (c_token_starts_typename, c_token_is_qualifier) (c_token_starts_declspecs): Handle RID_ATOMIC. (c_parser_declspecs): Handle atomic type specifiers and qualifiers. (c_parser_typeof_specifier): Remove const and _Atomic qualifiers from types of expressions with atomic type. (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue. (c_parser_attribute_any_word): Handle RID_ATOMIC. (c_parser_initializer, c_parser_initelt, c_parser_initval) (c_parser_statement_after_labels, c_parser_switch_statement) (c_parser_for_statement, c_parser_expr_no_commas) (c_parser_conditional_expression, c_parser_binary_expression) (c_parser_cast_expression, c_parser_unary_expression) (c_parser_postfix_expression) (c_parser_postfix_expression_after_primary, c_parser_expression): Use convert_lvalue_to_rvalue. (c_parser_expression_conv, c_parser_expr_list): Document conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue. (c_parser_objc_synchronized_statement): Use convert_lvalue_to_rvalue. (c_parser_objc_selector): Handle RID_ATOMIC. (c_parser_objc_receiver, c_parser_array_notation): Use convert_lvalue_to_rvalue. * c-tree.h (ctsk_typeof): Adjust comment to mention use for _Atomic (type-name). (struct c_declspecs): Add atomic_p field. (convert_lvalue_to_rvalue): Declare. * c-typeck.c (c_type_promotes_to): Promote atomic types to corresponding atomic types. (qualify_type): Don't add _Atomic qualifiers from second argument. (comp_target_types): Do not allow _Atomic mismatches. (type_lists_compatible_p): Do not remove atomic qualifiers when comparing types. (really_atomic_lvalue, convert_lvalue_to_rvalue) (build_atomic_assign): New functions. (build_unary_op): Use build_atomic_assign for atomic increment and decrement. (build_conditional_expr): Do not treat _Atomic void as a qualified version of void. (build_modify_expr): Use build_atomic_assign for atomic LHS. (find_anonymous_field_with_type, convert_to_anonymous_field) (convert_for_assignment): Do not remove atomic qualifiers when comparing types. (digest_init): Do not accept initialization of arrays of atomic elements by string constants. (build_asm_expr): Use convert_lvalue_to_rvalue. (build_binary_op): Do not treat _Atomic void as a qualified version of void. gcc/objc: 2013-11-05 Andrew MacLeod <amacleod@redhat.com> * objc-act.c (objc_push_parm): Handle atomic qualifier. gcc/testsuite: 2013-11-05 Joseph Myers <joseph@codesourcery.com> * lib/target-supports.exp (check_effective_target_fenv_exceptions): New function. * lib/atomic-dg.exp, gcc.dg/atomic/atomic.exp: New files. * gcc.dg/atomic/c11-atomic-exec-1.c, gcc.dg/atomic/c11-atomic-exec-2.c, gcc.dg/atomic/c11-atomic-exec-3.c, gcc.dg/atomic/c11-atomic-exec-4.c, gcc.dg/atomic/c11-atomic-exec-5.c, gcc.dg/c11-atomic-1.c, gcc.dg/c11-atomic-2.c, gcc.dg/c11-atomic-3.c, gcc.dg/c90-atomic-1.c, gcc.dg/c99-atomic-1.c: New tests. libatomic: 2013-11-05 Joseph Myers <joseph@codesourcery.com> * fenv.c: New file. * libatomic.map (LIBATOMIC_1.1): New symbol version. Include __atomic_feraiseexcept. * configure.ac (libtool_VERSION): Change to 2:0:1. (fenv.h): Test for header. * Makefile.am (libatomic_la_SOURCES): Add fenv.c. * Makefile.in, auto-config.h.in, configure: Regenerate. From-SVN: r204544
2013-11-07 22:15:25 +01:00
/* Default implementation of TARGET_ATOMIC_ASSIGN_EXPAND_FENV. */
void
default_atomic_assign_expand_fenv (tree *, tree *, tree *)
{
}
#ifndef PAD_VARARGS_DOWN
#define PAD_VARARGS_DOWN BYTES_BIG_ENDIAN
#endif
/* Build an indirect-ref expression over the given TREE, which represents a
piece of a va_arg() expansion. */
tree
build_va_arg_indirect_ref (tree addr)
{
addr = build_simple_mem_ref_loc (EXPR_LOCATION (addr), addr);
return addr;
}
/* The "standard" implementation of va_arg: read the value from the
current (padded) address and increment by the (padded) size. */
tree
std_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
gimple_seq *post_p)
{
tree addr, t, type_size, rounded_size, valist_tmp;
unsigned HOST_WIDE_INT align, boundary;
bool indirect;
/* All of the alignment and movement below is for args-grow-up machines.
As of 2004, there are only 3 ARGS_GROW_DOWNWARD targets, and they all
implement their own specialized gimplify_va_arg_expr routines. */
if (ARGS_GROW_DOWNWARD)
gcc_unreachable ();
indirect = pass_by_reference (NULL, TYPE_MODE (type), type, false);
if (indirect)
type = build_pointer_type (type);
align = PARM_BOUNDARY / BITS_PER_UNIT;
boundary = targetm.calls.function_arg_boundary (TYPE_MODE (type), type);
/* When we align parameter on stack for caller, if the parameter
alignment is beyond MAX_SUPPORTED_STACK_ALIGNMENT, it will be
aligned at MAX_SUPPORTED_STACK_ALIGNMENT. We will match callee
here with caller. */
if (boundary > MAX_SUPPORTED_STACK_ALIGNMENT)
boundary = MAX_SUPPORTED_STACK_ALIGNMENT;
boundary /= BITS_PER_UNIT;
/* Hoist the valist value into a temporary for the moment. */
valist_tmp = get_initialized_tmp_var (valist, pre_p, NULL);
/* va_list pointer is aligned to PARM_BOUNDARY. If argument actually
requires greater alignment, we must perform dynamic alignment. */
if (boundary > align
&& !integer_zerop (TYPE_SIZE (type)))
{
t = build2 (MODIFY_EXPR, TREE_TYPE (valist), valist_tmp,
fold_build_pointer_plus_hwi (valist_tmp, boundary - 1));
gimplify_and_add (t, pre_p);
t = build2 (MODIFY_EXPR, TREE_TYPE (valist), valist_tmp,
fold_build2 (BIT_AND_EXPR, TREE_TYPE (valist),
valist_tmp,
build_int_cst (TREE_TYPE (valist), -boundary)));
gimplify_and_add (t, pre_p);
}
else
boundary = align;
/* If the actual alignment is less than the alignment of the type,
adjust the type accordingly so that we don't assume strict alignment
when dereferencing the pointer. */
boundary *= BITS_PER_UNIT;
if (boundary < TYPE_ALIGN (type))
{
type = build_variant_type_copy (type);
tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount. * tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount. (SET_TYPE_ALIGN, SET_DECL_ALIGN): New. * tree-core.h (tree_type_common.align): Use bit-field. (tree_type_common.spare): New. (tree_decl_common.off_align): Make smaller. (tree_decl_common.align): Use bit-field. * expr.c (expand_expr_addr_expr_1): Use SET_TYPE_ALIGN. * omp-low.c (install_var_field): Use SET_DECL_ALIGN. (scan_sharing_clauses): Ditto. (finish_taskreg_scan): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (omp_finish_file): Ditto. * stor-layout.c (do_type_align): Use SET_DECL_ALIGN. (layout_decl): Ditto. (relayout_decl): Ditto. (finalize_record_size): Use SET_TYPE_ALIGN. (finalize_type_size): Ditto. (finish_builtin_struct): Ditto. (layout_type): Ditto. (initialize_sizetypes): Ditto. * targhooks.c (std_gimplify_va_arg_expr): Use SET_TYPE_ALIGN. * tree-nested.c (insert_field_into_struct): Use SET_TYPE_ALIGN. (lookup_field_for_decl): Use SET_DECL_ALIGN. (get_chain_field): Ditto. (get_trampoline_type): Ditto. (get_nl_goto_field): Ditto. * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use SET_DECL_ALIGN. (unpack_ts_type_common_value_fields): Use SET_TYPE_ALIGN. * gimple-expr.c (copy_var_decl): Use SET_DECL_ALIGN. * tree.c (make_node_stat): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (build_qualified_type): Use SET_TYPE_ALIGN. (build_aligned_type, build_range_type_1): Ditto. (build_atomic_base): Ditto. (build_common_tree_nodes): Ditto. * cfgexpand.c (align_local_variable): Use SET_DECL_ALIGN. (expand_one_stack_var_at): Ditto. * coverage.c (build_var): Use SET_DECL_ALIGN. * except.c (init_eh): Ditto. * function.c (assign_parm_setup_block): Ditto. * symtab.c (increase_alignment_1): Ditto. * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Ditto. * tree-vect-stmts.c (ensure_base_align): Ditto. * varasm.c (align_variable): Ditto. (assemble_variable): Ditto. (build_constant_desc): Ditto. (output_constant_def_contents): Ditto. * config/arm/arm.c (arm_relayout_function): Use SET_DECL_ALIGN. * config/avr/avr.c (avr_adjust_type_node): Use SET_TYPE_ALIGN. * config/mips/mips.c (mips_std_gimplify_va_arg_expr): Ditto. * config/msp430/msp430.c (msp430_gimplify_va_arg_expr): Ditto. * config/spu/spu.c (spu_build_builtin_va_list): Use SET_DECL_ALIGN. ada/ * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN. (gnat_to_gnu_field): Ditto. (components_to_record): Ditto. (create_variant_part_from): Ditto. (copy_and_substitute_in_size): Ditto. (substitute_in_type): Ditto. * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN. (make_packable_type): Ditto. (maybe_pad_type): Ditto. (finish_fat_pointer_type): Ditto. (finish_record_type): Ditto and use SET_DECL_ALIGN. (rest_of_record_type_compilation): Use SET_TYPE_ALIGN. (create_field_decl): Use SET_DECL_ALIGN. c-family/ * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN and SET_DECL_ALIGN. c/ * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN. cp/ * class.c (build_vtable): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. (layout_class_type): Ditto. (build_base_field): Use SET_DECL_ALIGN. (fixup_attribute_variants): Use SET_TYPE_ALIGN. * decl.c (duplicate_decls): Use SET_DECL_ALIGN. (record_unknown_type): Use SET_TYPE_ALIGN. (cxx_init_decl_processing): Ditto. (copy_type_enum): Ditto. (grokfndecl): Use SET_DECL_ALIGN. (copy_type_enum): Use SET_TYPE_ALIGN. * pt.c (instantiate_class_template_1): Use SET_TYPE_ALIGN. (tsubst): Ditto. * tree.c (cp_build_qualified_type_real): Use SET_TYPE_ALIGN. * lambda.c (maybe_add_lambda_conv_op): Use SET_DECL_ALIGN. * method.c (implicitly_declare_fn): Use SET_DECL_ALIGN. * rtti.c (emit_tinfo_decl): Ditto. fortran/ * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN. * trans-common.c (build_common_decl): Use SET_DECL_ALIGN. * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN. go/ * go-gcc.cc (Gcc_backend::implicit_variable): Use SET_DECL_ALIGN. java/ * class.c (add_method_1): Use SET_DECL_ALIGN. (make_class_data): Ditto. (emit_register_classes_in_jcr_section): Ditto. * typeck.c (build_java_array_type): Ditto. objc/ * objc-act.c (objc_build_struct): Use SET_DECL_ALIGN. libcc1/ * plugin.cc (plugin_finish_record_or_union): Use SET_TYPE_ALIGN. From-SVN: r235172
2016-04-18 22:36:27 +02:00
SET_TYPE_ALIGN (type, boundary);
}
/* Compute the rounded size of the type. */
type_size = size_in_bytes (type);
rounded_size = round_up (type_size, align);
/* Reduce rounded_size so it's sharable with the postqueue. */
gimplify_expr (&rounded_size, pre_p, post_p, is_gimple_val, fb_rvalue);
/* Get AP. */
addr = valist_tmp;
if (PAD_VARARGS_DOWN && !integer_zerop (rounded_size))
{
/* Small args are padded downward. */
t = fold_build2_loc (input_location, GT_EXPR, sizetype,
rounded_size, size_int (align));
t = fold_build3 (COND_EXPR, sizetype, t, size_zero_node,
size_binop (MINUS_EXPR, rounded_size, type_size));
addr = fold_build_pointer_plus (addr, t);
}
/* Compute new value for AP. */
t = fold_build_pointer_plus (valist_tmp, rounded_size);
t = build2 (MODIFY_EXPR, TREE_TYPE (valist), valist, t);
gimplify_and_add (t, pre_p);
addr = fold_convert (build_pointer_type (type), addr);
if (indirect)
addr = build_va_arg_indirect_ref (addr);
return build_va_arg_indirect_ref (addr);
}
ipa-chkp.c: New. gcc/ 2014-11-05 Ilya Enkovich <ilya.enkovich@intel.com> * ipa-chkp.c: New. * ipa-chkp.h: New. * tree-chkp.c: New. * tree-chkp.h: New. * tree-chkp-opt.c: New. * rtl-chkp.c: New. * rtl-chkp.h: New. * Makefile.in (OBJS): Add ipa-chkp.o, rtl-chkp.o, tree-chkp.o tree-chkp-opt.o. (GTFILES): Add tree-chkp.c. * mode-classes.def (MODE_POINTER_BOUNDS): New. * tree.def (POINTER_BOUNDS_TYPE): New. * genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS. (POINTER_BOUNDS_MODE): New. (make_pointer_bounds_mode): New. * machmode.h (POINTER_BOUNDS_MODE_P): New. * stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS. (layout_type): Support POINTER_BOUNDS_TYPE. * tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE. * tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE. * tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE. (type_contains_placeholder_1): Likewise. (build_common_tree_nodes): Initialize pointer_bounds_type_node. * tree.h (POINTER_BOUNDS_TYPE_P): New. (pointer_bounds_type_node): New. (POINTER_BOUNDS_P): New. (BOUNDED_TYPE_P): New. (BOUNDED_P): New. (CALL_WITH_BOUNDS_P): New. * gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS. (gimple_call_with_bounds_p): New. (gimple_call_set_with_bounds): New. (gimple_return_retbnd): New. (gimple_return_set_retbnd): New * gimple.c (gimple_build_return): Increase number of ops for return statement. (gimple_build_call_from_tree): Propagate CALL_WITH_BOUNDS_P flag. * gimple-pretty-print.c (dump_gimple_return): Print second op. * rtl.h (CALL_EXPR_WITH_BOUNDS_P): New. * gimplify.c (gimplify_init_constructor): Avoid infinite loop during gimplification of bounds initializer. * calls.c: Include tree-chkp.h, rtl-chkp.h, bitmap.h. (special_function_p): Use original decl name when analyzing instrumentation clone. (arg_data): Add fields special_slot, pointer_arg and pointer_offset. (store_bounds): New. (emit_call_1): Propagate instrumentation flag for CALL. (initialize_argument_information): Compute pointer_arg, pointer_offset and special_slot for pointer bounds arguments. (finalize_must_preallocate): Preallocate when storing bounds in bounds table. (compute_argument_addresses): Skip pointer bounds. (expand_call): Store bounds into tables separately. Return result joined with resulting bounds. * cfgexpand.c: Include tree-chkp.h, rtl-chkp.h. (expand_call_stmt): Propagate bounds flag for CALL_EXPR. (expand_return): Add returned bounds arg. Handle returned bounds. (expand_gimple_stmt_1): Adjust to new expand_return signature. (gimple_expand_cfg): Reset rtx bounds map. * expr.c: Include tree-chkp.h, rtl-chkp.h. (expand_assignment): Handle returned bounds. (store_expr_with_bounds): New. Replaces store_expr with new bounds target argument. Handle bounds returned by calls. (store_expr): Now wraps store_expr_with_bounds. * expr.h (store_expr_with_bounds): New. * function.c: Include tree-chkp.h, rtl-chkp.h. (bounds_parm_data): New. (use_register_for_decl): Do not registerize decls used for bounds stores and loads. (assign_parms_augmented_arg_list): Add bounds of the result structure pointer as the second argument. (assign_parm_find_entry_rtl): Mark bounds are never passed on the stack. (assign_parm_is_stack_parm): Likewise. (assign_parm_load_bounds): New. (assign_bounds): New. (assign_parms): Load bounds and determine a location for returned bounds. (diddle_return_value_1): New. (diddle_return_value): Handle returned bounds. * function.h (rtl_data): Add field for returned bounds. * varasm.c: Include tree-chkp.h. (output_constant): Support POINTER_BOUNDS_TYPE. (output_constant_pool_2): Support MODE_POINTER_BOUNDS. (ultimate_transparent_alias_target): Move up. (make_decl_rtl): For instrumented function use name of the original decl. (assemble_start_function): Mark function as global in case it is instrumentation clone of the global function. (do_assemble_alias): Follow transparent alias chain for identifier. Check if original alias is public. (maybe_assemble_visibility): Use visibility of the original function for instrumented version. (default_unique_section): Likewise. * emit-rtl.c (immed_double_const): Support MODE_POINTER_BOUNDS. (init_emit_once): Build pointer bounds zero constants. * explow.c (trunc_int_for_mode): Support MODE_POINTER_BOUNDS. * target.def (builtin_chkp_function): New. (chkp_bound_type): New. (chkp_bound_mode): New. (chkp_make_bounds_constant): New. (chkp_initialize_bounds): New. (load_bounds_for_arg): New. (store_bounds_for_arg): New. (load_returned_bounds): New. (store_returned_bounds): New. (chkp_function_value_bounds): New. (setup_incoming_vararg_bounds): New. (function_arg): Update hook description with new possible return value CONST_INT. * targhooks.h (default_load_bounds_for_arg): New. (default_store_bounds_for_arg): New. (default_load_returned_bounds): New. (default_store_returned_bounds): New. (default_chkp_bound_type): New. (default_chkp_bound_mode): New. (default_builtin_chkp_function): New. (default_chkp_function_value_bounds): New. (default_chkp_make_bounds_constant): New. (default_chkp_initialize_bounds): New. (default_setup_incoming_vararg_bounds): New. * targhooks.c (default_load_bounds_for_arg): New. (default_store_bounds_for_arg): New. (default_load_returned_bounds): New. (default_store_returned_bounds): New. (default_chkp_bound_type): New. (default_chkp_bound_mode); New. (default_builtin_chkp_function): New. (default_chkp_function_value_bounds): New. (default_chkp_make_bounds_constant): New. (default_chkp_initialize_bounds): New. (default_setup_incoming_vararg_bounds): New. * builtin-types.def (BT_BND): New. (BT_FN_PTR_CONST_PTR): New. (BT_FN_CONST_PTR_CONST_PTR): New. (BT_FN_BND_CONST_PTR): New. (BT_FN_CONST_PTR_BND): New. (BT_FN_PTR_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR): New. (BT_FN_VOID_PTRPTR_CONST_PTR): New. (BT_FN_VOID_CONST_PTR_SIZE): New. (BT_FN_VOID_PTR_BND): New. (BT_FN_CONST_PTR_CONST_PTR_CONST_PTR): New. (BT_FN_BND_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New. (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): New. * chkp-builtins.def: New. * builtins.def: include chkp-builtins.def. (DEF_CHKP_BUILTIN): New. * builtins.c: Include tree-chkp.h and rtl-chkp.h. (expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS, BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS, BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS, BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS, BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS, BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND, BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL, BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET, BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_NARROW, BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER. (std_expand_builtin_va_start): Init bounds for va_list. * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add __CHKP__ macro when Pointer Bounds Checker is on. * params.def (PARAM_CHKP_MAX_CTOR_SIZE): New. * passes.def (pass_ipa_chkp_versioning): New. (pass_early_local_passes): Renamed to pass_build_ssa_passes. (pass_fixup_cfg): Moved to pass_chkp_instrumentation_passes. (pass_chkp_instrumentation_passes): New. (pass_ipa_chkp_produce_thunks): New. (pass_local_optimization_passes): New. (pass_chkp_opt): New. * tree-pass.h (make_pass_ipa_chkp_versioning): New. (make_pass_ipa_chkp_produce_thunks): New. (make_pass_chkp): New. (make_pass_chkp_opt): New. (make_pass_early_local_passes): Renamed to ... (make_pass_build_ssa_passes): This. (make_pass_chkp_instrumentation_passes): New. (make_pass_local_optimization_passes): New. * passes.c (pass_manager::execute_early_local_passes): Execute early passes in three steps. (execute_all_early_local_passes): Renamed to ... (execute_build_ssa_passes): This. (pass_data_early_local_passes): Renamed to ... (pass_data_build_ssa_passes): This. (pass_early_local_passes): Renamed to ... (pass_build_ssa_passes): This. (pass_data_chkp_instrumentation_passes): New. (pass_chkp_instrumentation_passes): New. (pass_data_local_optimization_passes): New. (pass_local_optimization_passes): New. (make_pass_early_local_passes): Renamed to ... (make_pass_build_ssa_passes): This. (make_pass_chkp_instrumentation_passes): New. (make_pass_local_optimization_passes): New. * c-family/c.opt (fcheck-pointer-bounds): New. (fchkp-check-incomplete-type): New. (fchkp-zero-input-bounds-for-main): New. (fchkp-first-field-has-own-bounds): New. (fchkp-narrow-bounds): New. (fchkp-narrow-to-innermost-array): New. (fchkp-optimize): New. (fchkp-use-fast-string-functions): New. (fchkp-use-nochk-string-functions): New. (fchkp-use-static-bounds): New. (fchkp-use-static-const-bounds): New. (fchkp-treat-zero-dynamic-size-as-infinite): New. (fchkp-check-read): New. (fchkp-check-write): New. (fchkp-store-bounds): New. (fchkp-instrument-calls): New. (fchkp-instrument-marked-only): New. (Wchkp): New. * c-family/c-common.c (handle_bnd_variable_size_attribute): New. (handle_bnd_legacy): New. (handle_bnd_instrument): New. (c_common_attribute_table): Add bnd_variable_size, bnd_legacy and bnd_instrument. Fix documentation. (c_common_format_attribute_table): Likewsie. * toplev.c: include tree-chkp.h. (process_options): Check Pointer Bounds Checker is supported. (compile_file): Add chkp_finish_file call. * ipa-cp.c (initialize_node_lattices): Use cgraph_local_p to handle instrumentation clones properly. (propagate_constants_accross_call): Do not propagate through instrumentation thunks. * ipa-pure-const.c (propagate_pure_const): Support IPA_REF_CHKP. * ipa-inline.c (early_inliner): Check edge has summary allocated. * ipa-split.c: Include tree-chkp.h. (find_retbnd): New. (split_part_set_ssa_name_p): New. (consider_split): Do not split retbnd and retval producers. (insert_bndret_call_after): new. (split_function): Propagate Pointer Bounds Checker instrumentation marks and handle returned bounds. * tree-ssa-sccvn.h (vn_reference_op_struct): Transform opcode into bit field and add with_bounds field. * tree-ssa-sccvn.c (copy_reference_ops_from_call): Set with_bounds field for instrumented calls. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Restore CALL_WITH_BOUNDS_P flag for calls. * tree-ssa-ccp.c: Include tree-chkp.h. (insert_clobber_before_stack_restore): Handle BUILT_IN_CHKP_BNDRET calls. * tree-ssa-dce.c: Include tree-chkp.h. (propagate_necessity): For free call fed by alloc check bounds are also provided by the same alloc. (eliminate_unnecessary_stmts): Handle BUILT_IN_CHKP_BNDRET used by free calls. * tree-inline.c: Include tree-chkp.h. (declare_return_variable): Add arg holding returned bounds slot. Create and initialize returned bounds var. (remap_gimple_stmt): Handle returned bounds. Return sequence of statements instead of a single statement. (insert_init_stmt): Add declaration. (remap_gimple_seq): Adjust to new remap_gimple_stmt signature. (copy_bb): Adjust to changed return type of remap_gimple_stmt. Properly handle bounds in va_arg_pack and va_arg_pack_len. (expand_call_inline): Handle returned bounds. Add bounds copy for generated mem to mem assignments. * tree-inline.h (copy_body_data): Add fields retbnd and assign_stmts. * value-prof.c: Include tree-chkp.h. (gimple_ic): Support returned bounds. * ipa.c (cgraph_build_static_cdtor_1): Support contructors with "chkp ctor" and "bnd_legacy" attributes. (symtab_remove_unreachable_nodes): Keep initial values for pointer bounds to be used for checks eliminations. (process_references): Handle IPA_REF_CHKP. (walk_polymorphic_call_targets): Likewise. * ipa-visibility.c (cgraph_externally_visible_p): Mark instrumented 'main' as externally visible. (function_and_variable_visibility): Filter instrumentation thunks. * cgraph.h (cgraph_thunk_info): Add add_pointer_bounds_args field. (cgraph_node): Add instrumented_version, orig_decl and instrumentation_clone fields. (symtab_node::get_alias_target): Allow IPA_REF_CHKP reference. (varpool_node): Add need_bounds_init field. (cgraph_local_p): New. * cgraph.c: Include tree-chkp.h. (cgraph_node::remove): Fix instrumented_version of the referenced node if any. (cgraph_node::dump): Dump instrumentation_clone and instrumented_version fields. (cgraph_node::verify_node): Check correctness of IPA_REF_CHKP references and instrumentation thunks. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Keep all not instrumented instrumentation clones alive. (cgraph_redirect_edge_call_stmt_to_callee): Support returned bounds. * cgraphbuild.c (rebuild_cgraph_edges): Rebuild IPA_REF_CHKP reference. (cgraph_rebuild_references): Likewise. * cgraphunit.c: Include tree-chkp.h. (assemble_thunks_and_aliases): Skip thunks calling instrumneted function version. (varpool_finalize_decl): Register statically initialized decls in Pointer Bounds Checker. (walk_polymorphic_call_targets): Do not mark generated call to __builtin_unreachable as with_bounds. (output_weakrefs): If there are both instrumented and original versions, output only one of them. (cgraph_node::expand_thunk): Set with_bounds flag for created call statement. * ipa-ref.h (ipa_ref_use): Add IPA_REF_CHKP. (ipa_ref): increase size of use field. * symtab.c (ipa_ref_use_name): Add element for IPA_REF_CHKP. * varpool.c (dump_varpool_node): Dump need_bounds_init field. (ctor_for_folding): Do not fold constant bounds vars. * lto-streamer.h (LTO_minor_version): Change minor version from 0 to 1. * lto-cgraph.c (compute_ltrans_boundary): Keep initial values for pointer bounds. (lto_output_node): Output instrumentation_clone, thunk.add_pointer_bounds_args and orig_decl field. (lto_output_ref): Adjust to new ipa_ref::use field size. (input_overwrite_node): Read instrumentation_clone field. (input_node): Read thunk.add_pointer_bounds_args and orig_decl fields. (input_ref): Adjust to new ipa_ref::use field size. (input_cgraph_1): Compute instrumented_version fields and restore IDENTIFIER_TRANSPARENT_ALIAS chains. (lto_output_varpool_node): Output need_bounds_init value. (input_varpool_node): Read need_bounds_init value. * lto-partition.c (add_symbol_to_partition_1): Keep original and instrumented versions together. (privatize_symbol_name): Restore transparent alias chain if required. (add_references_to_partition): Add references to pointer bounds vars. * dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE. * dwarf2out.c (gen_subprogram_die): Ignore bound args. (gen_type_die_with_usage): Skip pointer bounds. (dwarf2out_global_decl): Likewise. (is_base_type): Support POINTER_BOUNDS_TYPE. (gen_formal_types_die): Skip pointer bounds. (gen_decl_die): Likewise. * var-tracking.c (vt_add_function_parameters): Skip bounds parameters. * ipa-icf.c (sem_function::merge): Do not merge when instrumentation thunk still exists. (sem_variable::merge): Reset need_bounds_init flag. * doc/extend.texi: Document Pointer Bounds Checker built-in functions and attributes. * doc/tm.texi.in (TARGET_LOAD_BOUNDS_FOR_ARG): New. (TARGET_STORE_BOUNDS_FOR_ARG): New. (TARGET_LOAD_RETURNED_BOUNDS): New. (TARGET_STORE_RETURNED_BOUNDS): New. (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New. (TARGET_SETUP_INCOMING_VARARG_BOUNDS): New. (TARGET_BUILTIN_CHKP_FUNCTION): New. (TARGET_CHKP_BOUND_TYPE): New. (TARGET_CHKP_BOUND_MODE): New. (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New. (TARGET_CHKP_INITIALIZE_BOUNDS): New. * doc/tm.texi: Regenerated. * doc/rtl.texi (MODE_POINTER_BOUNDS): New. (BND32mode): New. (BND64mode): New. * doc/invoke.texi (-mmpx): New. (-mno-mpx): New. (chkp-max-ctor-size): New. * config/i386/constraints.md (w): New. (Ti): New. (Tb): New. * config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__. * config/i386/i386-modes.def (BND32): New. (BND64): New. * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New. * config/i386/i386.c: Include tree-chkp.h, rtl-chkp.h, tree-iterator.h. (regclass_map): Add bound registers. (dbx_register_map): Likewise. (dbx64_register_map): Likewise. (svr4_dbx_register_map): Likewise. (isa_opts): Add -mmpx. (PTA_MPX): New. (ix86_option_override_internal): Support MPX ISA. (ix86_conditional_register_usage): Support bound registers. (ix86_code_end): Add MPX bnd prefix. (output_set_got): Likewise. (print_reg): Avoid prefixes for bound registers. (ix86_print_operand): Add '!' (MPX bnd) print prefix support. (ix86_print_operand_punct_valid_p): Likewise. (ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and UNSPEC_BNDLDX_ADDR. (ix86_output_call_insn): Add MPX bnd prefix to branch instructions. (ix86_class_likely_spilled_p): Add bound regs support. (ix86_hard_regno_mode_ok): Likewise. (x86_order_regs_for_local_alloc): Likewise. (ix86_bnd_prefixed_insn_p): New. (ix86_builtins): Add IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER. (builtin_isa): Add leaf_p and nothrow_p fields. (def_builtin): Initialize leaf_p and nothrow_p. (ix86_add_new_builtins): Handle leaf_p and nothrow_p flags. (bdesc_mpx): New. (bdesc_mpx_const): New. (ix86_init_mpx_builtins): New. (ix86_init_builtins): Call ix86_init_mpx_builtins. (ix86_emit_cmove): New. (ix86_emit_move_max): New. (ix86_expand_builtin): Expand IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER. (ix86_function_value_bounds): New. (ix86_builtin_mpx_function): New. (ix86_get_arg_address_for_bt): New. (ix86_load_bounds): New. (ix86_store_bounds): New. (ix86_load_returned_bounds): New. (ix86_store_returned_bounds): New. (ix86_mpx_bound_mode): New. (ix86_make_bounds_constant): New. (ix86_initialize_bounds): (TARGET_LOAD_BOUNDS_FOR_ARG): New. (TARGET_STORE_BOUNDS_FOR_ARG): New. (TARGET_LOAD_RETURNED_BOUNDS): New. (TARGET_STORE_RETURNED_BOUNDS): New. (TARGET_CHKP_BOUND_MODE): New. (TARGET_BUILTIN_CHKP_FUNCTION): New. (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New. (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New. (TARGET_CHKP_INITIALIZE_BOUNDS): New. (ix86_option_override_internal): Do not support x32 with MPX. (init_cumulative_args): Init stdarg, bnd_regno, bnds_in_bt and force_bnd_pass. (function_arg_advance_32): Return number of used integer registers. (function_arg_advance_64): Likewise. (function_arg_advance_ms_64): Likewise. (ix86_function_arg_advance): Handle pointer bounds. (ix86_function_arg): Likewise. (ix86_function_value_regno_p): Mark fisrt bounds registers as possible function value. (ix86_function_value_1): Handle pointer bounds type/mode (ix86_return_in_memory): Likewise. (ix86_print_operand): Analyse insn to decide abounf "bnd" prefix. (ix86_expand_call): Generate returned bounds. (ix86_setup_incoming_vararg_bounds): New. (ix86_va_start): Initialize bounds for pointers in va_list. (TARGET_SETUP_INCOMING_VARARG_BOUNDS): New. * config/i386/i386.h (TARGET_MPX): New. (TARGET_MPX_P): New. (FIRST_PSEUDO_REGISTER): Fix to new value. (FIXED_REGISTERS): Add bound registers. (CALL_USED_REGISTERS): Likewise. (REG_ALLOC_ORDER): Likewise. (HARD_REGNO_NREGS): Likewise. (VALID_BND_REG_MODE): New. (FIRST_BND_REG): New. (LAST_BND_REG): New. (reg_class): Add BND_REGS. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Likewise. (BND_REGNO_P): New. (ANY_BND_REG_P): New. (BNDmode): New. (HI_REGISTER_NAMES): Add bound registers. (ix86_args): Add bnd_regno, bnds_in_bt, force_bnd_pass and stdarg fields. * config/i386/i386.md (UNSPEC_BNDMK): New. (UNSPEC_BNDMK_ADDR): New. (UNSPEC_BNDSTX): New. (UNSPEC_BNDLDX): New. (UNSPEC_BNDLDX_ADDR): New. (UNSPEC_BNDCL): New. (UNSPEC_BNDCU): New. (UNSPEC_BNDCN): New. (UNSPEC_MPX_FENCE): New. (UNSPEC_SIZEOF): New. (BND0_REG): New. (BND1_REG): New. (type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst. (length_immediate): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (prefix_rep): Check for bnd prefix. (prefix_0f): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (length_nobnd): New. (length): Use length_nobnd when specified. (memory): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (BND): New. (bnd_ptr): New. (BNDCHECK): New. (bndcheck): New. (*jcc_1): Add MPX bnd prefix. (*jcc_2): Likewise. (jump): Likewise. (*indirect_jump): Likewise. (*tablejump_1): Likewise. (simple_return_internal): Likewise. (simple_return_internal_long): Likewise. (simple_return_pop_internal): Likewise. (simple_return_indirect_internal): Likewise. (<mode>_mk): New. (*<mode>_mk): New. (mov<mode>): New. (*mov<mode>_internal_mpx): New. (<mode>_<bndcheck>): New. (*<mode>_<bndcheck>): New. (<mode>_ldx): New. (*<mode>_ldx): New. (<mode>_stx): New. (*<mode>_stx): New. move_size_reloc_<mode>): New. * config/i386/predicates.md (address_mpx_no_base_operand): New. (address_mpx_no_index_operand): New. (bnd_mem_operator): New. (symbol_operand): New. (x86_64_immediate_size_operand): New. * config/i386/i386.opt (mmpx): New. * config/i386/i386-builtin-types.def (BND): New. (ULONG): New. (BND_FTYPE_PCVOID_ULONG): New. (VOID_FTYPE_BND_PCVOID): New. (VOID_FTYPE_PCVOID_PCVOID_BND): New. (BND_FTYPE_PCVOID_PCVOID): New. (BND_FTYPE_PCVOID): New. (BND_FTYPE_BND_BND): New. (PVOID_FTYPE_PVOID_PVOID_ULONG): New. (PVOID_FTYPE_PCVOID_BND_ULONG): New. (ULONG_FTYPE_VOID): New. (PVOID_FTYPE_BND): New. gcc/testsuite/ 2014-11-05 Ilya Enkovich <ilya.enkovich@intel.com> * gcc.target/i386/chkp-builtins-1.c: New. * gcc.target/i386/chkp-builtins-2.c: New. * gcc.target/i386/chkp-builtins-3.c: New. * gcc.target/i386/chkp-builtins-4.c: New. * gcc.target/i386/chkp-remove-bndint-1.c: New. * gcc.target/i386/chkp-remove-bndint-2.c: New. * gcc.target/i386/chkp-const-check-1.c: New. * gcc.target/i386/chkp-const-check-2.c: New. * gcc.target/i386/chkp-lifetime-1.c: New. * gcc.dg/pr37858.c: Replace early_local_cleanups pass name with build_ssa_passes. From-SVN: r217125
2014-11-05 13:42:03 +01:00
tree
default_chkp_bound_type (void)
{
tree res = make_node (POINTER_BOUNDS_TYPE);
TYPE_PRECISION (res) = TYPE_PRECISION (size_type_node) * 2;
TYPE_NAME (res) = get_identifier ("__bounds_type");
SET_TYPE_MODE (res, targetm.chkp_bound_mode ());
layout_type (res);
return res;
}
enum machine_mode
default_chkp_bound_mode (void)
{
return VOIDmode;
}
tree
default_builtin_chkp_function (unsigned int fcode ATTRIBUTE_UNUSED)
{
return NULL_TREE;
}
rtx
default_chkp_function_value_bounds (const_tree ret_type ATTRIBUTE_UNUSED,
const_tree fn_decl_or_type ATTRIBUTE_UNUSED,
bool outgoing ATTRIBUTE_UNUSED)
{
gcc_unreachable ();
}
tree
default_chkp_make_bounds_constant (HOST_WIDE_INT lb ATTRIBUTE_UNUSED,
HOST_WIDE_INT ub ATTRIBUTE_UNUSED)
{
return NULL_TREE;
}
int
default_chkp_initialize_bounds (tree var ATTRIBUTE_UNUSED,
tree lb ATTRIBUTE_UNUSED,
tree ub ATTRIBUTE_UNUSED,
tree *stmts ATTRIBUTE_UNUSED)
{
return 0;
}
void
default_setup_incoming_vararg_bounds (cumulative_args_t ca ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED,
tree type ATTRIBUTE_UNUSED,
int *pretend_arg_size ATTRIBUTE_UNUSED,
int second_time ATTRIBUTE_UNUSED)
{
}
target.def (can_use_doloop_p): New hook. gcc/ * target.def (can_use_doloop_p): New hook. * doc/tm.texi.in (TARGET_CAN_USE_DOLOOP_P): Add. * doc/tm.texi: Regenerate. * doc/md.texi (doloop_begin, doloop_end): Update documentation. * hooks.h (hook_bool_dint_dint_uint_true): Declare. * hooks.c (hook_bool_dint_dint_uint_true): New function. * targhooks.h (can_use_doloop_if_innermost): Declare. * targhooks.c (can_use_doloop_if_innermost): New function. * target.h: Include double-int.h. * loop-doloop.c (doloop_optimize): Call targetm.can_use_doloop_p. Remove iteration count, maximum iteration count, loop depth and enter-at-top inputs from doloop_begin and doloop_end. * config/arc/arc.md (doloop_begin, doloop_end): Update for new interface. * config/arc/arc.c (arc_can_use_doloop_p): New function. (TARGET_CAN_USE_DOLOOP_P): Define. * config/arm/thumb2.md (doloop_end): Update for new interface. * config/arm/arm.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/bfin/bfin.md (doloop_end): Update for new interface. * config/bfin/bfin.c (bfin_can_use_doloop_p): New function. (TARGET_CAN_USE_DOLOOP_P): Define. * config/c6x/c6x.md (doloop_end): Update for new interface. * config/ia64/ia64.md (doloop_end): Update for new interface. * config/ia64/ia64.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/mep/mep.md (doloop_begin, doloop_end): Update for new interface. * config/mep/mep.c (mep_emit_doloop): Likewise. (TARGET_CAN_USE_DOLOOP_P): Define. * config/rs6000/rs6000.md (doloop_end): Update for new interface. * config/rs6000/rs6000.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/s390/s390.md (doloop_end): Update for new interface. * config/sh/sh.md (doloop_end): Likewise. * config/spu/spu.md (doloop_end): Likewise. * config/spu/spu.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/tilegx/tilegx.md (doloop_end): Update for new interface. * config/tilegx/tilegx.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/tilepro/tilepro.md (doloop_end): Update for new interface. * config/tilepro/tilepro.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/v850/v850.md (doloop_begin, doloop_end): Update for new interface. * config/v850/v850.c (TARGET_CAN_USE_DOLOOP_P): Define. From-SVN: r204614
2013-11-09 12:42:16 +01:00
/* An implementation of TARGET_CAN_USE_DOLOOP_P for targets that do
not support nested low-overhead loops. */
bool
2014-05-06 18:25:05 +02:00
can_use_doloop_if_innermost (const widest_int &, const widest_int &,
target.def (can_use_doloop_p): New hook. gcc/ * target.def (can_use_doloop_p): New hook. * doc/tm.texi.in (TARGET_CAN_USE_DOLOOP_P): Add. * doc/tm.texi: Regenerate. * doc/md.texi (doloop_begin, doloop_end): Update documentation. * hooks.h (hook_bool_dint_dint_uint_true): Declare. * hooks.c (hook_bool_dint_dint_uint_true): New function. * targhooks.h (can_use_doloop_if_innermost): Declare. * targhooks.c (can_use_doloop_if_innermost): New function. * target.h: Include double-int.h. * loop-doloop.c (doloop_optimize): Call targetm.can_use_doloop_p. Remove iteration count, maximum iteration count, loop depth and enter-at-top inputs from doloop_begin and doloop_end. * config/arc/arc.md (doloop_begin, doloop_end): Update for new interface. * config/arc/arc.c (arc_can_use_doloop_p): New function. (TARGET_CAN_USE_DOLOOP_P): Define. * config/arm/thumb2.md (doloop_end): Update for new interface. * config/arm/arm.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/bfin/bfin.md (doloop_end): Update for new interface. * config/bfin/bfin.c (bfin_can_use_doloop_p): New function. (TARGET_CAN_USE_DOLOOP_P): Define. * config/c6x/c6x.md (doloop_end): Update for new interface. * config/ia64/ia64.md (doloop_end): Update for new interface. * config/ia64/ia64.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/mep/mep.md (doloop_begin, doloop_end): Update for new interface. * config/mep/mep.c (mep_emit_doloop): Likewise. (TARGET_CAN_USE_DOLOOP_P): Define. * config/rs6000/rs6000.md (doloop_end): Update for new interface. * config/rs6000/rs6000.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/s390/s390.md (doloop_end): Update for new interface. * config/sh/sh.md (doloop_end): Likewise. * config/spu/spu.md (doloop_end): Likewise. * config/spu/spu.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/tilegx/tilegx.md (doloop_end): Update for new interface. * config/tilegx/tilegx.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/tilepro/tilepro.md (doloop_end): Update for new interface. * config/tilepro/tilepro.c (TARGET_CAN_USE_DOLOOP_P): Define. * config/v850/v850.md (doloop_begin, doloop_end): Update for new interface. * config/v850/v850.c (TARGET_CAN_USE_DOLOOP_P): Define. From-SVN: r204614
2013-11-09 12:42:16 +01:00
unsigned int loop_depth, bool)
{
return loop_depth == 1;
}
PR 68432: Add a target hook to control size/speed optab choices The problem in the PR is that some i386 optabs FAIL when optimising for size rather than speed. The gimple level generally needs access to this information before calling the generator, so this patch adds a new hook to say whether an optab should be used when optimising for size or speed. It also has a "both" option for cases where we want code that is optimised for both size and speed. I've passed the optab to the target hook because I think in most cases that's more useful than the instruction code. We could pass both if there's a use for it though. At the moment the match-and-simplify code doesn't have direct access to the target block, so for now I've used "both" there. Tested on x86_64-linux-gnu and powerpc64-linux-gnu. gcc/ PR tree-optimization/68432 * coretypes.h (optimization_type): New enum. * doc/tm.texi.in (TARGET_OPTAB_SUPPORTED_P): New hook. * doc/tm.texi: Regenerate. * target.def (optab_supported_p): New hook. * targhooks.h (default_optab_supported_p): Declare. * targhooks.c (default_optab_supported_p): New function. * predict.h (function_optimization_type): Declare. (bb_optimization_type): Likewise. * predict.c (function_optimization_type): New function. (bb_optimization_type): Likewise. * optabs-query.h (convert_optab_handler): Define an overload that takes an optimization type. (direct_optab_handler): Likewise. * optabs-query.c (convert_optab_handler): Likewise. (direct_optab_handler): Likewise. * internal-fn.h (direct_internal_fn_supported_p): Take an optimization_type argument. * internal-fn.c (direct_optab_supported_p): Likewise. (multi_vector_optab_supported_p): Likewise. (direct_internal_fn_supported_p): Likewise. * builtins.c (replacement_internal_fn): Update call to direct_internal_fn_supported_p. * gimple-match-head.c (build_call_internal): Likewise. * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise. * tree-vect-stmts.c (vectorizable_internal_function): Likewise. * tree.c (maybe_build_call_expr_loc): Likewise. * config/i386/i386.c (ix86_optab_supported_p): New function. (TARGET_OPTAB_SUPPORTED_P): Define. * config/i386/i386.md (asinxf2): Remove optimize_insn_for_size_p check. (asin<mode>2, acosxf2, acos<mode>2, log1pxf2, log1p<mode>2) (expNcorexf3, expxf2, exp<mode>2, exp10xf2, exp10<mode>2, exp2xf2) (exp2<mode>2, expm1xf2, expm1<mode>2, ldexpxf3, ldexp<mode>3) (scalbxf3, scalb<mode>3, rint<mode>2, round<mode>2) (<rounding_insn>xf2, <rounding_insn><mode>2): Likewise. gcc/testsuite/ * gcc.target/i386/pr68432-1.c: New test. * gcc.target/i386/pr68432-2.c: Likewise. * gcc.target/i386/pr68432-3.c: Likewise. From-SVN: r231161
2015-12-02 10:08:49 +01:00
/* Default implementation of TARGET_OPTAB_SUPPORTED_P. */
bool
default_optab_supported_p (int, machine_mode, machine_mode, optimization_type)
{
return true;
}
c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-27 09:41:16 +02:00
#include "gt-targhooks.h"