This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add a .def file to contain information about mapping vendor/type/subtype to -march strings
AbandonedPublic

Authored by craig.topper on Nov 1 2017, 10:53 PM.

Details

Reviewers
erichkeane
Summary

Hoping to share this with clang to allow sharing with implementation of __builtin_cpu_is

Event Timeline

craig.topper created this revision.Nov 1 2017, 10:53 PM

I added a CPUISVALID that you should be able to use to know if its valid for builtin_cpu_is. The name for builtin_cpu_is is the first string. Empty string if its not valid. The corresponding march names are the second string. Host.cpp needed to translate to -march names.

erichkeane added inline comments.Nov 2 2017, 7:46 AM
include/llvm/Support/X86TargetParser.def
21

One thin gthat would be incredibly useful (and remove most of the need for the table in clang) is if this also contained the 64bit-ness of the processor.

ALSO, If you cuold remove the namespace from all of these (perhaps just use a 'using' elsewhere?) I could use it to create the enum names as well.

73

Why does amdfam17h appear 2x? Should the 1st be znver1?

craig.topper abandoned this revision.Nov 10 2017, 4:15 PM