pengfei added a comment.

In D118527#3281488 <https://reviews.llvm.org/D118527#3281488>, @craig.topper 
wrote:

> I believe the design here was supposed to be that "generic" would be updated 
> in X86.td on an ongoing basis to be more modern. So that if users pass 
> -mtune=generic it would evolve over time.
>
> This matches gcc behavior
>
>   ‘generic’
>   Produce code optimized for the most common IA32/AMD64/EM64T processors. If 
> you know the CPU on which your code will run, then you should use the 
> corresponding -mtune or -march option instead of -mtune=generic. But, if you 
> do not know exactly what CPU users of your application will have, then you 
> should use this option.
>   
>   As new processors are deployed in the marketplace, the behavior of this 
> option will change. Therefore, if you upgrade to a newer version of GCC, code 
> generation controlled by this option will change to reflect the processors 
> that are most common at the time that version of GCC is released.
>   
>   There is no -march=generic option because -march indicates the instruction 
> set the compiler can use, and there is no generic instruction set applicable 
> to all processors. In contrast, -mtune indicates the processor (or, in this 
> case, collection of processors) for which the code is optimized.

Thanks for the information, I'll try the other way, thanks Craig!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118527/new/

https://reviews.llvm.org/D118527

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

Reply via email to