[PATCH] Add "__RTL" to cc1 (v2)

David Malcolm dmalcolm@redhat.com
Fri Oct 14 19:25:00 GMT 2016


On Fri, 2016-10-14 at 11:33 +0200, Richard Biener wrote:
> On Thu, Oct 13, 2016 at 3:51 PM, Bernd Schmidt <bschmidt@redhat.com>
> wrote:
> > On 10/13/2016 03:49 PM, Richard Biener wrote:
> > > 
> > > Does it really run a single pass only?  Thus you can't do a { dg
> > > -do run }
> > > test
> > > with __RTL?
> > 
> > 
> > I think that's really not the intended use-case. To my mind this is
> > for
> > unit-testing: ensuring that a given rtl pass performs the expected
> > transformation on an input.
> 
> Ok, so at least for the GIMPLE FE side I thought it's useful to allow
> a correctness verification with something simpler than pattern
> matching
> on the pass output.  By means of doing runtime verification of an
> expected
> result (this necessarily includes running followup passes as we have
> to
> generate code).  I don't see why this shouldn't apply to __RTL -- it
> might
> be more difficult to get __RTL testcases to the point where they emit
> assembly of course.
> 
> OTOH the question then still is what's the default behavior if you do
> _not_
> specify a "single pass to run".

As noted elsewhere, the current behavior is that it merely parses the
function and ignores it - and that's a bug in the current
implementation.

The behavior probably should be that it runs the remainder of the RTL
passes from some specified point, and generates valid assembler (so
that we can have dg-do DejaGnu tests).



More information about the Gcc-patches mailing list