Tentative but straightforward patch, based on the "Edited for AVX512" SysV ABI drafts.
Depends on a local refactoring to pass the ABI string rather than HasAVX.
Differential D9894
[CodeGen] Teach X86_64ABIInfo about AVX512. ab on May 20 2015, 1:56 PM. Authored by
Details Tentative but straightforward patch, based on the "Edited for AVX512" SysV ABI drafts. Depends on a local refactoring to pass the ABI string rather than HasAVX.
Diff Detail
Event Timeline
Comment Actions No problems Best regards, Alexey BataevSoftware Engineer 21.05.2015 19:48, John McCall пишет:
Comment Actions
In r237989 I refactored the "HasAVX" flag to just use the TargetInfo::getABI() string, but I'm tempted to revert, and pass down an additional HasAVX512 flag. I originally wanted to do the same thing for other targets, but didn't realize that some of the ABIs depend on things not in TargetInfo, e.g. CodeGenOptions, which aren't supposed to be available? Anyway, opinions welcome, one way or the other. Comment Actions I like the idea of passing it down instead of working off of strings. Maybe pass down an enum instead of two flags? Comment Actions Hi John, Best regards, Alexey BataevSoftware Engineer 18.06.2015 10:25, John McCall пишет:
Comment Actions Okay, that gives us two options. The first is to use a macro that's conservative for all types; the second is to add a new type trait. If the performance difference on PPC64 is important, the type trait seems fine to me. I guess it would have to be a UnaryExprOrTypeTrait, because the unary type traits don't currently allow returning size_t. Comment Actions
With that, adding AVX512 support is a trivial 4 line patch. |