This is the mail archive of the
mailing list for the GCC project.
Re: RFC: reload unit tests (Was: [Bug optimization/15265] New:delete_output_reload deletes necessary insn) (fwd)
- From: Roger Sayle <roger at eyesopen dot com>
- To: Joern Rennecke <joern dot rennecke at superh dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 May 2004 22:11:38 -0600 (MDT)
- Subject: Re: RFC: reload unit tests (Was: [Bug optimization/15265] New:delete_output_reload deletes necessary insn) (fwd)
On Wed, 26 May 2004, Joern Rennecke wrote:
> A problem with reload is that it is very hard to test specifically,
> since C code test you write tends look differently at reload
> time in different compiler versions. I therefore have set out
> to feed raw rtl into reload, for cases which I recall required some
> work on reload to get right in the past.
I notice that nobody has commented on this yet, so I just thought
that I'd share my impressions: This is very cool. Congratulations.
One possibility would be, instead of a single rld-tst executable in
the gcc directory, to move this infrastructure into the testsuite
with a reload.exp driver. The directory is scanned for .c files
that each contain build_rtl() or some such defined entry point,
that then gets linked with a variation of your main/init_once and
GCC's libbackend.a. The dejagnu TCL can handle the target specific
nature of each test via the usual "target *-*-*" mechanism.
Of course, this approach to RTL-based unit testing could be generalized
to many of the RTL passes. "dg-do reload" and "dg-do reg-stack"? :>