<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)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
@font-face
{font-family:"Malgun Gothic";
panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
{font-family:"\@Malgun Gothic";
panose-1:2 11 5 3 2 0 0 2 0 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:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:577255340;
mso-list-type:hybrid;
mso-list-template-ids:-1590766148 2122893882 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0D8;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;
mso-fareast-font-family:"Malgun Gothic";
mso-bidi-font-family:Calibri;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l1
{mso-list-id:621352123;
mso-list-type:hybrid;
mso-list-template-ids:-740007822 1672917414 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0D8;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;
mso-fareast-font-family:"Malgun Gothic";
mso-bidi-font-family:Calibri;}
@list l1:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l1:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l1:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l1:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l1:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l1:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l2
{mso-list-id:1888446577;
mso-list-type:hybrid;
mso-list-template-ids:-1533101686 -1180955608 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l2:level1
{mso-level-number-format:bullet;
mso-level-text:\F0D8;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:.75in;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;
mso-fareast-font-family:"Malgun Gothic";
mso-bidi-font-family:Calibri;}
@list l2:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:1.25in;
text-indent:-.25in;
font-family:"Courier New";}
@list l2:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:1.75in;
text-indent:-.25in;
font-family:Wingdings;}
@list l2:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:2.25in;
text-indent:-.25in;
font-family:Symbol;}
@list l2:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:2.75in;
text-indent:-.25in;
font-family:"Courier New";}
@list l2:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:3.25in;
text-indent:-.25in;
font-family:Wingdings;}
@list l2:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:3.75in;
text-indent:-.25in;
font-family:Symbol;}
@list l2:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:4.25in;
text-indent:-.25in;
font-family:"Courier New";}
@list l2:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:4.75in;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></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=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt'> > As for the cost model, right now it's platform independent, so I'm assuming you'll need some sort of hook for platform-specific costs/bonuses to detect spilling of different types of registers. Also, I'm not quite sure how you'll do this type of detection at the IR level. Are you thinking some sort of heuristic?</span><br><br><o:p></o:p></p><p class=MsoNormal>Agree, it should be a target specific hook if doing so make sense. As far as I see the CSRCost used in RegAllocGreedy is extremely low, so in most cases we allocate a CSR if a live range expand across a function call. I guess we can estimate this by checking if a user of a value defined in the entry block is reachable from a block with a function call.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> Graham Yiu [mailto:gyiu@ca.ibm.com] <br><b>Sent:</b> Tuesday, October 3, 2017 12:45 PM<br><b>To:</b> Jun Lim <junbuml@codeaurora.org><br><b>Cc:</b> llvm-dev@lists.llvm.org<br><b>Subject:</b> RE: [llvm-dev] General question about enabling partial inlining<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><p><span style='font-size:10.0pt'>Hi Jun,</span><br><br><span style='font-size:10.0pt'>If we were to enable this by default, I think we'd make a push to enable it with or without PGO. I'm not sure what's currently preventing the partial inlining pass to be enabled by default, actually. David Li may have a better sense on this as he's been actively working on it most recently.</span><br><br><span style='font-size:10.0pt'>As for the cost model, right now it's platform independent, so I'm assuming you'll need some sort of hook for platform-specific costs/bonuses to detect spilling of different types of registers. Also, I'm not quite sure how you'll do this type of detection at the IR level. Are you thinking some sort of heuristic?</span><br><br><span style='font-size:10.0pt'>Graham Yiu<br>LLVM Compiler Development<br>IBM Toronto Software Lab<br>Office: (905) 413-4077 C2-707/8200/Markham<br>Email: <a href="mailto:gyiu@ca.ibm.com">gyiu@ca.ibm.com</a></span><br><br><img border=0 width=16 height=16 style='width:.1666in;height:.1666in' id="_x0000_i1025" src="cid:image001.gif@01D33C46.86AC9170" alt="Inactive hide details for "Jun Lim" ---10/03/2017 12:21:38 PM---Hi Graham,"><span style='font-size:10.0pt;color:#424282'>"Jun Lim" ---10/03/2017 12:21:38 PM---Hi Graham,</span><br><br><span style='font-size:10.0pt;color:#5F5F5F'>From: </span><span style='font-size:10.0pt'>"Jun Lim" <<a href="mailto:junbuml@codeaurora.org">junbuml@codeaurora.org</a>></span><br><span style='font-size:10.0pt;color:#5F5F5F'>To: </span><span style='font-size:10.0pt'>"'Graham Yiu'" <<a href="mailto:gyiu@ca.ibm.com">gyiu@ca.ibm.com</a>></span><br><span style='font-size:10.0pt;color:#5F5F5F'>Cc: </span><span style='font-size:10.0pt'><<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>></span><br><span style='font-size:10.0pt;color:#5F5F5F'>Date: </span><span style='font-size:10.0pt'>10/03/2017 12:21 PM</span><br><span style='font-size:10.0pt;color:#5F5F5F'>Subject: </span><span style='font-size:10.0pt'>RE: [llvm-dev] General question about enabling partial inlining</span><o:p></o:p></p><div class=MsoNormal><hr size=2 width="100%" noshade style='color:#8091A5' align=left></div><p class=MsoNormal><br><br><br>Hi Graham, <br><br>Thanks for sharing this. Are you planning on enabling the pass only on PGO? Even in non-PGO, I noticed some performance gains when we are aggressive in partially inlining the early return part, especially when the callee spill CSRs in the entry block. At a high level, I have two questions: <br><span style='font-size:10.0pt'>1. </span>What is the main obstacle that prevent the pass from being enabled by default? <br><span style='font-size:10.0pt'>2. </span>Would it make sense to give some bonus in the cost model when we detect the possibility of spilling CSRs in the entry block? <br><br>Thanks,<br>Jun<br><b>From:</b> Graham Yiu [<a href="mailto:gyiu@ca.ibm.com">mailto:gyiu@ca.ibm.com</a>] <b><br>Sent:</b> Tuesday, October 3, 2017 11:08 AM<b><br>To:</b> <a href="mailto:junbuml@codeaurora.org">junbuml@codeaurora.org</a><b><br>Cc:</b> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><b><br>Subject:</b> Re: [llvm-dev] General question about enabling partial inlining<o:p></o:p></p><p><span style='font-size:10.0pt'>Hi Jun,</span><br><span style='font-size:10.0pt'><br>We're actually looking at enhancing the partial inlining pass right now (see </span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_pipermail_llvm-2Ddev_2017-2DAugust_116515.html&d=DwMFAg&c=jf_iaSHvJObTbx-siA1ZOg&r=4ST7e3kMd0GTi3w9ByK5Cw&m=9oYOvB3l33-euX7ag6texitDSABCTLWfauz0YGW7zZ8&s=lZOJDeoavpuEHo29CLd9Kvkn1ibSdgK5125f13O-LYQ&e="><span style='font-size:10.0pt'>http://lists.llvm.org/pipermail/llvm-dev/2017-August/116515.html</span></a><span style='font-size:10.0pt'>)</span><br><span style='font-size:10.0pt'><br>We'd be interested in turning on the pass by default some time in the future, if our enhancements prove beneficial.</span><br><span style='font-size:10.0pt'><br>Cheers,</span><br><span style='font-size:10.0pt'><br>Graham Yiu<br>LLVM Compiler Development<br>IBM Toronto Software Lab<br>Office: (905) 413-4077 C2-707/8200/Markham<br>Email: </span><a href="mailto:gyiu@ca.ibm.com"><span style='font-size:10.0pt'>gyiu@ca.ibm.com</span></a><br><br><img border=0 width=16 height=16 style='width:.1666in;height:.1666in' id="_x0000_i1027" src="cid:image001.gif@01D33C46.86AC9170" alt="Inactive hide details for via llvm-dev ---09/13/2017 01:12:02 PM---Hi, I noticed some performance gains in some spec benchmarks"><span style='font-size:10.0pt;color:#424282'>via llvm-dev ---09/13/2017 01:12:02 PM---Hi, I noticed some performance gains in some spec benchmarks without</span><br><span style='font-size:10.0pt;color:#5F5F5F'><br>From: </span><span style='font-size:10.0pt'>via llvm-dev <</span><a href="mailto:llvm-dev@lists.llvm.org"><span style='font-size:10.0pt'>llvm-dev@lists.llvm.org</span></a><span style='font-size:10.0pt'>><span style='color:#5F5F5F'><br>To: </span></span><a href="mailto:llvm-dev@lists.llvm.org"><span style='font-size:10.0pt'>llvm-dev@lists.llvm.org</span></a><span style='font-size:10.0pt;color:#5F5F5F'><br>Date: </span><span style='font-size:10.0pt'>09/13/2017 01:12 PM<span style='color:#5F5F5F'><br>Subject: </span>[llvm-dev] General question about enabling partial inlining<span style='color:#5F5F5F'><br>Sent by: </span>"llvm-dev" <</span><a href="mailto:llvm-dev-bounces@lists.llvm.org"><span style='font-size:10.0pt'>llvm-dev-bounces@lists.llvm.org</span></a><span style='font-size:10.0pt'>></span><o:p></o:p></p><div class=MsoNormal><hr size=2 width="100%" noshade style='color:#A0A0A0' align=left></div><p class=MsoNormal style='margin-bottom:12.0pt'><br><br><br><span style='font-size:10.0pt;font-family:"Courier New"'><br>Hi,<br><br>I noticed some performance gains in some spec benchmarks without <br>significant code size bloat when aggressively performing partial <br>inlining, especially when the original callee spill CSRs in the entry <br>block. I guess the partial inlining is not enabled mainly due to the <br>code size. Is there any other issue which prevent the pass from being <br>enabled? Do we have any plan or any on-going works to enable partial <br>inlining ?<br>Thanks,<br>Jun<br><br>-- <br>Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm <br>Technologies, Inc.<br>Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a <br>Linux Foundation Collaborative Project.<br>_______________________________________________<br>LLVM Developers mailing list<u><span style='color:blue'><br></span></u></span><a href="mailto:llvm-dev@lists.llvm.org"><span style='font-size:10.0pt;font-family:"Courier New"'>llvm-dev@lists.llvm.org</span></a><u><span style='font-size:10.0pt;font-family:"Courier New";color:blue'><br></span></u><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=4ST7e3kMd0GTi3w9ByK5Cw&m=zEValqMYe9FvZqI-GQUgWPmVUgbEq8OBAjTrBjz9xhY&s=1h4Cw3vDlJBIknkn0Ts3R_e3PU64h_dyvEkyCdonAVo&e="><span style='font-size:10.0pt;font-family:"Courier New"'>https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=4ST7e3kMd0GTi3w9ByK5Cw&m=zEValqMYe9FvZqI-GQUgWPmVUgbEq8OBAjTrBjz9xhY&s=1h4Cw3vDlJBIknkn0Ts3R_e3PU64h_dyvEkyCdonAVo&e=</span></a><span style='font-size:10.0pt;font-family:"Courier New"'> <br></span><br><br><br><br><o:p></o:p></p></div></body></html>