This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/4] Initial version of RTL frontend


On 05/10/2016 08:13 AM, David Malcolm 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.
Fundamentally all this stuff is target dependent. Trying to read in an x86-64 generated dump into an aarch64 targeted compiler is a waste of time/effort. THe number of things you're going to stumble over are innumerable.

I think we lay down the law that RTL dumps are target specific. There probably should be some kind of metadata emitted in the dump file which identifies the target and if we try to read in the wrong stuff, we get a nice error.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]