public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, alpha]: Default to full IEEE compliance mode for Go language.
@ 2012-01-29 18:22 Uros Bizjak
  2012-01-29 20:41 ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Uros Bizjak @ 2012-01-29 18:22 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev, Richard Henderson

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

On Fri, Jan 20, 2012 at 12:39 AM, Ian Lance Taylor <iant@google.com> wrote

>> Attached patch adds -mieee to tests that need full IEEE compliance to
>> pass. While working on patch, I have noticed that go-test.exp doesn't
>> pass DEFAULT_GOCFLAGS to go_target_compile procedure in expected
>> format (so, these simply get ignored). With this issue fixed, we can
>> add -mieee to DEFAULT_GOCFLAGS. Tests, compiled through torture
>> procedure, expects their special flags in a separate driver file.
>
> And I just have to repeat that this patch is an ugly ugly hack, since
> -mieee should be the default.  Perhaps we should investigate having
> gcc/go/gospec.c or gcc/go/lang-specs.h somehow add -mieee for those
> targets which require it.

After trying some other approaches (including adding libgo.spec,
similar to java soultion), I think that attached patch is the most
straight-forward solution to enable full IEEE compliance to Go
language.

2012-01-29  Uros Bizjak  <ubizjak@gmail.com>

	* config/alpha/alpha.c (alpha_option_overrride): Default to
	full IEEE compliance mode for Go language.

Tested on alphaev68-pc-linux-gnu, where it fixes all go testsuite
failures that depend of full IEEE compliance.

OK for mainline?

Uros.

[-- Attachment #2: a.diff.txt --]
[-- Type: text/plain, Size: 555 bytes --]

Index: config/alpha/alpha.c
===================================================================
--- config/alpha/alpha.c	(revision 183675)
+++ config/alpha/alpha.c	(working copy)
@@ -250,6 +250,11 @@ alpha_option_override (void)
   SUBTARGET_OVERRIDE_OPTIONS;
 #endif
 
+  /* Default to full IEEE compliance mode for Go language.  */
+  if (strcmp (lang_hooks.name, "GNU Go") == 0
+      && !(target_flags_explicit & MASK_IEEE))
+    target_flags |= MASK_IEEE;
+
   alpha_fprm = ALPHA_FPRM_NORM;
   alpha_tp = ALPHA_TP_PROG;
   alpha_fptm = ALPHA_FPTM_N;

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

* Re: [PATCH, alpha]: Default to full IEEE compliance mode for Go language.
  2012-01-29 18:22 [PATCH, alpha]: Default to full IEEE compliance mode for Go language Uros Bizjak
@ 2012-01-29 20:41 ` Richard Henderson
  2012-01-30  0:25   ` Robert Dewar
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2012-01-29 20:41 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: Ian Lance Taylor, gcc-patches, gofrontend-dev

On 01/30/2012 05:22 AM, Uros Bizjak wrote:
> 2012-01-29  Uros Bizjak  <ubizjak@gmail.com>
> 
> 	* config/alpha/alpha.c (alpha_option_overrride): Default to
> 	full IEEE compliance mode for Go language.

I'm not keen on this, but I also don't have an alternative to suggest.

Ok.


r~

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

* Re: [PATCH, alpha]: Default to full IEEE compliance mode for Go language.
  2012-01-29 20:41 ` Richard Henderson
@ 2012-01-30  0:25   ` Robert Dewar
  2012-02-04 15:05     ` Gerald Pfeifer
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Dewar @ 2012-01-30  0:25 UTC (permalink / raw)
  To: Richard Henderson
  Cc: Uros Bizjak, Ian Lance Taylor, gcc-patches, gofrontend-dev

On 1/29/2012 3:40 PM, Richard Henderson wrote:
> On 01/30/2012 05:22 AM, Uros Bizjak wrote:
>> 2012-01-29  Uros Bizjak<ubizjak@gmail.com>
>>
>> 	* config/alpha/alpha.c (alpha_option_overrride): Default to
>> 	full IEEE compliance mode for Go language.
>
> I'm not keen on this, but I also don't have an alternative to suggest.
>
> Ok.

It's always worrisome for gcc based languages to default to horrible
performance, it means that many benchmarks will be run only with this
horrible performance.

We have seen instances in which GNAT performs poorly in benchmarks
because it is run with -O0, and competing compilers default to
something more similar to -O1. In one case, when we pointed this
out, the response was that company mandated policies insisted on
all benchmarks being run with default options.

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

* Re: [PATCH, alpha]: Default to full IEEE compliance mode for Go language.
  2012-01-30  0:25   ` Robert Dewar
@ 2012-02-04 15:05     ` Gerald Pfeifer
  2012-02-04 15:15       ` Robert Dewar
  0 siblings, 1 reply; 5+ messages in thread
From: Gerald Pfeifer @ 2012-02-04 15:05 UTC (permalink / raw)
  To: Robert Dewar
  Cc: Richard Henderson, Uros Bizjak, Ian Lance Taylor, gcc-patches,
	gofrontend-dev

On Sun, 29 Jan 2012, Robert Dewar wrote:
>>> 	* config/alpha/alpha.c (alpha_option_overrride): Default to
>>> 	full IEEE compliance mode for Go language.
> It's always worrisome for gcc based languages to default to horrible
> performance, it means that many benchmarks will be run only with this
> horrible performance.

Yes, but this is alpha-specific, and I don't think relevant benchmarks
are still done on that platform. ;-)

Gerald

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

* Re: [PATCH, alpha]: Default to full IEEE compliance mode for Go language.
  2012-02-04 15:05     ` Gerald Pfeifer
@ 2012-02-04 15:15       ` Robert Dewar
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Dewar @ 2012-02-04 15:15 UTC (permalink / raw)
  To: Gerald Pfeifer
  Cc: Richard Henderson, Uros Bizjak, Ian Lance Taylor, gcc-patches,
	gofrontend-dev

On 2/4/2012 10:06 AM, Gerald Pfeifer wrote:
> On Sun, 29 Jan 2012, Robert Dewar wrote:
>>>> 	* config/alpha/alpha.c (alpha_option_overrride): Default to
>>>> 	full IEEE compliance mode for Go language.
>> It's always worrisome for gcc based languages to default to horrible
>> performance, it means that many benchmarks will be run only with this
>> horrible performance.
>
> Yes, but this is alpha-specific, and I don't think relevant benchmarks
> are still done on that platform. ;-)

We certainly still have customers using that platform who are definitely
concerned with performance, and not willing to step forward to ia64 as
the official successor (if they are using VMS they have no other choice).
>
> Gerald

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

end of thread, other threads:[~2012-02-04 15:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-29 18:22 [PATCH, alpha]: Default to full IEEE compliance mode for Go language Uros Bizjak
2012-01-29 20:41 ` Richard Henderson
2012-01-30  0:25   ` Robert Dewar
2012-02-04 15:05     ` Gerald Pfeifer
2012-02-04 15:15       ` Robert Dewar

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