New post-LTO OpenACC pass

Nathan Sidwell nathan@acm.org
Wed Sep 23 18:45:00 GMT 2015


On 09/23/15 08:58, Bernd Schmidt wrote:
> On 09/23/2015 02:14 PM, Nathan Sidwell wrote:
>> On 09/23/15 06:59, Bernd Schmidt wrote:
>>> On 09/22/2015 05:16 PM, Nathan Sidwell wrote:
>>>> +    if (gimple_call_builtin_p (call, BUILT_IN_ACC_ON_DEVICE))
>>>> +      /* acc_on_device must be evaluated at compile time for
>>>> +         constant arguments.  */
>>>> +      {
>>>> +        oacc_xform_on_device (call);
>>>> +        rescan = true;
>>>> +      }
>>>
>>> Is there a reason this is not done as part of pass_fold_builtins? (It
>>> looks like
>>> maybe adding this to fold_call_stmt in builtins.c would be sufficient
>>> too).


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.

nathan



More information about the Gcc-patches mailing list