public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [patch] optimize 40x  description a bit
@ 2004-07-09  9:51 Steven Bosscher
  2004-07-09 19:15 ` David Edelsohn
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Bosscher @ 2004-07-09  9:51 UTC (permalink / raw)
  To: Eric Christopher; +Cc: David Edelsohn, gcc-patches

This is another small change to the RS6000 pipeline descriptions
discussed last night, this time for 7450.  Eric found out that
this one very large so I gave it a look.  The mciu function unit
can have its own automaton, this makes a significant difference
to the size of the `ppc7450' automaton, and it makes insn-attrtab.o
a bit smaller.  It doesn't help for the build time of the automata
though.

Gr.
Steven


--- old 2004-07-09 11:07:17.000000000 +0200
+++ new 2004-07-09 11:10:38.000000000 +0200
@@ -161,13 +161,22 @@
   192 min delay table els, compression factor 1

 Automaton `ppc7450'
-     6954 NDFA states,          46727 NDFA arcs
-     1698 DFA states,            6979 DFA arcs
-     1274 minimal DFA states,    5901 minimal DFA arcs
-      314 all insns         11 insn equivalence classes
- 7029 transition comb vector els, 14014 trans table els: use simple vect
- 7029 state alts comb vector els, 14014 state alts table els: use simple vect
-14014 min delay table els, compression factor 1
+      296 NDFA states,           1940 NDFA arcs
+       72 DFA states,             288 DFA arcs
+       54 minimal DFA states,     243 minimal DFA arcs
+      314 all insns          7 insn equivalence classes
+  283 transition comb vector els,   378 trans table els: use simple vect
+  283 state alts comb vector els,   378 state alts table els: use simple vect
+  378 min delay table els, compression factor 4
+
+Automaton `ppc7450mciu'
+       24 NDFA states,             51 NDFA arcs
+       24 DFA states,              51 DFA arcs
+       24 minimal DFA states,      51 minimal DFA arcs
+      314 all insns          5 insn equivalence classes
+   52 transition comb vector els,   120 trans table els: use simple vect
+   52 state alts comb vector els,   120 state alts table els: use simple vect
+  120 min delay table els, compression factor 1

 Automaton `ppc7450fp'
        36 NDFA states,             75 NDFA arcs
@@ -277,14 +286,14 @@
  3094 state alts comb vector els,  8115 state alts table els: use comb vect
  8115 min delay table els, compression factor 2

-44155 all allocated states,     211218 all allocated arcs
-322885 all allocated alternative states
-170609 all transition comb vector els, 340434 all trans table els
-170609 all state alts comb vector els, 340434 all state alts table els
-340434 all min delay table els
+36118 all allocated states,     163866 all allocated arcs
+305314 all allocated alternative states
+163915 all transition comb vector els, 326918 all trans table els
+163915 all state alts comb vector els, 326918 all state alts table els
+326918 all min delay table els
     0 locked states num

-  transformation: 0.010000, building NDFA: 5.220000, NDFA -> DFA: 1.280000
-  DFA minimization: 1.790000, making insn equivalence: 0.040000
- all automaton generation: 8.570000, output: 53.560000
+  transformation: 0.010000, building NDFA: 3.310000, NDFA -> DFA: 1.020000
+  DFA minimization: 1.480000, making insn equivalence: 0.050000
+ all automaton generation: 6.070000, output: 53.090000


genattrtab time
        Before         After
real    1m10.009s      1m7.720s
user    1m9.810s       1m7.490s
sys     0m0.200s       0m0.230s

compile time insn-attrtab.c
        Before         After
real    0m27.689s      0m27.366s
user    0m25.830s      0m25.280s
sys     0m1.860s       0m2.080s

size insn-attrtab.o
           text    data     bss     dec     hex filename
Before  1139760      12       8 1139780  116444 insn-attrtab.o
After   1098048      12       8 1098068  10c154 insn-attrtab.o



	* config/rs6000/7450.md (automaton ppc7450): Split up, move
	mciu_7450 function unit to...
	(automaton ppc7450mciu): ...new automaton.

Index: 7450.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/7450.md,v
retrieving revision 1.9
diff -c -3 -p -r1.9 7450.md
*** 7450.md     9 Jun 2003 17:16:14 -0000       1.9
--- 7450.md     9 Jul 2004 09:18:52 -0000
***************
*** 18,25 ****
  ;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
  ;; MA 02111-1307, USA.

! (define_automaton "ppc7450,ppc7450fp,ppc7450vec")
! (define_cpu_unit "iu1_7450,iu2_7450,iu3_7450,mciu_7450" "ppc7450")
  (define_cpu_unit "fpu_7450" "ppc7450fp")
  (define_cpu_unit "lsu_7450,bpu_7450" "ppc7450")
  (define_cpu_unit "du1_7450,du2_7450,du3_7450" "ppc7450")
--- 18,26 ----
  ;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
  ;; MA 02111-1307, USA.

! (define_automaton "ppc7450,ppc7450mciu,ppc7450fp,ppc7450vec")
! (define_cpu_unit "iu1_7450,iu2_7450,iu3_7450" "ppc7450")
! (define_cpu_unit "mciu_7450" "ppc7450mciu")
  (define_cpu_unit "fpu_7450" "ppc7450fp")
  (define_cpu_unit "lsu_7450,bpu_7450" "ppc7450")
  (define_cpu_unit "du1_7450,du2_7450,du3_7450" "ppc7450")

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] optimize 40x description a bit
  2004-07-09  9:51 [patch] optimize 40x description a bit Steven Bosscher
@ 2004-07-09 19:15 ` David Edelsohn
  0 siblings, 0 replies; 5+ messages in thread
From: David Edelsohn @ 2004-07-09 19:15 UTC (permalink / raw)
  To: Steven Bosscher; +Cc: Eric Christopher, gcc-patches

>>>>> Steven Bosscher writes:

Steven> * config/rs6000/7450.md (automaton ppc7450): Split up, move
Steven> mciu_7450 function unit to...
Steven> (automaton ppc7450mciu): ...new automaton.

	Okay.

	If you want to speed up genattrtab, harass Segher about his patch :)

David

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] optimize 40x description a bit
  2004-07-09  3:44 ` David Edelsohn
@ 2004-07-10 18:47   ` Eric Christopher
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Christopher @ 2004-07-10 18:47 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc-patches

On Thu, 2004-07-08 at 18:52, David Edelsohn wrote:
> >>>>> Eric Christopher writes:
> 
> Eric> * config/rs6000/40x.md: Split into two automatons.
> 
> Eric> -(define_automaton "ppc40x")
> Eric> -(define_cpu_unit "iu_40x,bpu_40x,fpu_405" "ppc40x")
> Eric> +(define_automaton "ppc40x,iu_40x")
> Eric> +(define_cpu_unit "bpu_40x,fpu_405" "ppc40x")
> Eric> +(define_cpu_unit "iu_40x" "iu_40x")
>  
> 	Okay, but would you please name the new automata ppc40xiu instead
> of iu_40x to be consistent with the other automata in the rs6000 port?

You probably noticed, but I did this and checked it in :)

-eric

-- 
Eric Christopher <echristo@redhat.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] optimize 40x description a bit
  2004-07-09  0:38 Eric Christopher
@ 2004-07-09  3:44 ` David Edelsohn
  2004-07-10 18:47   ` Eric Christopher
  0 siblings, 1 reply; 5+ messages in thread
From: David Edelsohn @ 2004-07-09  3:44 UTC (permalink / raw)
  To: Eric Christopher; +Cc: gcc-patches

>>>>> Eric Christopher writes:

Eric> * config/rs6000/40x.md: Split into two automatons.

Eric> -(define_automaton "ppc40x")
Eric> -(define_cpu_unit "iu_40x,bpu_40x,fpu_405" "ppc40x")
Eric> +(define_automaton "ppc40x,iu_40x")
Eric> +(define_cpu_unit "bpu_40x,fpu_405" "ppc40x")
Eric> +(define_cpu_unit "iu_40x" "iu_40x")
 
	Okay, but would you please name the new automata ppc40xiu instead
of iu_40x to be consistent with the other automata in the rs6000 port?

Thanks, David

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [patch] optimize 40x description a bit
@ 2004-07-09  0:38 Eric Christopher
  2004-07-09  3:44 ` David Edelsohn
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Christopher @ 2004-07-09  0:38 UTC (permalink / raw)
  To: gcc-patches; +Cc: dje

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

Got some speed complaints on genattrtab for the rs6000 backend. Well,
this appears to cut about 800 states out of the dfa and help about 4
seconds out of 126 originally (uh. woo.), anyhow, thought I'd submit it.

The big hog if someone really wants to look at it is the 7450
description. Ick.

-eric

-- 
Eric Christopher <echristo@redhat.com>

2004-07-08  Eric Christopher  <echristo@redhat.com>

	* config/rs6000/40x.md: Split into two automatons.



[-- Attachment #2: rs6000.diff --]
[-- Type: text/x-patch, Size: 847 bytes --]

Index: 40x.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/40x.md,v
retrieving revision 1.8
diff -u -p -w -r1.8 40x.md
--- 40x.md	9 Jun 2003 17:16:13 -0000	1.8
+++ 40x.md	8 Jul 2004 23:36:12 -0000
@@ -18,8 +18,9 @@
 ;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
 ;; MA 02111-1307, USA.
 
-(define_automaton "ppc40x")
-(define_cpu_unit "iu_40x,bpu_40x,fpu_405" "ppc40x")
+(define_automaton "ppc40x,iu_40x")
+(define_cpu_unit "bpu_40x,fpu_405" "ppc40x")
+(define_cpu_unit "iu_40x" "iu_40x")
 
 ;; PPC401 / PPC403 / PPC405 32-bit integer only  IU BPU
 ;; Embedded PowerPC controller
@@ -104,4 +105,3 @@
   (and (eq_attr "type" "fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,fpcompare,fp,dmul,sdiv,ddiv")
        (eq_attr "cpu" "ppc405"))
   "fpu_405*10")
-

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-07-10 17:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-09  9:51 [patch] optimize 40x description a bit Steven Bosscher
2004-07-09 19:15 ` David Edelsohn
  -- strict thread matches above, loose matches on Subject: below --
2004-07-09  0:38 Eric Christopher
2004-07-09  3:44 ` David Edelsohn
2004-07-10 18:47   ` Eric Christopher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).