public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: fixing the c++/f77 circular dependency
@ 1997-08-21  4:52 Doug Evans
  1997-08-21  4:54 ` Ultrasparc addition for sparc.md (fwd) Jeffrey A Law
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Doug Evans @ 1997-08-21  4:52 UTC (permalink / raw)
  To: egcs

   From: Alexandre Oliva <oliva@dcc.unicamp.br>
   Date: 21 Aug 1997 01:27:55 -0300

   > You could add a --enable-lang=foo [or some such] option,
   > so while LANGUAGES=x is gone, the ability to only build a few
   > is not.

   I'd rather have all languages enabled by default (as it is now), and
   configuring --without-g77, --without-g++ (is this a valid identifier,
   by the way?), etc would selectively disable them.  I could provide a
   patch for that, if you agree with it.

When I proposed and wrote a patch for --{with,without}-lang [over two
years ago] it was suggested that --{enable,disable} was more appropriate.

As for the behaviour, what's the default, etc. etc.
I don't have a strong opinion.  I realize it's reasonable
to want the default to be to install all languages.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Ultrasparc addition for sparc.md (fwd)
@ 1997-08-21  3:05 Oleg Krivosheev
  0 siblings, 0 replies; 5+ messages in thread
From: Oleg Krivosheev @ 1997-08-21  3:05 UTC (permalink / raw)
  To: egcs

Hi, All,

i don't know is it good idea or not to
forward message from gcc2 list but here it is...

OK

ps maybe someone knowledgeable will systematically
forward essential messages from/to gcc2?


---------- Forwarded message ----------
Date: Wed, 20 Aug 1997 14:00:27 +0200
From: Christian Kuehnke <Christian.Kuehnke@arbi.Informatik.UNI-OLDENBURG.DE>
To: gcc2@cygnus.COM
Subject: Ultrasparc addition for sparc.md

Hello,
here are first results of my experimnts (see comment at the end):

--- sparc.md.orig	Tue Aug 19 00:45:02 1997
+++ sparc.md	Tue Aug 19 00:45:02 1997
@@ -272,6 +272,43 @@
 ;; The multiply unit has a latency of 5.
 (define_function_unit "tsc701_mul" 1 0
   (and (eq_attr "type" "imul")		(eq_attr "cpu" "tsc701")) 5 5)
+
+;; ----- The UltraSPARC-1 scheduling
+;; The Ultrasparc can issue 1 - 4 insns per cycle; here we assume
+;; four insns/cycle, and hence multiply all costs by four.
+
+;; Memory delivers its result in three cycles to IU, three cycles to FP
+(define_function_unit "memory" 1 0
+  (and (eq_attr "type" "load,fpload")   (eq_attr "cpu" "ultrasparc")) 12 4)
+(define_function_unit "memory" 1 0
+  (and (eq_attr "type" "store,fpstore") (eq_attr "cpu" "ultrasparc"))  4 4)
+(define_function_unit "ieu" 1 0
+  (and (eq_attr "type" "ialu")          (eq_attr "cpu" "ultrasparc"))  1 2)
+(define_function_unit "ieu" 1 0
+  (and (eq_attr "type" "shift")         (eq_attr "cpu" "ultrasparc"))  1 4)
+(define_function_unit "ieu" 1 0
+  (and (eq_attr "type" "cmove")         (eq_attr "cpu" "ultrasparc"))  8 4)
+
+;; Timings; throughput/latency
+;; ?? FADD     1/3    add/sub, format conv, compar, abs, neg
+;; ?? FMUL     1/3
+;; ?? FDIVs    1/12
+;; ?? FDIVd    1/22
+;; ?? FSQRTs   1/12
+;; ?? FSQRTd   1/22
+
+(define_function_unit "fp" 1 0
+  (and (eq_attr "type" "fp")       (eq_attr "cpu" "ultrasparc")) 12 2)
+(define_function_unit "fp" 1 0
+  (and (eq_attr "type" "fpcmp")    (eq_attr "cpu" "ultrasparc"))  8 2)
+(define_function_unit "fp" 1 0
+  (and (eq_attr "type" "fpmul")    (eq_attr "cpu" "ultrasparc")) 12 2)
+(define_function_unit "fp" 1 0
+  (and (eq_attr "type" "fpdivs")   (eq_attr "cpu" "ultrasparc")) 48 2)
+(define_function_unit "fp" 1 0
+  (and (eq_attr "type" "fpdivd")   (eq_attr "cpu" "ultrasparc")) 88 2)
+(define_function_unit "fp" 1 0
+  (and (eq_attr "type" "fpsqrt")   (eq_attr "cpu" "ultrasparc")) 48 2)
 \f
 ;; Compare instructions.
 ;; This controls RTL generation and register allocation.
--- sparc.h.orig	Tue Aug 19 00:45:06 1997
+++ sparc.h	Tue Aug 19 00:45:06 1997
@@ -2707,7 +2707,7 @@
 
 #define RTX_COSTS(X,CODE,OUTER_CODE)			\
   case MULT:						\
-    return (TARGET_V8 || TARGET_SPARCLITE || TARGET_V9) \
+    return (TARGET_V8 || TARGET_SPARCLITE)              \
 	? COSTS_N_INSNS (5) : COSTS_N_INSNS (25);	\
   case DIV:						\
   case UDIV:						\


As David S. Miller recently commented, it is rather difficult to
accurately describe the UltraSPARC pipeline for gcc.

- UltraSPARC can issue up to 4 insns/cycle.
- Out of these 4
  * two can be ALU and/or branch (branch can only be in the first three)
    -     of which only one can be a shift
    - and of which only one can be a condition-code-setting op
  * one can be a load/store
  * two can be fp ops.
- Integer multiplication entirely stalls the pipeline for 4 up to
  18 (SMUL), 19 (UMUL), 34 (64-bit MULX) cycles, depending on the
  operands, hence my modification in sparc.h, could even be more
  aggressive about it (increase COSTS_N_INSNS).

With the floating point benchmark David Miller posted some days ago,
the results are as follows (on an Ultra 1/140):

gcc -O2 -mcpu=supersparc			12.35s
gcc -O2 -mcpu=cypress				12.68s
gcc -O2 -mcpu=ultrasparc			9.80s
cc -xO3 -xtarget=ultra1/140 -xarch=v8plus	8.75s
[Another commercial compiler]			9.80s

*HOWEVER*, when tested with other programs not using floating point,
the -mcpu=supersparc wins slightly over -mcpu=ultrasparc or is on par.

Any measurements or corrections or improvements are welcome.

Christian

-- 
Christian.Kuehnke@Informatik.Uni-Oldenburg.DE   | Tel.: +49 441 592 652  (home)
                                                | Tel.: +49 441 798 2978 (work)
                                                | Fax : +49 441 798 2980 (work)

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

end of thread, other threads:[~1997-08-21  5:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-21  4:52 fixing the c++/f77 circular dependency Doug Evans
1997-08-21  4:54 ` Ultrasparc addition for sparc.md (fwd) Jeffrey A Law
1997-08-21  5:21 ` f/runtime/Makefile.in: mclock_.o left out of libU77 Jeffrey A Law
1997-08-21  5:21 ` mdbench for g77 & f2c+gcc Oleg Krivosheev
  -- strict thread matches above, loose matches on Subject: below --
1997-08-21  3:05 Ultrasparc addition for sparc.md (fwd) Oleg Krivosheev

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).