mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
[OpenMP][FIX] Ensure the isa trait is evaluated last
Since isa can cause diagnostics we want it to be evaluated last to avoid the "unknown isa" warning if the rest of the selector wouldn't match anyway. That allows us to guard isa with arch properly. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D93785
This commit is contained in:
parent
7dbaeae0dc
commit
611ba4c14f
@ -1017,14 +1017,6 @@ __OMP_TRAIT_PROPERTY(device, kind, gpu)
|
||||
__OMP_TRAIT_PROPERTY(device, kind, fpga)
|
||||
__OMP_TRAIT_PROPERTY(device, kind, any)
|
||||
|
||||
__OMP_TRAIT_SELECTOR(device, isa, true)
|
||||
|
||||
// We use "__ANY" as a placeholder in the isa property to denote the
|
||||
// conceptual "any", not the literal `any` used in kind. The string we
|
||||
// we use is not important except that it will show up in diagnostics.
|
||||
OMP_TRAIT_PROPERTY(device_isa___ANY, device, device_isa,
|
||||
"<any, entirely target dependent>")
|
||||
|
||||
__OMP_TRAIT_SELECTOR(device, arch, true)
|
||||
|
||||
__OMP_TRAIT_PROPERTY(device, arch, arm)
|
||||
@ -1074,6 +1066,18 @@ __OMP_TRAIT_PROPERTY(user, condition, true)
|
||||
__OMP_TRAIT_PROPERTY(user, condition, false)
|
||||
__OMP_TRAIT_PROPERTY(user, condition, unknown)
|
||||
|
||||
|
||||
// Note that we put isa last so that the other conditions are checked first.
|
||||
// This allows us to issue warnings wrt. isa only if we match otherwise.
|
||||
__OMP_TRAIT_SELECTOR(device, isa, true)
|
||||
|
||||
// We use "__ANY" as a placeholder in the isa property to denote the
|
||||
// conceptual "any", not the literal `any` used in kind. The string we
|
||||
// we use is not important except that it will show up in diagnostics.
|
||||
OMP_TRAIT_PROPERTY(device_isa___ANY, device, device_isa,
|
||||
"<any, entirely target dependent>")
|
||||
|
||||
|
||||
#undef OMP_TRAIT_SET
|
||||
#undef __OMP_TRAIT_SET
|
||||
///}
|
||||
|
Loading…
Reference in New Issue
Block a user