This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Wrong RTL instruction deleted
Florian Weimer wrote:
* Robert Dewar:
Using -fno-strict-aliasing throws away a lot of the additional
information the Ada front end can provide, compared to equivalent C
code. 8-(,
I know this is true theoretically, but I am dubious as to whether this
is true in practice. The only datapoint we have from a large customer
(whose code does not work in the absence of -fno-strict-aliasing, a
common state of affairs unfortunately), was that -O2 indeed had a
very significant gain over -01, but the loss in using -O2 with
-fno-strict-aliasing was negligible in comparison.
So I am inclined to think that, at least for our commercial product,
we would do better to set -fno-strict-aliasing by default, and then
suggest -fstrict-aliasing as a possible path to explore for the very
few users for whom performance at the margin is critical. Actually
in practice I think there are *so* many opportunities for more
valuable optimizations in the Ada case, that this is going to be
a rare situation.
Hmm, I think VIEW_CONVERT_EXPR could be a way to implement the
unspecified behavior in 5.2.10(9, 10) in a more deterministic manner.
That seems preferable anyway. I assume no one objects to the C code
in this instance "working" as expected :-)