On Mon, Jun 16, 2014 at 11:52 PM, Mike Stump <mikest...@comcast.net> wrote: > On Jun 16, 2014, at 10:49 AM, Bernd Schmidt <ber...@codesourcery.com> wrote: >> >> There are two reasons why I can't do this in the frontends - one, Joseph has >> already rejected a C frontend patch, > > I’d like to think there is an acceptable way to get the right memory space on > things... > >> 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. > > Ah yes, that would do it, thanks. I can see my port as an offload target… > I’ll have to keep on eye on OpenACC and gcc.
But then IMHO using the gimplifier to do this fixup is wrong. Please add those required ADDR_SPACE_CONVERT_EXPRs in your pass manually. After all you also have to adjust types of MEM_REFs and possibly types of pointer variables (and pointer sizes?). Richard.