Jan Beulich via llvm-dev
2020-Jul-13 07:47 UTC
[llvm-dev] New x86-64 micro-architecture levels
On 13.07.2020 09:40, Florian Weimer wrote:> * Richard Biener: >>> 2. I have a library with AVX2 and FMA, which directory should it go? >> >> Eventually GCC/gas can annotate objects with the lowest architecture >> level that is applicable? > > H.J. has patches for ELF program properties. I think > GNU_PROPERTY_X86_ISA_1_NEEDED would convey this information. This > proposal and the glibc patches are independent of that.>From (partly just halfway) recent discussions with H.J. I gainedthe understanding that the piece we're aiming at getting to work properly is the recording of GNU_PROPERTY_X86_FEATURE_2_*, not so much GNU_PROPERTY_X86_ISA_1_*. If the ISA one is to be used as a basis here, a lot of new flags will need adding (and properly setting) first, I think. Jan
H.J. Lu via llvm-dev
2020-Jul-13 13:31 UTC
[llvm-dev] New x86-64 micro-architecture levels
On Mon, Jul 13, 2020 at 12:48 AM Jan Beulich <jbeulich at suse.com> wrote:> > On 13.07.2020 09:40, Florian Weimer wrote: > > * Richard Biener: > >>> 2. I have a library with AVX2 and FMA, which directory should it go? > >> > >> Eventually GCC/gas can annotate objects with the lowest architecture > >> level that is applicable? > > > > H.J. has patches for ELF program properties. I think > > GNU_PROPERTY_X86_ISA_1_NEEDED would convey this information. This > > proposal and the glibc patches are independent of that. > > From (partly just halfway) recent discussions with H.J. I gained > the understanding that the piece we're aiming at getting to work > properly is the recording of GNU_PROPERTY_X86_FEATURE_2_*, not > so much GNU_PROPERTY_X86_ISA_1_*. If the ISA one is to be used as > a basis here, a lot of new flags will need adding (and properly > setting) first, I think. >We can update GNU_PROPERTY_X86_ISA_1_* as needed. -- H.J.
Jakub Jelinek via llvm-dev
2020-Jul-13 13:53 UTC
[llvm-dev] New x86-64 micro-architecture levels
On Mon, Jul 13, 2020 at 06:31:31AM -0700, H.J. Lu via Gcc wrote:> > > H.J. has patches for ELF program properties. I think > > > GNU_PROPERTY_X86_ISA_1_NEEDED would convey this information. This > > > proposal and the glibc patches are independent of that. > > > > From (partly just halfway) recent discussions with H.J. I gained > > the understanding that the piece we're aiming at getting to work > > properly is the recording of GNU_PROPERTY_X86_FEATURE_2_*, not > > so much GNU_PROPERTY_X86_ISA_1_*. If the ISA one is to be used as > > a basis here, a lot of new flags will need adding (and properly > > setting) first, I think. > > > > We can update GNU_PROPERTY_X86_ISA_1_* as needed.I am not really sure such properties are a good idea, it will be a maintainability nightmare (as it is on other OSes like Solaris). Think about function multiversioning, target attribute for just some functions, #pragma omp declare simd. How do you differentiate between using those on carefully written code that handles cpuid detection itself or uses compiler support for that, where we do not want to mark the objects in any way, they should work just fine even on K8, and cases where users want something like that? E.g. look for -mclear-hwcap stuff needed for Solaris because of that. Jakub