[PATCH] [CodeGen] Teach X86_64ABIInfo about AVX512.

Bataev, Alexey a.bataev at hotmail.com
Thu May 21 19:57:06 PDT 2015

No problems

Best regards,
Alexey Bataev
Software Engineer
Intel Compiler Team

21.05.2015 19:48, John McCall пишет:
> ================
> Comment at: lib/CodeGen/TargetInfo.cpp:1634-1635
> @@ -1630,3 +1633,4 @@
>     unsigned getOpenMPSimdDefaultAlignment(QualType) const override {
> +    // FIXME: What about AVX512?
>       return getABIInfo().hasAVX() ? 32 : 16;
>     }
> ----------------
> ABataev wrote:
>> rjmccall wrote:
>>> ab wrote:
>>>> This I'm not sure;  it makes sense to me to align to 64 when we have AVX512.
>>>> There's also the WinX86_64 counterpart, which I'm even less confident about.
>>> I am pretty skeptical of even the original code here, frankly.  Are clients really making stronger promises just because they're compiling with AVX enabled?  Note that the compiler doesn't *do* anything to achieve this; it literally just makes a more aggressive assumption about what the user has done.
>>> It seems to me like the (1) the OpenMP people ought to review this and seriously consider it and (2) this number needs to be available to code in some portable manner, probably via a predefined macro.  Which means it probably ought to be defined in the AST-level TargetInfo.  CC'ing Alexey Bataev.
>> John, here is an excerpt from the OpenMP "If no optional parameter is specified, implementation-defined default
>> alignments for SIMD instructions on the target platforms are assumed." So, the value can be chosen by the compiler. But I think it is a good idea to have a macro for this.
> Okay.  Would you mind making sure that happens?  In the meantime, I think we should bump the alignment up to 64 here when AVX512 is enabled.
> http://reviews.llvm.org/D9894
>    http://reviews.llvm.org/settings/panel/emailpreferences/

More information about the cfe-commits mailing list