[alpha] : Default to full IEEE compliance mode for Go language.

Submitted by Uros Bizjak on Jan. 29, 2012, 6:22 p.m.

Details

Message ID CAFULd4YMDc6rrdGJGD-2nScjR75giKiyryJXhBBoQ27oE2VH+A@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Jan. 29, 2012, 6:22 p.m.
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.

Comments

Richard Henderson Jan. 29, 2012, 8:40 p.m.
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~
Robert Dewar Jan. 30, 2012, 12:25 a.m.
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.
Gerald Pfeifer Feb. 4, 2012, 3:06 p.m.
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
Robert Dewar Feb. 4, 2012, 3:15 p.m.
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

Patch hide | download patch | download mbox

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;