[PATCH] D74387: [SYCL] Defer __float128 type usage diagnostics

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 6 16:22:11 PDT 2020


jdoerfert added a comment.

In D74387#1964483 <https://reviews.llvm.org/D74387#1964483>, @Fznamznon wrote:

> In D74387#1950593 <https://reviews.llvm.org/D74387#1950593>, @jdoerfert wrote:
>
> > This is needed for OpenMP as well. Does it make sense to include it in this patch or in another one?
>
>
> I thought OpenMP already has diagnostics for unsupported types (at least looking into this commit https://github.com/llvm/llvm-project/commit/123ad1969171d0b22d0c5d0ec23468586c4d8fa7). Am I wrong?
>  The diagnostic which I'm implementing here is stricter than existing OpenMP diagnostic, the main goal is do not emit unsupported type at all. Does OpenMP need such restriction as well?


OpenMP handling needs to be reverted/redone:

1. If no aux triple is available it just crashes.
2. If the unavailable type is not used in one of the pattern matched expressions it crashes (usually during instruction selection but not always). Try a call with long double arguments for example.

I'm not sure this patch fits the bill but what I was thinking we need is roughly:
If you have a expression with operands or function definition with return/argument types which are not supported on the target, mark the definition as unavailable with the type note you have.
We should especially allow members to have unavailable types if the member is not accessed. Memcpy like operations (=mapping) are OK though. I think this should be the same for OpenMP and Sycl (and HIP, and ...).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74387





More information about the cfe-commits mailing list