public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Eric Botcazou <ebotcazou@adacore.com>
To: Jeff Law <law@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [patch 4/6] scalar-storage-order merge: bulk
Date: Tue, 20 Oct 2015 16:35:00 -0000	[thread overview]
Message-ID: <4969268.kJ6LN57gWv@polaris> (raw)
In-Reply-To: <561D2C45.60007@redhat.com>

> I suspect there are many comments that we should update as a result of
> this work.  Essentially there's many throughout GCC of the form "On a
> big-endian target" and the like.  With these changes it's more a
> property of the data -- the vast majority of the time the data's
> property is the same as the target, but with this patch it can vary.
> 
> I just happened to spot one in varasm.c::output_constructor_bitfield, as
> the comment started shortly after some code this patch changes.  No
> doubt there's others.  I'm torn whether or not to ask you to scan and
> update them.  It's a lot of work and I'm not terribly sure how valuable
> it'll generally be.

I have adjusted the output_constructor_bitfield case to "For big-endian data".
The cases in expmed.c have naked "big-endian" or "big-endian case" so are OK.
I have changed 2 sibling cases in expr.c but left the others unchanged since 
they are about calling conventions.  I think that's pretty much it for the 
files that are touched by the patch.

> Thanks for not trying too hard to optimize this stuff, it makes the
> expmed.c patches (for example) a lot easier to work through :-)
> 
> I didn't even try to verify you've got all the paths covered.  I mostly
> tried to make sure the patch didn't break existing code.  I'm going to
> assume that the patch essentially works and that if there's paths
> missing where reversal is needed that you'll take care of them as
> they're exposed.

Yes, the main issue in expr.c & expmed.c is getting all the paths covered.
I have run the compile and execute C torture testsuites with -fsso-struct set 
to big-endian on x86-64 so I'm relatively confident, but that's not a proof.
And one of the design constraints of the implementation was to change nothing 
to the default endianness support, so I'm more confident about the absence of 
breakages (IIRC we didn't get a single PR for a breakage with the AdaCore 
compilers while we did get a few for cases where the data was not reversed).

> I'm a bit dismayed at the number of changes to fold-const.c, but
> presumably there's no good way around them.  I probably would have
> looked for a way to punt earlier (that may not be trivial though).
> Given you've done the work, no need to undo it now.

Yes, that's the bitfield optimization stuff, so it depends on the endianness.
Initially the changes were even more pervasive because I tried to optimize 
e.g. equality comparisons of 2 bitfields with reverse endianness in there.
But this broke the "all accesses to a scalar in memory are done with the same 
storage order" invariant and was thus causing annoying issues later on.

> I think this patch is fine.

OK, thanks for the thorough review.  All the parts have been approved, modulo 
the C++ FE part.  As I already explained, this part is very likely incomplete 
(based on the changes that were made in the Ada FE proper) and only makes sure 
that C code compiled by the C++ compiler works as intended, but nothing more.
So I can propose to install only the generic, C and Ada changes for now and to 
explicitly disable the feature for C++ until a more complete implementation of 
the C++ FE part is written.  I'm OK to work on it but I'll probably need help.

-- 
Eric Botcazou

  reply	other threads:[~2015-10-20 16:34 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 10:57 [patch 0/6] scalar-storage-order merge (2) Eric Botcazou
2015-10-06 11:01 ` [patch 1/6] scalar-storage-order merge: Ada front-end Eric Botcazou
2015-10-12 22:23   ` Jeff Law
2015-10-06 11:02 ` [patch 2/6] scalar-storage-order merge: C front-end Eric Botcazou
2015-10-13 11:32   ` Jeff Law
2015-10-19  8:50     ` Eric Botcazou
2015-10-28 16:48   ` Joseph Myers
2015-10-28 17:32     ` Jeff Law
2015-10-28 22:34     ` Eric Botcazou
2015-10-28 23:36       ` Mike Stump
2015-10-29  0:23         ` Joseph Myers
2015-10-30  8:59         ` Eric Botcazou
2015-10-30 14:50           ` Mike Stump
2015-10-06 11:03 ` [patch 3/6] scalar-storage-order merge: C++ front-end Eric Botcazou
2015-10-12 22:27   ` Jeff Law
2015-10-06 11:05 ` [patch 4/6] scalar-storage-order merge: bulk Eric Botcazou
2015-10-13 16:07   ` Jeff Law
2015-10-20 16:35     ` Eric Botcazou [this message]
2015-10-06 11:06 ` [patch 5/6] scalar-storage-order merge: rest Eric Botcazou
2015-10-06 11:09   ` Eric Botcazou
2015-10-13 16:44   ` Jeff Law
2015-10-06 11:08 ` [patch 6/6] scalar-storage-order merge: testsuite Eric Botcazou
2015-10-12 22:26   ` Jeff Law
2015-10-09 11:33 ` [patch 0/6] scalar-storage-order merge (2) Bernd Schmidt
2015-10-13 17:33   ` Eric Botcazou
2015-10-14 15:25     ` Trevor Saunders
2015-10-14 15:33       ` Jeff Law
2015-11-08 18:30 ` Eric Botcazou
  -- strict thread matches above, loose matches on Subject: below --
2015-06-16  8:46 [patch 0/6] scalar-storage-order merge Eric Botcazou
2015-06-16  9:24 ` [patch 4/6] scalar-storage-order merge: bulk Eric Botcazou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4969268.kJ6LN57gWv@polaris \
    --to=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).