This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH, i386]: AMD bdver3 enablement


Couple of changes done with respect to the review comments.

1. sseshuf type attribute is handled in unit attribute calculation.
2. sseadd1 instruction attribute is handled in the new scheduler descriptions.

The patch is attached as (patch.txt).
The new file (bdver3.md) describing the pipelines is also attached.

Bootstrapping and "make -k check" passes.

OK for upstream?

Regards
Ganesh

2012-11-05  Ganesh Gopalasubramanian  <Ganesh.Gopalasubramanian@amd.com>

	bdver3 Enablement
	* gcc/doc/extend.texi: Add details about bdver3.
	* gcc/doc/invoke.texi: Add details about bdver3.
	* config.gcc (i[34567]86-*-linux* | ...): Add bdver3.
	(case ${target}): Add bdver3.
	* config/i386/i386.h (TARGET_BDVER3): New definition.
	* config/i386/i386.md (define_attr "cpu"): Add bdver3.
	* config/i386/sse.md (sseshuf): New type attribute 
	added for identifying the shuffle instructions.
	* config/i386/i386.opt (flag_dispatch_scheduler): Add bdver3.
	* config/i386/i386-c.c (ix86_target_macros_internal): Add
	bdver3 def_and_undef
	* config/i386/driver-i386.c (host_detect_local_cpu): Let
	-march=native recognize bdver3 processors.
	* config/i386/i386.c (struct processor_costs bdver3_cost): New.
	(m_BDVER3): New definition.
	(m_AMD_MULTIPLE): Includes m_BDVER3.
	(initial_ix86_tune_features): Add bdver3 tune.
	(processor_target_table): Add bdver3 entry.
	(static const char *const cpu_names): Add bdver3 entry.
	(software_prefetching_beneficial_p): Add bdver3.
	(ix86_option_override_internal): Add bdver3 instruction sets.
	(ix86_option_override_internal): Remove XSAVEOPT for bdver1 
	and bdver2.
	(ix86_issue_rate): Add bdver3.
	(ix86_adjust_cost): Add bdver3.
	(enum target_cpu_default): Add TARGET_CPU_DEFAULT_bdver3.
	(enum processor_type): Add PROCESSOR_BDVER3.
	* config/i386/bdver3.md: New file describing bdver3 pipelines.

-----Original Message-----
From: Uros Bizjak [mailto:ubizjak@gmail.com] 
Sent: Thursday, October 11, 2012 10:37 PM
To: Gopalasubramanian, Ganesh
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, i386]: AMD bdver3 enablement

On Thu, Oct 11, 2012 at 9:19 AM, Gopalasubramanian, Ganesh <Ganesh.Gopalasubramanian@amd.com> wrote:

> The attached patch (Patch.txt) enables the next version of AMD's bulldozer core.

Please handle new sseshuf type attribute in various attribute calculations. You should at least add it to unit attribute calculation, but please review other calculations. This attribute replaces sselog, so probably all places that mention sselog needs to be updated.

> A new file (bdver3.md) is also attached which describes the pipelines.

Please note recent addition - sseadd1, similar to sseadd. You should handle this and other _1 types in a similar way. _1 types only mark instructions that do not have operand2, but are otherwise the same as instructions without prefix.


> 2012-10-11  Ganesh Gopalasubramanian  
> <Ganesh.Gopalasubramanian@amd.com>
>
>         bdver3 Enablement
>         * gcc/doc/extend.texi: Add details about bdver3.
>         * gcc/doc/invoke.texi: Add details about bdver3.
>         * config.gcc (i[34567]86-*-linux* | ...): Add bdver3.
>         (case ${target}): Add bdver3.
>         * config/i386/i386.h (TARGET_BDVER3): New definition.
>         * config/i386/i386.md (define_attr "cpu"): Add bdver3.
>         * config/i386/cpuid.h (bit_XSAVEOPT): New field for
>         getting the xsaveopt cpuid flag.

Just say "New." here.

>         * config/i386/sse.md (sseshuf): New instruction
>         attribute added for identifying the shuffle instructions.

This is actually "New type attribute."

>         * config/i386/i386.opt (flag_dispatch_scheduler): Add bdver3.
>         * config/i386/i386-c.c (ix86_target_macros_internal): Add
>         bdver3 def_and_undef
>         * config/i386/driver-i386.c (host_detect_local_cpu): Let
>         -march=native recognize bdver3 processors.

"Recognize bdver3 processors."

>         * config/i386/i386.c (struct processor_costs btver2_cost): New
>         bdver3 cost table.

"New."

>         (m_BDVER3): New definition.
>         (m_AMD_MULTIPLE): Includes m_BDVER3.
>         (initial_ix86_tune_features): Add bdver3 tune.
>         (processor_target_table): Add bdver3 entry.
>         (static const char *const cpu_names): Add bdver3 entry.
>         (software_prefetching_beneficial_p): Add bdver3.
>         (ix86_option_override_internal): Add bdver3 instruction sets.
>         (ix86_issue_rate): Add bdver3.
>         (ix86_adjust_cost): Add bdver3.
>         (enum target_cpu_default): Add TARGET_CPU_DEFAULT_bdver3.
>         (enum processor_type): Add PROCESSOR_BDVER3.
>         * config/i386/bdver3.md: New file describing bdver3 pipelines.

The patch looks OK, but please repost due to suggested attribute changes.

Thanks,
Uros.

Attachment: difflog.txt
Description: difflog.txt

Attachment: bdver3.md
Description: bdver3.md


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]