[LLVMdev] Request for Help: Teach ARM target to auto-detect cpu / subtarget features

陳韋任 chenwj at iis.sinica.edu.tw
Fri May 11 10:37:47 PDT 2012


Hi James,

> > The backend sounds like the wrong place to implement this feature.
> > 
> > I'd have thought the Clang driver would be the ideal place?
> 
> The right place to implement this is in lib/Support/Host.cpp.  X86 has an implementation of sys::getHostCPUName(), but everything else just uses the:
> 
> std::string sys::getHostCPUName() {
>   return "generic";
> }
> 

  Do you happened to know examples show how to get cpu model like X86 does in
Host.cpp?

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj




More information about the llvm-dev mailing list