<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://227/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Nitpick:<div>+  if (Implementer == "0x41"){ // ARM Ltd.</div><div><br></div><div>Please add a space after ')'.</div><div><br></div><div>This is a welcome fix. We need auto-detection since some benchmarking efforts do not specify target cpus. However, I can't help but noticing all the features this patch doesn't detect. Is it possible to detect whether the cpu supports v6, v7, thumb2, etc.? Or better yet, is it possible to detect CPU name?</div><div><br></div><div>Evan</div><div><br><div><div>On Dec 9, 2012, at 6:44 PM, Hao Liu <<a href="mailto:Hao.Liu@arm.com">Hao.Liu@arm.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="ZH-CN" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US">Hi,<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US"> </span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US">Attached is a patch to define getHostCPUFeatures for ARM Linux platform in Host.cpp. Currently the CPU features have default values. The getHostCPUFeatures function do nothing and only return false.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US"> </span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US">The implementation is like getHostCPUName for ARM Linux platform in Host.cpp:<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt 18pt; text-align: justify; text-indent: -18pt; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US"><span>1)<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman'; ">      <span class="Apple-converted-space"> </span></span></span></span><span lang="EN-US">Read /proc/cpuinfo and get the ‘Features’ line.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt 18pt; text-align: justify; text-indent: -18pt; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US"><span>2)<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman'; ">      <span class="Apple-converted-space"> </span></span></span></span><span lang="EN-US">For each feature which has corresponding feature in LLVM, translate the feature name in /proc/cpuinfo to LLVM feature key name in ARM.td .<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt 18pt; text-align: justify; text-indent: -18pt; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US"><span>3)<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman'; ">      <span class="Apple-converted-space"> </span></span></span></span><span lang="EN-US">Add all features to StringMap and set value to true.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt 18pt; text-align: justify; text-indent: -18pt; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US"><span>4)<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman'; ">      <span class="Apple-converted-space"> </span></span></span></span><span lang="EN-US">If success, return true, otherwise return false.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US"> </span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US"> </span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US">Thanks,<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US">-Hao<o:p></o:p></span></div></div><span><ARMLinuxFeatures.patch></span>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu" style="color: purple; text-decoration: underline; ">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" style="color: purple; text-decoration: underline; ">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></div></blockquote></div><br></div></body></html>