[cfe-dev] CPU features handling
Roman Divacky
rdivacky at freebsd.org
Wed Nov 4 08:24:41 PST 2009
Hi,
Clang currently maintains its own knowledge of cpu features. See
clang/lib/Basic/Targets.cpp:getDefaultFeatures() and setFeatureEnabled().
This knowledge is already and better maintained in Target specific .td
files (e.g. Target/X86/X86.td).
I would like to make clang use the information provided by llvm, the question
is how. I think that the best would be to let clang see FeatureKV[] and
SubTypeKV[] from *GenSubtarget.inc (e.g. Target/X86/X86GenSubtarget.inc).
I am not sure how to do it though. Can you comment on what you think is
the best way to tackle this? We cant link libclangBasic to libLLVMTarget
and it seems strange to copy the *GenSubtarget.inc to libBasic. I cant
think of any other solution
thank you
Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091104/f401aa24/attachment.sig>
More information about the cfe-dev
mailing list