This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 4/4] Initial version of RTL frontend
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jeff Law <law at redhat dot com>,David Malcolm <dmalcolm at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 May 2016 20:05:00 +0200
- Subject: Re: [PATCH 4/4] Initial version of RTL frontend
- Authentication-results: sourceware.org; auth=none
- References: <1462394970-55471-1-git-send-email-dmalcolm at redhat dot com> <1462394970-55471-5-git-send-email-dmalcolm at redhat dot com> <1462889636 dot 11310 dot 6 dot camel at redhat dot com> <CAFiYyc2OAyi3r227V0rRor+f1J3FiSgi296T2LKJb9J+2Q9NJg at mail dot gmail dot com> <ce8894b5-d0cc-b125-71e3-1de59af566c1 at redhat dot com>
On May 10, 2016 7:02:33 PM GMT+02:00, Jeff Law <law@redhat.com> wrote:
>On 05/10/2016 08:17 AM, Richard Biener wrote:
>> On Tue, May 10, 2016 at 4:13 PM, David Malcolm <dmalcolm@redhat.com>
>wrote:
>>> On Wed, 2016-05-04 at 16:49 -0400, David Malcolm wrote:
>>> [...snip...]
>>>>
>>>> I wrote this by compiling a test.c with -fdump-rtl-all on
>>>> x86_64-pc-linux-gnu, and then attempting to load the state at each
>>>> pass, and then trying to run just one pass, and fixing bugs until
>the
>>>> dump output from each pass was the same as when running the pass
>from
>>>> cc1. I've only done this with a small subset of passes, and with a
>>>> very
>>>> simple test case, so I'm sure there are plenty of bugs and "x86_64
>>>> -isms"
>>>> remaining.
>>>
>>> [...snip...]
>>>
>>> On the subject of "x86_64-isms", a couple of issues I ran into when
>>> testing with --target=aarch64-linux-gnu:
>>>
>>> * roundtrip.exp fails due to different register names so e.g. this
>from
>>> x86_64:
>>>
>>> (reg:SI 5 di [ i ]))
>>>
>>> becomes this after roundtripping on aarch64:
>>>
>>> (reg:SI 5 x5 [ i ]))
>>>
>>> (i.e. "di" vs "x5" for register 5).
>>>
>>> * unknown modes e.g. this from x86_64:
>>>
>>> (reg:CCGC 17 flags)
>>>
>>> fails on aarch64 due to the lack of a "CCGC" mode.
>>
>> I expect most (if not all) RTL testcases will be target specific.
>Well, not if we take Bernd's idea and create a new backend for testing
>purposes. If we want to know/test what reload's doing, we cons up the
>appropriate RTL for that testing backend, set the right flags and call
>reload() then look at the result.
Hmm, I guess that some test cases rely on specific patterns being (not) present so we'd have one backend per testcase ... (Or .md file snippets per testcase).
Richard.
>Jeff