public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Trevor Saunders <tbsaunde@tbsaunde.org>
Cc: David Malcolm <dmalcolm@redhat.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: (patch,rfc) s/gimple/gimple */
Date: Fri, 18 Sep 2015 13:51:00 -0000	[thread overview]
Message-ID: <CAFiYyc1PVOaB9bBYrxa2Ekq3hfpMzimDujUG4brivFAAxuWegw@mail.gmail.com> (raw)
In-Reply-To: <20150918133200.GA22271@tsaunders-iceball.corp.tor1.mozilla.com>

On Fri, Sep 18, 2015 at 3:32 PM, Trevor Saunders <tbsaunde@tbsaunde.org> wrote:
> On Wed, Sep 16, 2015 at 03:11:14PM -0400, David Malcolm wrote:
>> On Wed, 2015-09-16 at 09:16 -0400, Trevor Saunders wrote:
>> > Hi,
>> >
>> > I gave changing from gimple to gimple * a shot last week.  It turned out
>> > to be not too hard.  As you might expect the patch is huge so its
>> > attached compressed.
>> >
>> > patch was bootstrapped + regtested on x86_64-linux-gnu, and run through
>> > config-list.mk.  However I needed to update it some for changes made
>> > while testing.  Do people want to make this change now?  If so I'll try
>> > and commit the patch over the weekend when less is changing.
>>
>>
>> FWIW there are some big changes in gcc/tree-vect-slp.c:vectorizable_load
>> that looks like unrelated whitespace changes, e.g. the following (and
>> there are some followup hunks).  Did something change underneath, or was
>> there a stray whitespace cleanup here?  (I skimmed through the patch,
>> and this was the only file I spotted where something looked wrong)
>
> yeah, it was a stray whitespace cleanup, but I reverted it.
>
> Given the few but only positive comments I've seen I'm planning to
> commit this over the weekend.

Thanks a lot!

If you are still in a refactoring mood then I have sth else here.  When
streamlining the gimple accessors I noticed the glaring const-correctness
issue in

/* Return a pointer to the LHS of assignment statement GS.  */

static inline tree *
gimple_assign_lhs_ptr (const gassign *gs)
{
  return const_cast<tree *> (&gs->op[0]);
}

and was thinking to either "fix" it by removing the 'const' or by
merging gimple_assign_lhs and gimple_assign_lhs_ptr into

static inline const tree&
gimple_assign_lhs (const gassign *);

static inline tree&
gimple_assign_lhs (gassign *);

thus forgo X() vs. X_ptr() by using const/non-const references
as return values.  It's a little cost on the simple accessor
(extra dereference in the caller) but a cleaner API.

It would also preserve constness of users of the _ptr variant
if they don't end up modifying the thing.

Did I mention I never liked the "_ptr" notion?

Richard.

> Trev
>

  reply	other threads:[~2015-09-18 13:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16 13:22 Trevor Saunders
2015-09-16 14:19 ` Richard Biener
2015-09-16 19:25 ` David Malcolm
2015-09-18 13:38   ` Trevor Saunders
2015-09-18 13:51     ` Richard Biener [this message]
2015-09-21 20:39       ` Richard Sandiford
2015-09-22  6:53         ` Trevor Saunders
2015-09-22 11:42         ` Richard Biener
2015-09-22 12:02           ` Richard Biener
2015-09-18 15:37     ` Jeff Law
2015-09-20  2:03       ` Trevor Saunders
2015-09-20  6:38         ` Jeff Law
2015-09-23 17:57         ` Thomas Schwinge
2015-09-24  9:51         ` Thomas Schwinge
2015-09-26  7:10           ` Trevor Saunders

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=CAFiYyc1PVOaB9bBYrxa2Ekq3hfpMzimDujUG4brivFAAxuWegw@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tbsaunde@tbsaunde.org \
    /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).