<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;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:right;
direction:rtl;
unicode-bidi:embed;
font-size:11.0pt;
font-family:"Calibri","sans-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;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
text-align:right;
direction:rtl;
unicode-bidi:embed;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:36.0pt;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
text-align:right;
direction:rtl;
unicode-bidi:embed;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle21
{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 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:223610584;
mso-list-type:hybrid;
mso-list-template-ids:-931339658 329416930 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:54.0pt;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:90.0pt;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:126.0pt;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:162.0pt;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:198.0pt;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:234.0pt;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:270.0pt;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:306.0pt;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:342.0pt;
text-indent:-9.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></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 style='text-align:left;direction:ltr;unicode-bidi:embed'><span style='color:#1F497D'>Hi Alexey,<o:p></o:p></span></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'><span style='color:#1F497D'>Thanks a lot. I'll try it.<o:p></o:p></span></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'><span style='color:#1F497D'>Tehila.</span><span lang=HE dir=RTL style='font-family:"Arial","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal dir=RTL><span dir=LTR style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal dir=RTL><b><span dir=LTR style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From</span></b><span dir=RTL></span><b><span lang=HE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'><span dir=RTL></span>:</span></b><span lang=HE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> </span><span dir=LTR style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>Bataev, Alexey [mailto:a.bataev@hotmail.com</span><span dir=RTL></span><span lang=HE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'><span dir=RTL></span>] <br></span><b><span dir=LTR style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>Sent</span></b><span dir=RTL></span><b><span lang=HE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'><span dir=RTL></span>:</span></b><span lang=HE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> </span><span dir=LTR style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>Tuesday, January 13, 2015 7:07 AM</span><span lang=HE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'><br></span><b><span dir=LTR style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>To</span></b><span dir=RTL></span><b><span lang=HE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'><span dir=RTL></span>:</span></b><span lang=HE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> </span><span dir=LTR style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>Tehila Mayzels; llvmdev@cs.uiuc.edu</span><span lang=HE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'><br></span><b><span dir=LTR style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>Subject</span></b><span dir=RTL></span><b><span lang=HE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'><span dir=RTL></span>:</span></b><span lang=HE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> </span><span dir=LTR style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>Re: [LLVMdev] outlining in llvm<o:p></o:p></span></p></div></div><p class=MsoNormal dir=RTL><span dir=LTR><o:p> </o:p></span></p><div><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'>Hi Tehila,<br>You can try to use function outlining implemented in clang. It is based on class CapturedStmt.<br>You can try it with the the following construct:<br><br>#pragma clang __debug captured<br><Code to be outlined><br><br>Implementation is in clang/lib/Parse/ParsePragma.cpp, StmtResult Parser::HandlePragmaCaptured() <o:p></o:p></p><pre dir=RTL><span dir=LTR>Best regards,<o:p></o:p></span></pre><pre dir=RTL><span dir=LTR>Alexey Bataev<o:p></o:p></span></pre><pre dir=RTL><span dir=LTR>=============<o:p></o:p></span></pre><pre dir=RTL><span dir=LTR>Software Engineer<o:p></o:p></span></pre><pre dir=RTL><span dir=LTR>Intel Compiler Team<o:p></o:p></span></pre><pre style='text-align:left;direction:ltr;unicode-bidi:embed'>Intel Corp. <o:p></o:p></pre><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'>31.12.2014 23:49, Tehila Mayzels пишет:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'>Hi,<o:p></o:p></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'> <o:p></o:p></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'>I have some questions regarding outlining (extracting piece of code into a function):<o:p></o:p></p><p class=MsoListParagraph style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:54.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;mso-list:l0 level1 lfo2;direction:ltr;unicode-bidi:embed'><![if !supportLists]><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'> </span></span><![endif]><span dir=LTR></span>Is there an outlining pass in llvm (IR)? I've found out CodeExtractor pass, but I'm not sure it’s exactly the same idea.<o:p></o:p></p><p class=MsoListParagraph style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:54.0pt;margin-bottom:.0001pt;text-align:left;text-indent:-18.0pt;mso-list:l0 level1 lfo2;direction:ltr;unicode-bidi:embed'><![if !supportLists]><span style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'> </span></span><![endif]><span dir=LTR></span>How do I set the function name?<o:p></o:p></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'> <o:p></o:p></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'> <o:p></o:p></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'>And another question:<o:p></o:p></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'>Where do I control the execution of my pass? I'm writing a pass that first works on loops, than on a function (outlined from the loop) and then again on loops.<o:p></o:p></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'>How can I do that?<o:p></o:p></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'> <o:p></o:p></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'>Thanks and happy new year,<o:p></o:p></p><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'>Tehila.<o:p></o:p></p></blockquote><p class=MsoNormal style='text-align:left;direction:ltr;unicode-bidi:embed'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p></div></body></html>