On 09/23/15 14:58, Nathan Sidwell wrote:
On 09/23/15 14:51, Bernd Schmidt wrote:
On 09/23/2015 08:42 PM, Nathan Sidwell wrote:

As I feared, builtin folding occurs in several places.  In particular
its first call is very early on in the host compiler, which is far too
soon.

We have to defer folding until we know whether we're doing host or
device compilation.

Doesn't something like "symtab->state >= EXPANSION" give you that?

I've tried limiting expansion by checking symtab->state. I have been unable to succeed.

It either expands too early in the host compiler, or it doesn't get expanded at all and one ends up with an RTL call to the library function. For instance there doesn't appear to be call to fold builtins when state == EXPANSION. lesser values are present in the host compiler before LTO write out, AFAICT.

nathan

Reply via email to