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: Regimplification enhancements 1/3


On 06/16/2014 07:26 PM, Mike Stump wrote:
On Jun 16, 2014, at 3:56 AM, Bernd Schmidt <bernds@codesourcery.com>
wrote:
For the ptx port, I've needed to write a new pass which ensures all
objects go into address spaces as required by the machine.

I have such a machine and I’ve always approached the problem from the
front end side.  I ensure the right space up front, and if someone
doesn’t get the right space, I add code to let the port choose the
space for that object (literal constants I wanna play around with
some for example).  On my port there is no changing spaces once one
is selected.

There are two reasons why I can't do this in the frontends - one, Joseph has already rejected a C frontend patch, and two, this needs to work with OpenACC offloading - i.e. code is initially compiled by an x86 host compiler, then a ptx lto1 reads it in and needs to make it valid for that target.

I’m curious if your port needs to change a space (and why, I’m
wondering if I can improve my port by changing spaces)?

No, address spaces are fixed for globals, locals, and rodata. But in the early stages of the compiler, for the above reasons we need to pretend that there aren't any address spaces involved, and only the lower-addr-spaces pass moves everything to the right place.


Bernd


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