<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=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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 lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hi all,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have submitted a patch that implements machine unroller as a utility class. <a href="https://reviews.llvm.org/D53005">https://reviews.llvm.org/D53005</a> <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The intent of this patch is to provide the loop unrolling functionality at the MI level. Currently, It handles only small inner-most loops with the run-time trip count and a single basic block. We target such loops mostly because they often have underutilized resources. The unrolling is not only found to improve the resource usage in many cases but if scheduled properly it can also help reduce stalls by hiding  the multi cycles instruction latencies. To avoid excessive code size increase, we perform it selectively and do it only for the loops where it’s determined to improve the resource usage. Since the Software Pipeliner already models the resource usage for ResMII (Resoure Minimum Initiation Interval) computation, we decided to use it for computing the unroll factor as well and thus let the pipeliner drive the machine unroller. The unroller-pipeliner combo is found to generate much better code for the small loops with the high latency instructions without loop carried dependence. For now, this feature is enabled only for the Hexagon backend. To enable it for other targets, they must extend the MachineUnroller class and provide their own implementation of the target specific APIs. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The patch currently doesn’t have any reviewers since I didn’t know whom to add. I will add some folks for the Hexagon specific changes, but I would greatly appreciate if others can review as well and provide their feedback. Please let me know if you any questions.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal>Jyotsna<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>