rjmccall added a comment.

In http://reviews.llvm.org/D12390#234458, @ab wrote:

> Unless I'm misunderstanding, I believe this has much less impact than you're 
> thinking; there are three cases:
>
> - x86_64: no change (-mno-mmx is guarded by x86)
> - x86, with -mno-mmx: no change (because previously, we'd only set avx/avx512 
> for x86_64)
> - x86, without -mno-mmx: this will use an avx/avx512 ABI string where we'd 
> have used "", letting us use the better alignment (only for OpenMP and 
> vectors, I think).


Ok, I see.

The outcome we want is that things like the max vector alignment should be 
properly honoring whatever target features are actually enabled.  Specifically, 
if AVX is enabled, we should be setting the max vector alignment to the maximum 
enabled AVX alignment, regardless of whether MMX is enabled.

This ABI string is an artifact of the interface between the AST and IRGen 
TargetInfos.  We should probably just remove it in favor of some kind of 
openly-extensible query interface so that IRGen can just directly ask things 
like whether AVX is enabled instead of parsing some random string.  But for 
this patch, let's just leave it as it is, and instead just set the max vector 
alignment directly from the target features.


http://reviews.llvm.org/D12390



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to