From: "Markus Schöpflin" <no.spam@spam.spam>
Subject: Re: gnat 4.4.5 generates surprising code when enabling FP checks
Date: Fri, 08 Apr 2011 12:43:32 +0200
Date: 2011-04-08T12:43:32+02:00 [thread overview]
Message-ID: <inmosj$7dv$1@speranza.aioe.org> (raw)
In-Reply-To: 4d9df01c$0$7669$9b4e6d93@newsspool1.arcor-online.net
Am 07.04.2011 19:10, schrieb Georg Bauhaus:
> Since much of the generated code is a consequence of -gnatVA
> (which implies -gnatVf), shouldn't a smaller selection validity
> checking do the trick, i.e. if you exclude -gnatVf?
The point was to have floating point validity checks on, so using -gnatVaF
unfortunately is not an option.
The project in question used gcc 3.4 and was migrated to a newer gnat
version, resulting in a serious performance degradation which I'm currently
investigating.
I think I found the option which is responsible for the degradation (it's
-gnatVc which is implied by -gnatVa and whose behaviour seems to have
changed significantly for gcc 4.x).
The thing that surprised me was that the multiplication is actually
performed twice, I was kind of expecting it to be only done once.
Currently I'm thinking of taking a step backwards and check what the
project really needs in terms of validity checks in order to catch invalid
floats (INFs and NAN) as soon as possible.
It looks like using 'type FLOAT_T is new FLOAT range FLOAT'Range' instead
of unchecked IEEE floats with -gnatVa generates significantly better
assembler code, so we might be able to just use -gnatVfpr instead.
Regards,
Markus
prev parent reply other threads:[~2011-04-08 10:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-07 15:48 gnat 4.4.5 generates surprising code when enabling FP checks Markus Schöpflin
2011-04-07 17:10 ` Georg Bauhaus
2011-04-08 10:43 ` Markus Schöpflin [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox