public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Trevor Saunders <tbsaunde@tbsaunde.org>
To: Richard Biener <richard.guenther@gmail.com>,
	David Malcolm <dmalcolm@redhat.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	rdsandiford@googlemail.com
Subject: Re: (patch,rfc) s/gimple/gimple */
Date: Tue, 22 Sep 2015 06:53:00 -0000	[thread overview]
Message-ID: <20150922002946.GC4050@tsaunders-iceball.corp.tor1.mozilla.com> (raw)
In-Reply-To: <877fnj6017.fsf@googlemail.com>

On Mon, Sep 21, 2015 at 08:32:36PM +0100, Richard Sandiford wrote:
> Richard Biener <richard.guenther@gmail.com> writes:
> > 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 *);
> 
> AIUI const_tree (like const_rtx) only protects the top-level tree.
> This is something I always hoped to change for rtl one day, but fixing
> all the fallout would be an incredibly dull task...
> 
> I suppose protecting the top level is still better than nothing though.

yeah, it seems like having things at least be standard const correct
here would be nice.  That said some of this looks interesting, it looks
like the use def data structures keep pointers to pointers to trees in
the middle of gimple objects.  That seems kind of odd, I guess the idea
is that that way sometimes the use def data structure will automatically
stay up to date?

Trev

> 
> Thanks,
> Richard
> 

  reply	other threads:[~2015-09-22  0:29 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
2015-09-21 20:39       ` Richard Sandiford
2015-09-22  6:53         ` Trevor Saunders [this message]
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=20150922002946.GC4050@tsaunders-iceball.corp.tor1.mozilla.com \
    --to=tbsaunde@tbsaunde.org \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rdsandiford@googlemail.com \
    --cc=richard.guenther@gmail.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).