<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 02/17/2015 06:49 PM, Andy Ayers
      wrote:<br>
    </div>
    <blockquote
cite="mid:DM2PR0301MB1197DB8057CA60578255E5F2B22C0@DM2PR0301MB1197.namprd03.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <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;}
@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:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
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-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.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;}
--></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]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">Yes, one of the
            cases comes from GC – at times the code generator must
            ensure a particular reference is live and reported at every
            safepoint. This is in the context of a precise GC, though
            there’s also a conservative mode that we plan to use
            initially until we get the precise GC reporting correct.
            Either way that reference must remain live.</span></p>
      </div>
    </blockquote>
    Ok, glad we're on the same page.<br>
    <blockquote
cite="mid:DM2PR0301MB1197DB8057CA60578255E5F2B22C0@DM2PR0301MB1197.namprd03.prod.outlook.com"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">We haven’t yet
            decided when or how we’ll insert safepoints, though we had
            been thinking of doing it fairly early on to provide some
            opportunity for optimizers to reason about them.
          </span></p>
      </div>
    </blockquote>
    If you want, I'm happy to chat in person or phone about some of the
    tradeoffs here.  We could also stick to email, but I find that
    involved back and forth discussions tend to be easier with voice.  <br>
    <blockquote
cite="mid:DM2PR0301MB1197DB8057CA60578255E5F2B22C0@DM2PR0301MB1197.namprd03.prod.outlook.com"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">If I understand
            the proposal for gc.statepoint correctly, this would be a
            degenerate case with no function to call and no use of the
            relocated value.</span></p>
      </div>
    </blockquote>
    Yes.  It's not really a case we'd thought about per se.  If you want
    to poll on return, this is easy.  If you want it to just hold
    something live, but otherwise not actually call anything, we'd have
    to implement something to get good code gen.  Providing a dummy
    function which you called would be a good way to get started.  <br>
    <blockquote
cite="mid:DM2PR0301MB1197DB8057CA60578255E5F2B22C0@DM2PR0301MB1197.namprd03.prod.outlook.com"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
                style="color:windowtext"> Philip Reames
                [<a class="moz-txt-link-freetext" href="mailto:listmail@philipreames.com">mailto:listmail@philipreames.com</a>]
                <br>
                <b>Sent:</b> Tuesday, February 17, 2015 4:42 PM<br>
                <b>To:</b> Andy Ayers; <a class="moz-txt-link-abbreviated" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a><br>
                <b>Subject:</b> Re: [LLVMdev] is there some canonical
                way to extend liveness?<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt">I'm assuming
          that you're asking this in the context of GC?  Are you doing
          conservative stack scanning?<br>
          <br>
          One way you could address this would be to place a
          gc.statepoint immediately before the return with the value you
          need held live mentioned.  This would also give you a precise
          stackmap at that location (for the variables explicitly
          listed). 
          <br>
          <br>
          Philip<span style="font-size:12.0pt"><o:p></o:p></span></p>
        <div>
          <p class="MsoNormal">On 02/17/2015 12:46 PM, Andy Ayers wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal">In other compilers I’ve worked on there
            were special pseudo instructions (or similar mechanisms like
            adding extra source operands to returns) that allowed you to
            artificially extend lifetimes of values. For instance we
            might have a requirement that a certain local (say the ‘this
            pointer’) remain live throughout the method.<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Is there anything like this in LLVM?<o:p></o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman",serif"><br>
              <br>
              <br>
              <o:p></o:p></span></p>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>LLVM Developers mailing list<o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a moz-do-not-send="true" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><o:p></o:p></pre>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif"><o:p> </o:p></span></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>