remove useless unused attributes in i386 code

gcc/

	* config/i386/driver-i386.c: Remove names of unused arguments and
	unnecessary unused attributes.
	* config/i386/host-mingw32.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/winnt-stubs.c: Likewise.
	* config/i386/winnt.c: Likewise.

From-SVN: r212968
This commit is contained in:
Trevor Saunders 2014-07-24 04:56:29 +00:00 committed by Trevor Saunders
parent c9b1a29f6c
commit 997ef9e738
6 changed files with 64 additions and 85 deletions

View File

@ -1,3 +1,12 @@
2014-07-24 Trevor Saunders <tsaunders@mozilla.com>
* config/i386/driver-i386.c: Remove names of unused arguments and
unnecessary unused attributes.
* config/i386/host-mingw32.c: Likewise.
* config/i386/i386.c: Likewise.
* config/i386/winnt-stubs.c: Likewise.
* config/i386/winnt.c: Likewise.
2014-07-23 Jiong Wang <jiong.wang@arm.com>
* config/aarch64/aarch64.c (aarch64_popwb_pair_reg)

View File

@ -920,8 +920,7 @@ done:
-march and -mtune "native" target and will leave to the newly
built compiler to generate code for its default target. */
const char *host_detect_local_cpu (int argc ATTRIBUTE_UNUSED,
const char **argv ATTRIBUTE_UNUSED)
const char *host_detect_local_cpu (int, const char **)
{
return NULL;
}

View File

@ -83,7 +83,7 @@ mingw32_gt_pch_alloc_granularity (void)
open file descriptor if the host would like to probe with mmap. */
static void *
mingw32_gt_pch_get_address (size_t size, int fd ATTRIBUTE_UNUSED)
mingw32_gt_pch_get_address (size_t size, int)
{
void* res;
size = (size + va_granularity - 1) & ~(va_granularity - 1);

View File

@ -5228,9 +5228,8 @@ x86_elf_aligned_common (FILE *file,
ASM_OUTPUT_ALIGNED_BSS. */
void
x86_output_aligned_bss (FILE *file, tree decl ATTRIBUTE_UNUSED,
const char *name, unsigned HOST_WIDE_INT size,
int align)
x86_output_aligned_bss (FILE *file, tree decl, const char *name,
unsigned HOST_WIDE_INT size, int align)
{
if ((ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_MEDIUM_PIC)
&& size > (unsigned int)ix86_section_threshold)
@ -5360,7 +5359,7 @@ ix86_function_ok_for_sibcall (tree decl, tree exp)
static tree
ix86_handle_cconv_attribute (tree *node, tree name,
tree args,
int flags ATTRIBUTE_UNUSED,
int,
bool *no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_TYPE
@ -5504,8 +5503,7 @@ ix86_handle_cconv_attribute (tree *node, tree name,
attributes that we expect elsewhere. */
static tree
ix86_handle_tm_regparm_attribute (tree *node, tree name ATTRIBUTE_UNUSED,
tree args ATTRIBUTE_UNUSED,
ix86_handle_tm_regparm_attribute (tree *node, tree, tree,
int flags, bool *no_add_attrs)
{
tree alt;
@ -7544,7 +7542,7 @@ ix86_function_arg (cumulative_args_t cum_v, enum machine_mode omode,
static bool
ix86_pass_by_reference (cumulative_args_t cum_v, enum machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
const_tree type, bool)
{
CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
@ -7973,8 +7971,7 @@ ix86_function_value_1 (const_tree valtype, const_tree fntype_or_decl,
}
static rtx
ix86_function_value (const_tree valtype, const_tree fntype_or_decl,
bool outgoing ATTRIBUTE_UNUSED)
ix86_function_value (const_tree valtype, const_tree fntype_or_decl, bool)
{
enum machine_mode mode, orig_mode;
@ -8021,7 +8018,7 @@ ix86_libcall_value (enum machine_mode mode)
/* Return true iff type is returned in memory. */
static bool
ix86_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
ix86_return_in_memory (const_tree type, const_tree fntype)
{
#ifdef SUBTARGET_RETURN_IN_MEMORY
return SUBTARGET_RETURN_IN_MEMORY (type, fntype);
@ -8315,8 +8312,7 @@ setup_incoming_varargs_ms_64 (CUMULATIVE_ARGS *cum)
static void
ix86_setup_incoming_varargs (cumulative_args_t cum_v, enum machine_mode mode,
tree type, int *pretend_size ATTRIBUTE_UNUSED,
int no_rtl)
tree type, int *, int no_rtl)
{
CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
CUMULATIVE_ARGS next_cum;
@ -11767,8 +11763,7 @@ ix86_expand_epilogue (int style)
/* Reset from the function's potential modifications. */
static void
ix86_output_function_epilogue (FILE *file ATTRIBUTE_UNUSED,
HOST_WIDE_INT size ATTRIBUTE_UNUSED)
ix86_output_function_epilogue (FILE *file ATTRIBUTE_UNUSED, HOST_WIDE_INT)
{
if (pic_offset_table_rtx)
SET_REGNO (pic_offset_table_rtx, REAL_PIC_OFFSET_TABLE_REGNUM);
@ -12390,9 +12385,7 @@ ix86_decompose_address (rtx addr, struct ix86_address *out)
requires to two regs - that would mean more pseudos with longer
lifetimes. */
static int
ix86_address_cost (rtx x, enum machine_mode mode ATTRIBUTE_UNUSED,
addr_space_t as ATTRIBUTE_UNUSED,
bool speed ATTRIBUTE_UNUSED)
ix86_address_cost (rtx x, enum machine_mode, addr_space_t, bool)
{
struct ix86_address parts;
int cost = 1;
@ -12459,7 +12452,7 @@ darwin_local_data_pic (rtx disp)
satisfies CONSTANT_P. */
static bool
ix86_legitimate_constant_p (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
ix86_legitimate_constant_p (enum machine_mode, rtx x)
{
switch (GET_CODE (x))
{
@ -12784,10 +12777,8 @@ legitimate_pic_address_disp_p (rtx disp)
0 if it should not. */
bool
ix86_legitimize_reload_address (rtx x,
enum machine_mode mode ATTRIBUTE_UNUSED,
int opnum, int type,
int ind_levels ATTRIBUTE_UNUSED)
ix86_legitimize_reload_address (rtx x, enum machine_mode, int opnum, int type,
int)
{
/* Reload can generate:
@ -12884,8 +12875,7 @@ ix86_validate_address_register (rtx op)
be recognized. */
static bool
ix86_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
rtx addr, bool strict)
ix86_legitimate_address_p (enum machine_mode, rtx addr, bool strict)
{
struct ix86_address parts;
rtx base, index, disp;
@ -13825,8 +13815,7 @@ legitimize_pe_coff_symbol (rtx addr, bool inreg)
See comments by legitimize_pic_address in i386.c for details. */
static rtx
ix86_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
enum machine_mode mode)
ix86_legitimize_address (rtx x, rtx, enum machine_mode mode)
{
int changed = 0;
unsigned log;
@ -14742,7 +14731,7 @@ print_reg (rtx x, int code, FILE *file)
pattern. */
static int
get_some_local_dynamic_name_1 (rtx *px, void *data ATTRIBUTE_UNUSED)
get_some_local_dynamic_name_1 (rtx *px, void *)
{
rtx x = *px;
@ -16068,7 +16057,7 @@ output_387_binary_op (rtx insn, rtx *operands)
/* Check if a 256bit AVX register is referenced inside of EXP. */
static int
ix86_check_avx256_register (rtx *pexp, void *data ATTRIBUTE_UNUSED)
ix86_check_avx256_register (rtx *pexp, void *)
{
rtx exp = *pexp;
@ -16196,7 +16185,7 @@ ix86_mode_needed (int entity, rtx insn)
/* Check if a 256bit AVX register is referenced in stores. */
static void
ix86_check_avx256_stores (rtx dest, const_rtx set ATTRIBUTE_UNUSED, void *data)
ix86_check_avx256_stores (rtx dest, const_rtx, void *data)
{
if (ix86_check_avx256_register (&dest, NULL))
{
@ -16324,7 +16313,7 @@ ix86_mode_exit (int entity)
}
static int
ix86_mode_priority (int entity ATTRIBUTE_UNUSED, int n)
ix86_mode_priority (int, int n)
{
return n;
}
@ -18577,8 +18566,8 @@ ix86_dep_by_shift_count (const_rtx set_insn, const_rtx use_insn)
appropriate constraints. */
bool
ix86_unary_operator_ok (enum rtx_code code ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED,
ix86_unary_operator_ok (enum rtx_code,
enum machine_mode,
rtx operands[2])
{
/* If one of operands is memory, source and destination must match. */
@ -18732,8 +18721,7 @@ ix86_expand_convert_uns_didf_sse (rtx target, rtx input)
/* Not used, but eases macroization of patterns. */
void
ix86_expand_convert_uns_sixf_sse (rtx target ATTRIBUTE_UNUSED,
rtx input ATTRIBUTE_UNUSED)
ix86_expand_convert_uns_sixf_sse (rtx, rtx)
{
gcc_unreachable ();
}
@ -19353,7 +19341,7 @@ ix86_expand_int_compare (enum rtx_code code, rtx op0, rtx op1)
Return the appropriate mode to use. */
enum machine_mode
ix86_fp_compare_mode (enum rtx_code code ATTRIBUTE_UNUSED)
ix86_fp_compare_mode (enum rtx_code)
{
/* ??? In order to make all comparisons reversible, we do all comparisons
non-trapping when compiling for IEEE. Once gcc is able to distinguish
@ -19568,7 +19556,7 @@ ix86_fp_comparison_cost (enum rtx_code code)
(2 bytes, vs. 3 for fnstsw+sahf and at least 5 for fnstsw+test). */
enum ix86_fpcmp_strategy
ix86_fp_comparison_strategy (enum rtx_code code ATTRIBUTE_UNUSED)
ix86_fp_comparison_strategy (enum rtx_code)
{
/* Do fcomi/sahf based test when profitable. */
@ -26531,9 +26519,7 @@ core2i7_first_cycle_multipass_fini (void *_data)
/* Prepare for scheduling pass. */
static void
ix86_sched_init_global (FILE *dump ATTRIBUTE_UNUSED,
int verbose ATTRIBUTE_UNUSED,
int max_uid ATTRIBUTE_UNUSED)
ix86_sched_init_global (FILE *, int, int)
{
/* Install scheduling hooks for current CPU. Some of these hooks are used
in time-critical parts of the scheduler, so we only set them up when
@ -32763,7 +32749,7 @@ ix86_init_builtins (void)
/* Return the ix86 builtin for CODE. */
static tree
ix86_builtin_decl (unsigned code, bool initialize_p ATTRIBUTE_UNUSED)
ix86_builtin_decl (unsigned code, bool)
{
if (code >= IX86_BUILTIN_MAX)
return error_mark_node;
@ -36915,8 +36901,7 @@ ix86_vectorize_builtin_gather (const_tree mem_vectype,
reciprocal of the function, or NULL_TREE if not available. */
static tree
ix86_builtin_reciprocal (unsigned int fn, bool md_fn,
bool sqrt ATTRIBUTE_UNUSED)
ix86_builtin_reciprocal (unsigned int fn, bool md_fn, bool)
{
if (! (TARGET_SSE_MATH && !optimize_insn_for_size_p ()
&& flag_finite_math_only && !flag_trapping_math
@ -38528,7 +38513,7 @@ x86_order_regs_for_local_alloc (void)
static tree
ix86_handle_callee_pop_aggregate_return (tree *node, tree name,
tree args,
int flags ATTRIBUTE_UNUSED,
int,
bool *no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_TYPE
@ -38578,9 +38563,8 @@ ix86_handle_callee_pop_aggregate_return (tree *node, tree name,
/* Handle a "ms_abi" or "sysv" attribute; arguments as in
struct attribute_spec.handler. */
static tree
ix86_handle_abi_attribute (tree *node, tree name,
tree args ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
ix86_handle_abi_attribute (tree *node, tree name, tree, int,
bool *no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_TYPE
&& TREE_CODE (*node) != METHOD_TYPE
@ -38619,9 +38603,8 @@ ix86_handle_abi_attribute (tree *node, tree name,
/* Handle a "ms_struct" or "gcc_struct" attribute; arguments as in
struct attribute_spec.handler. */
static tree
ix86_handle_struct_attribute (tree *node, tree name,
tree args ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
ix86_handle_struct_attribute (tree *node, tree name, tree, int,
bool *no_add_attrs)
{
tree *type = NULL;
if (DECL_P (*node))
@ -38653,9 +38636,8 @@ ix86_handle_struct_attribute (tree *node, tree name,
}
static tree
ix86_handle_fndecl_attribute (tree *node, tree name,
tree args ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
ix86_handle_fndecl_attribute (tree *node, tree name, tree, int,
bool *no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
@ -38733,9 +38715,8 @@ x86_this_parameter (tree function)
/* Determine whether x86_output_mi_thunk can succeed. */
static bool
x86_can_output_mi_thunk (const_tree thunk ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta ATTRIBUTE_UNUSED,
HOST_WIDE_INT vcall_offset, const_tree function)
x86_can_output_mi_thunk (const_tree, HOST_WIDE_INT, HOST_WIDE_INT vcall_offset,
const_tree function)
{
/* 64-bit can handle anything. */
if (TARGET_64BIT)
@ -38764,8 +38745,7 @@ x86_can_output_mi_thunk (const_tree thunk ATTRIBUTE_UNUSED,
*(*this + vcall_offset) should be added to THIS. */
static void
x86_output_mi_thunk (FILE *file,
tree thunk ATTRIBUTE_UNUSED, HOST_WIDE_INT delta,
x86_output_mi_thunk (FILE *file, tree, HOST_WIDE_INT delta,
HOST_WIDE_INT vcall_offset, tree function)
{
rtx this_param = x86_this_parameter (function);
@ -39419,7 +39399,7 @@ x86_extended_QIreg_mentioned_p (rtx insn)
/* Return nonzero when P points to register encoded via REX prefix.
Called via for_each_rtx. */
static int
extended_reg_mentioned_1 (rtx *p, void *data ATTRIBUTE_UNUSED)
extended_reg_mentioned_1 (rtx *p, void *)
{
unsigned int regno;
if (!REG_P (*p))
@ -41165,9 +41145,7 @@ ix86_c_mode_for_suffix (char suffix)
with the old cc0-based compiler. */
static tree
ix86_md_asm_clobbers (tree outputs ATTRIBUTE_UNUSED,
tree inputs ATTRIBUTE_UNUSED,
tree clobbers)
ix86_md_asm_clobbers (tree, tree, tree clobbers)
{
clobbers = tree_cons (NULL_TREE, build_string (5, "flags"),
clobbers);
@ -42374,8 +42352,7 @@ static const struct attribute_spec ix86_attribute_table[] =
/* Implement targetm.vectorize.builtin_vectorization_cost. */
static int
ix86_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
tree vectype,
int misalign ATTRIBUTE_UNUSED)
tree vectype, int)
{
unsigned elements;
@ -46421,8 +46398,7 @@ has_dispatch (rtx insn, int action)
enabled for other processors. */
static int
ix86_reassociation_width (unsigned int opc ATTRIBUTE_UNUSED,
enum machine_mode mode)
ix86_reassociation_width (unsigned int, enum machine_mode mode)
{
int res = 1;
@ -46519,7 +46495,7 @@ ix86_spill_class (reg_class_t rclass, enum machine_mode mode)
/* Implement targetm.vectorize.init_cost. */
static void *
ix86_init_cost (struct loop *loop_info ATTRIBUTE_UNUSED)
ix86_init_cost (struct loop *)
{
unsigned *cost = XNEWVEC (unsigned, 3);
cost[vect_prologue] = cost[vect_body] = cost[vect_epilogue] = 0;

View File

@ -33,19 +33,19 @@ along with GCC; see the file COPYING3. If not see
#include "hashtab.h"
bool
i386_pe_type_dllimport_p (tree decl ATTRIBUTE_UNUSED)
i386_pe_type_dllimport_p (tree)
{
return false;
}
bool
i386_pe_type_dllexport_p (tree decl ATTRIBUTE_UNUSED)
i386_pe_type_dllexport_p (tree)
{
return false;
}
void
i386_pe_adjust_class_at_definition (tree t ATTRIBUTE_UNUSED)
i386_pe_adjust_class_at_definition (tree)
{ }

View File

@ -66,9 +66,8 @@ along with GCC; see the file COPYING3. If not see
/* Handle a "shared" attribute;
arguments as in struct attribute_spec.handler. */
tree
ix86_handle_shared_attribute (tree *node, tree name,
tree args ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
ix86_handle_shared_attribute (tree *node, tree name, tree, int,
bool *no_add_attrs)
{
if (TREE_CODE (*node) != VAR_DECL)
{
@ -83,9 +82,7 @@ ix86_handle_shared_attribute (tree *node, tree name,
/* Handle a "selectany" attribute;
arguments as in struct attribute_spec.handler. */
tree
ix86_handle_selectany_attribute (tree *node, tree name,
tree args ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED,
ix86_handle_selectany_attribute (tree *node, tree name, tree, int,
bool *no_add_attrs)
{
/* The attribute applies only to objects that are initialized and have
@ -264,8 +261,7 @@ i386_pe_maybe_mangle_decl_assembler_name (tree decl, tree id)
user-specified visibility attributes. */
void
i386_pe_assemble_visibility (tree decl,
int vis ATTRIBUTE_UNUSED)
i386_pe_assemble_visibility (tree decl, int)
{
if (!decl
|| !lookup_attribute ("visibility", DECL_ATTRIBUTES (decl)))
@ -292,7 +288,7 @@ i386_pe_mangle_decl_assembler_name (tree decl, tree id)
a file stream. */
tree
i386_pe_mangle_assembler_name (const char *name ATTRIBUTE_UNUSED)
i386_pe_mangle_assembler_name (const char *name)
{
const char *skipped = name + (*name == '*' ? 1 : 0);
const char *stripped = targetm.strip_name_encoding (skipped);
@ -467,7 +463,7 @@ i386_pe_reloc_rw_mask (void)
#define SECTION_PE_SHARED SECTION_MACH_DEP
unsigned int
i386_pe_section_type_flags (tree decl, const char *name, int reloc)
i386_pe_section_type_flags (tree decl, const char *, int reloc)
{
unsigned int flags;
@ -560,7 +556,7 @@ i386_pe_asm_named_section (const char *name, unsigned int flags,
void
i386_pe_asm_output_aligned_decl_common (FILE *stream, tree decl,
const char *name, HOST_WIDE_INT size,
HOST_WIDE_INT align ATTRIBUTE_UNUSED)
HOST_WIDE_INT align)
{
HOST_WIDE_INT rounded;
@ -1276,8 +1272,7 @@ i386_pe_start_function (FILE *f, const char *name, tree decl)
}
void
i386_pe_end_function (FILE *f, const char *name ATTRIBUTE_UNUSED,
tree decl ATTRIBUTE_UNUSED)
i386_pe_end_function (FILE *f, const char *, tree)
{
i386_pe_seh_fini (f);
}