public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: Oleg Endo <oleg.endo@t-online.de>,
	Steven Bosscher <stevenb.gcc@gmail.com>,
	       GCC Patches <gcc-patches@gcc.gnu.org>,
	rdsandiford@googlemail.com
Subject: Re: Instructions vs Expressions in the backend (was Re: RFA: Rework FOR_BB_INSNS iterators)
Date: Fri, 27 Jun 2014 15:38:00 -0000	[thread overview]
Message-ID: <53AD8FFA.50906@redhat.com> (raw)
In-Reply-To: <1403879160.21706.54.camel@surprise>

On 06/27/14 08:26, David Malcolm wrote:
>
> Yeah, that's probably my primary concern here.  The patch kit is going
> to be big (currently at 133 patches [1]), and so I want something that
> we can sanely keep track of, that is easily reviewable, and will be as
> easy as possible to merge.
>
> i.e. I don't want to get bogged down in a big revamp of the rest of the
> RTL interface if I can help it.
Precisely.  After revamping the objects at the toplevel of the insn 
chain, we can evaluate what project makes the most sense to tackle.

>
> If it's desirable to actually make insns be a separate class, I'm
> considering the goal of making the attributes of insns become actual
> fields, something like:
I think having the toplevel objects in the insn chain as a separate 
class makes sense.  My biggest concerns are a variety of implementation 
details like is there code that wants to use the various rtl walkers on 
those toplevel objects.

Which (and I hate to say it) makes me wonder if this is a two step 
process.  First step is to have the subclass style implementation.  Then 
we look deeper at what would need to change to break those toplevel 
objects out into a distinct class.  In theory if we do things right, we 
leverage the new types and static checking to catch all the "don't 
assume the toplevel objects in the insn chain are rtxs" issues.

Two stage also gives others a chance to chime in if they're aware of 
good reasons not to make the change.

>
> But even if we don't get there and simply keep insns as subclasses of
> rtx, I think that having insn-handling code marked as such in the
> type-system is a win from a readability standpoint.
Absolutely.

>
> Hope these ideas sound sane
They do.  I think we're very much on the same page here.

Jeff

  reply	other threads:[~2014-06-27 15:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-07 17:54 RFA: Rework FOR_BB_INSNS iterators Richard Sandiford
2014-06-07 20:26 ` Steven Bosscher
2014-06-09 19:32   ` Richard Sandiford
2014-06-23 19:01     ` Instructions vs Expressions in the backend (was Re: RFA: Rework FOR_BB_INSNS iterators) David Malcolm
2014-06-23 20:38       ` Oleg Endo
2014-06-25  9:36         ` Richard Sandiford
2014-06-25 20:39           ` Jeff Law
2014-06-27 14:28             ` David Malcolm
2014-06-27 15:38               ` Jeff Law [this message]
2014-06-27  7:36           ` Oleg Endo
2014-06-27 14:35           ` David Malcolm
2014-06-25  8:54       ` Richard Sandiford
2014-06-25 20:46         ` Jeff Law
2014-06-25 21:24           ` Steven Bosscher

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=53AD8FFA.50906@redhat.com \
    --to=law@redhat.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=oleg.endo@t-online.de \
    --cc=rdsandiford@googlemail.com \
    --cc=stevenb.gcc@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).