[llvm-dev] New x86-64 micro-architecture levels
H.J. Lu via llvm-dev
llvm-dev at lists.llvm.org
Mon Jul 13 06:30:07 PDT 2020
On Sun, Jul 12, 2020 at 11:49 PM Florian Weimer <fweimer at redhat.com> wrote:
>
> * H. J. Lu:
>
> > Looks good. I like it.
>
> Thanks. What do you think about Level B? Should we keep it?
Please drop Level B.
> > My only concerns are
> >
> > 1. Names like “x86-100”, “x86-101”, what features do they support?
>
> I think we can add more diagnostic output to ld.so --help. My patch
> does not show individual CPU flags, but I agree this could be useful.
> (It's not needed for the legacy HWCAP subdirectories because in general,
> those are named & defined by the kernel, not by individually named CPU
> feature flags.)
>
> > 2. I have a library with AVX2 and FMA, which directory should it go?
> >
> > Can we pass such info to ld.so and ld.so prints out the best directory
> > name?
>
> I think this would require generating matching GNU property notes (list
> the CPU features required by the binary). Once we have that, we can add
I have turned on -mx86-used-note=yes by default for binutils 2.36.
I will add more ISAs bits after we determine which ISAs will be used.
But compilers need to generate GNU_PROPERTY_X86_ISA_1_NEEDED
property.
> something to binutils or indeed ld.so to analyze them and print the
> recommended directory. But I think this is something that could come
> later.
>
> We can also write a GCC header which looks at macros such as __AVX2__
> and prints a #warning with the recommended directory name. Checking for
> excess flags will be tricky in this context, though, and if we miss
> something, a wrong recommendation will be the result.
>
> Thanks,
> Florian
--
H.J.
More information about the llvm-dev
mailing list