[PATCH] D109175: [openmp] Emit deferred diag only when device compilation presents

Wei Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 15 09:59:39 PDT 2021


weiwang added a comment.

In D109175#2989997 <https://reviews.llvm.org/D109175#2989997>, @yaxunl wrote:

> In D109175#2989823 <https://reviews.llvm.org/D109175#2989823>, @weiwang wrote:
>
>> In D109175#2987048 <https://reviews.llvm.org/D109175#2987048>, @jdoerfert wrote:
>>
>>> In D109175#2986782 <https://reviews.llvm.org/D109175#2986782>, @yaxunl wrote:
>>>
>>>> I agree with Johannes and Alexey that deferred diags are only needed when LangOpts.OMPTargetTriples.empty(). However, I am not sure whether it is only needed in device compilation.
>>>>
>>>> For other offloading languages like CUDA/HIP it is needed in both device and host compilation.
>>>
>>> Technically, we might even want to delay in host only mode for OpenMP, but that is something we can revisit (e.g., by dynamically setting a flag based on the directives we've seen).
>>> @yaxunl Should we for now check if there is any associated offload job?
>>
>> Shall we go ahead and get this change in and think about more longer term solution later?
>
> LGTM. This patch should be sufficient to limit deferred diags to OpenMP with offloading. Device compilation is covered by OpenMPIsDevice and host compilation is covered by !LangOpts.OMPTargetTriples.empty(). I will leave the decision to Johannes.

Thanks. @jdoerfert. Could you approve this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109175/new/

https://reviews.llvm.org/D109175



More information about the cfe-commits mailing list