This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Instructions vs Expressions in the backend (was Re: RFA: Rework FOR_BB_INSNS iterators)
- From: Jeff Law <law at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: Oleg Endo <oleg dot endo at t-online dot de>, Steven Bosscher <stevenb dot gcc at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, rdsandiford at googlemail dot com
- Date: Fri, 27 Jun 2014 09:38:34 -0600
- Subject: Re: Instructions vs Expressions in the backend (was Re: RFA: Rework FOR_BB_INSNS iterators)
- Authentication-results: sourceware.org; auth=none
- References: <87vbscppva dot fsf at talisman dot default> <CABu31nPovtFLwmOAuiqT5EadJZCqg+U7RqOMYAZimf3ykVE=OA at mail dot gmail dot com> <87d2ehq3p6 dot fsf at talisman dot default> <1403549659 dot 16446 dot 43 dot camel at surprise> <1403555889 dot 27443 dot 121 dot camel at yam-132-YW-E178-FTW> <87bnthgwku dot fsf at talisman dot default> <53AB336E dot 6030701 at redhat dot com> <1403879160 dot 21706 dot 54 dot camel at 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