https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The(In reply to Haochen Jiang from comment #3)
> Adding them are quite straightforward.

I guess so. Note: this PR is about the #define in gcc/config/i386, only.

> But I am not quite sure how the whole
> libgomp patch works.

OpenMP has selectors which permits to choose different functions or OpenMap
directives. Several can be evaluated at compile time , some only at runtime.

example (syntax probably not completely right):
 ... match(implementation={arch(x86_64),isa(sse4)})

Here, it can be evaluated at compile time which is done via the function 

TARGET_OMP_DEVICE_KIND_ARCH_ISA

For some, runtime checks are more useful and I am also not sure whether
something like cpuid would make more sense here (in general and especially for
the run-time selector).

But that's a separate issue to this PR.

> Is the patch attempt to check whether it is a perfect match for each ISA
> detected from a hardware? If that is the case, we need them to be added.
> BTW, under this scenario, no need to add an if clause for macro __EVEX512__
> and __EVEX256__ in that patch since those two are not true ISAs.

Something like that. It is also more for completeness and consistency.

For OpenMP we just state:
https://gcc.gnu.org/onlinedocs/libgomp/OpenMP-Context-Selectors.html

which is rather generic for i386/x86_64. We cpuld do less, but the target hook
made it easy to support all of them... I don't think anyone will use
avx10.1-256 as isa context selector with OpenMP.

Reply via email to