<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The idea behind that change was to make ARM.td clearer, that is, adding architecture features to new architecture subtarget features, and to have the CPUs inherit
 from this. ProcA9 (and similar) from what I could tell were only being used for their enum value in making codegen decisions, hence I moved all of the features they inherit over to the actual CPUs for clarity, the idea being that all features a given target
 uses come from a combination of the architecture it inherits from and the target itself, not any intermediary features like ProcA9.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’m not aware of any place where ProcA9 is getting used to get subtarget features like this, and after a quick look I still can’t find anything. Where exactly
 are you seeing ProcA9 being used to get features? Even so, the cortex-a9 processer model itself inherits FeatureFP16 now so I would expect it to use FP16, unless you’re not using cortex-a9 directly? (In which case all CPUs that used to inherit ProcA9 now need
 to inherit all of the features ProcA9 used to inherit as well as ProcA9, which is what I did in the change you mention).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Bradley Smith<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Grang, Mandeep Singh [mailto:mgrang@codeaurora.org]
<br>
<b>Sent:</b> 24 February 2016 03:16<br>
<b>To:</b> Bradley Smith<br>
<b>Cc:</b> llvm-dev@lists.llvm.org<br>
<b>Subject:</b> Performance degradation on ARMv7 (cortex-a9)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> Hi Bradley,<br>
<br>
I was doing some performance analysis for ARMv7 (cortex-a9) and I noticed that one of my benchmarks degraded by 93%. I have tracked the regression down to the following commit by you:<br>
<i><br>
commit 7c1b77248baaeafec5d6433c3d1da9a2e2b69595<br>
Author: Bradley Smith <a href="mailto:bradley.smith@arm.com"><bradley.smith@arm.com></a><br>
Date:   Mon Nov 16 11:10:19 2015 +0000<br>
    [ARM] Introduce subtarget features per ARM architecture.<br>
    This allows for accurate architecture targeting as well as removing<br>
    duplicate information (hardcoded feature strings) from MCTargetDesc.</i><br>
<br>
I see that in lib/Target/ARM/ARM.td all the features have been removed from Proc definition (e.g.: ProcA9) and added to ProcessorModel definition (e.g.: ProcessorModel<"cortex-a9").<br>
But I find that the features from Proc are still being read and set in MCSubtargetInfo through the ARMFeatureKV table. So if the Proc is empty the corresponding feature is not being set.<br>
In my case, if I add FeatureFP16 back to the ProcA9 definition in ARM.td I get back all the lost performance.<br>
<br>
Could you please give me some insight on how, after your change, do the Proc features get correctly set in MCSubtargetInfo and other places which access Proc?<br>
<br>
Thanks,<br>
Mandeep<o:p></o:p></p>
</div>
</div>
</body>
</html>