This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: DFA for PPro, P2, P3
- From: Richard Henderson <rth at redhat dot com>
- To: law at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 2 May 2002 17:33:31 -0700
- Subject: Re: DFA for PPro, P2, P3
- References: <18221.1020380146@porcupine.cygnus.com>
On Thu, May 02, 2002 at 04:55:46PM -0600, law@redhat.com wrote:
> 3. There is a performance problem in building some of the tables in
> genautomata/genattrtab that is preventing me from modeling
> fdiv/fsqrt like the old description. Vlad is working on fixing
> the performance issue with an algorithmic change in how the
> particular table is built.
Incidentally, I ran into this same problem on Alpha.
Originally I put all the units (for a given cpu) in the same automata.
This was of the unacceptable go-out-for-dinner-come-back-and-kill-it
sort of build time.
Then I followed advice seen elsewhere about putting all of the
long-latency units in a separate automata. This helped, bringing
the build time down to ~3 minutes.
Today I put each pair of long-latency units in multiple separate
automata. For instance, given
(define_insn_reservation "ev4_imulsi" 21
(and (eq_attr "cpu" "ev4")
(and (eq_attr "type" "imul")
(eq_attr "opsize" "si")))
"ev4_ib0+ev4_imul,ev4_imul*18,ev4_ebox")
(define_insn_reservation "ev4_fdivsf" 34
(and (eq_attr "cpu" "ev4")
(and (eq_attr "type" "fdiv")
(eq_attr "opsize" "si")))
"ev4_ib1+ev4_fdiv,ev4_fdiv*28,ev4_fdiv+ev4_fbox,ev4_fbox")
then ev4_imul and ev4_ebox are related long-latency units, but are
placed into a different automata than ev4_fdiv and ev4_fbox. I.e.
(define_cpu_unit "ev4_ebox,ev4_imul" "ev4_1")
(define_cpu_unit "ev4_fbox,ev4_fdiv" "ev4_2")
This reduced build time to 3 seconds, and insn-attrtab.c is 300k
rather than 1.8MB.
r~