[PATCH] i386: move alignment defaults to processor_costs.

Martin Liška mliska@suse.cz
Wed Sep 12 12:45:00 GMT 2018


Hi.

Honza asked me to do the follow-up. It moves definition of alignments
related to a CPU into *_cost scructures. Advantage of it is that there's
no redundant definition for CPUs that have equal cost.

I verified that it produces same output for all valid -march options:
gcc --help=common -Q -O2 -march=*

I need to reg&bootstrap the patch. Will it be fine after I'll test it?
Thanks,
Martin

gcc/ChangeLog:

2018-09-12  Martin Liska  <mliska@suse.cz>

	* common/config/i386/i386-common.c (ix86_get_valid_option_values):
	Use processor_names table.
	* config/i386/i386.c (ix86_default_align): Use
	processor_cost_table for alignment values.
	(ix86_option_override_internal): Use processor_names.
	(ix86_function_specific_print): Likewise.
	* config/i386/i386.h (struct processor_costs):
	Add alignment values.
	(struct ptt): Remove and replace with const char *.
	* config/i386/x86-tune-costs.h (struct processor_costs):
	Declare default alignments for all costs.
---
 gcc/common/config/i386/i386-common.c |  82 ++++++++++-----------
 gcc/config/i386/i386.c               |  15 ++--
 gcc/config/i386/i386.h               |  22 +++---
 gcc/config/i386/x86-tune-costs.h     | 104 +++++++++++++++++++++++++++
 4 files changed, 159 insertions(+), 64 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-i386-move-alignment-defaults-to-processor_costs.patch
Type: text/x-patch
Size: 18100 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180912/6edb04bf/attachment.bin>


More information about the Gcc-patches mailing list