[PATCH] D21033: Add runtime support for __cpu_model (__builtin_cpu_supports)

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 08:19:01 PDT 2016


On Wed, Jun 08, 2016 at 03:53:30PM -0700, Alina Sbirlea via llvm-commits wrote:
> If I understand correctly, your suggestion is having correct behavior
> for __builtin_cpu_supports
> (i.e. setting the flags) and undefined behavior (or return 0 /  always
> generic) for __builtin_cpu_is (i.e. not setting cpu type and subtype),
> because of the lack of uses for the latter, code bloat, hardship to
> maintain/add new CPU generations. Is this right?

Correct. I spend some time today to (b|x)zgrep my pkgsrc distfile
archive. It covers all the software in pkgsrc, so should be fairly
representative of FOSS at least. Outside the GCC sources, I couldn't
find a single reference to __builtin_cpu_is and __builtin_cpu_init.
__builtin_cpu_supports was used by two packages, Qt and OpenTTD (game).

Joerg


More information about the llvm-commits mailing list