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


> You can see from the changes of sse.md that this is functionally a no-op change.
Sseshuf replaces sselog.
So, do you mean it should be added with sselog instead of sseadd?
Adding it with sseadd (instead of sselog) influences the latency information.

Regards
Ganesh

-----Original Message-----
From: Uros Bizjak [mailto:ubizjak@gmail.com] 
Sent: Monday, November 12, 2012 2:30 AM
To: Gopalasubramanian, Ganesh
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, i386]: AMD bdver3 enablement

On Fri, Nov 9, 2012 at 4:39 AM, Gopalasubramanian, Ganesh
<Ganesh.Gopalasubramanian@amd.com> wrote:

> Changes done with respect to the review comments.
> Conditionally setting "sseshuf" type attribute has been removed.
> Instead new attribute is added and is included for other attribute calculations.
>
> The patch is attached as (difflog.txt).
> The new file (bdver3.md) describing the pipelines is also attached.
>
> Bootstrapping and "make -k check" passes.
>
> OK for upstream?
>
> 2012-11-09  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.
>         * config/i386/athlon.md (sseshuf):Likewise.
>         * config/i386/atom.md (sseshuf):Likewise.
>         * config/i386/ppro.md (sseshuf):Likewise.

Index: gcc/config/i386/atom.md
===================================================================
--- gcc/config/i386/atom.md	(revision 193132)
+++ gcc/config/i386/atom.md	(working copy)
@@ -455,6 +455,30 @@
             (eq_attr "memory" "!none")))
   "atom-simple-0")

+(define_insn_reservation  "atom_sseshuf" 1
+  (and (eq_attr "cpu" "atom")
+       (and (eq_attr "type" "sseshuf")
+            (eq_attr "memory" "none")))
+  "atom-simple-either")
+
+(define_insn_reservation  "atom_sseshuf_mem" 1
+  (and (eq_attr "cpu" "atom")
+       (and (eq_attr "type" "sseshuf")
+            (eq_attr "memory" "!none")))
+  "atom-simple-either")
+
+(define_insn_reservation  "atom_sseshuf1" 1
+  (and (eq_attr "cpu" "atom")
+       (and (eq_attr "type" "sseshuf1")
+            (eq_attr "memory" "none")))
+  "atom-simple-0")
+
+(define_insn_reservation  "atom_sseshuf1_mem" 1
+  (and (eq_attr "cpu" "atom")
+       (and (eq_attr "type" "sseshuf1")
+            (eq_attr "memory" "!none")))
+  "atom-simple-0")
+
 ;; not pmad, not psad
 (define_insn_reservation  "atom_sseiadd" 1
   (and (eq_attr "cpu" "atom")

This was not what I had in mind for changes in existing .md files.
Just change them in this way:

Index: atom.md
===================================================================
--- atom.md     (revision 193407)
+++ atom.md     (working copy)
@@ -594,7 +594,7 @@
 ;; no memory simple
 (define_insn_reservation  "atom_sseadd" 5
   (and (eq_attr "cpu" "atom")
-       (and (eq_attr "type" "sseadd,sseadd1")
+       (and (eq_attr "type" "sseadd,sseshuf,sseadd1,sseshuf1")
             (and (eq_attr "memory" "none")
                  (and (eq_attr "mode" "!V2DF")
                       (eq_attr "atom_unit" "!complex")))))
@@ -603,7 +603,7 @@
 ;; memory simple
 (define_insn_reservation  "atom_sseadd_mem" 5
   (and (eq_attr "cpu" "atom")
-       (and (eq_attr "type" "sseadd,sseadd1")
+       (and (eq_attr "type" "sseadd,sseshuf,sseadd1,sseshuf1")
             (and (eq_attr "memory" "!none")
                  (and (eq_attr "mode" "!V2DF")
                       (eq_attr "atom_unit" "!complex")))))
@@ -612,7 +612,7 @@
 ;; maxps, minps, *pd, hadd, hsub
 (define_insn_reservation  "atom_sseadd_3" 8
   (and (eq_attr "cpu" "atom")
-       (and (eq_attr "type" "sseadd,sseadd1")
+       (and (eq_attr "type" "sseadd,sseshuf,sseadd1,sseshuf1")
             (ior (eq_attr "mode" "V2DF") (eq_attr "atom_unit" "complex"))))
   "atom-complex, atom-all-eu*7")

You can see from the changes of sse.md that this is functionally a no-op change.

Uros.



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