<div dir="ltr"><div class="gmail_extra">Hi,</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 21, 2015 at 2:19 AM, Philip Reames <span dir="ltr"><<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Can you put this up on phabricator?  That will make review easier.<br></div></blockquote><div> </div>I have put it up one phabricator: <a href="http://reviews.llvm.org/D9176">http://reviews.llvm.org/D9176</a> and I created <a href="https://llvm.org/bugs/show_bug.cgi?id=23306">https://llvm.org/bugs/show_bug.cgi?id=23306</a> for the "run out of registers" bug. <div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">Is there anything special about the fact these locations hold
    constants?  Or are you essentially just storing the location of a
    global variable as a relocatable symbol?  (Side note: What actually
    knows how to update the resulting symbol in the stackmap format?)</div></blockquote><div> </div><div>There is nothing special about them, I'm just storing the location of a global variable as a relocatable symbol. LLVM currently already emits a relocatable sym entry for the ''Function Address' field inside the stackmap, this patch just adds support for also emitting symbol inside the stackmap "Constant" entries when the patchpoint has a GV as live argument.</div><div>So the mechanism for updating the relocation inside a stackmap is already available and in use by the MCJIT for the 'Function Address'. Pyston just intercepts: RTDyldMemoryManager::getSymbolAddress() and return the real address when the object get's loaded. </div><div><pre style="font-family:Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:0.95em;line-height:15.960000038147px;padding:0.5em;border:1px solid rgb(204,204,204);color:rgb(0,0,0);background-color:rgb(248,248,248)">StkSizeRecord[NumFunctions] {
  uint64 : Function Address
  uint64 : Stack Size
}</pre></div><div>But I have to warn you guys I'm a novice inside this codebase, so please review this patch carefully.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><span class=""><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Currently when a patchpoint has a constant variable as live
          argument it will materialize it in a register. Which we don't
          want because the live variables are rarely used (also the
          regalloc runs out of registers when having to many const
          variables as argument to the pp?!?...). <br>
        </div>
      </div>
    </blockquote></span>
    This sounds like a bug.  Could you try to isolate and file a test
    case?<br>
    <blockquote type="cite"><span class="">
      <div dir="ltr">
        <div>This patch emits a symbol reference inside the array of
          large constants in the stackmap. The stack map format is
          untouched by this patch.</div>
        <div><br>
        </div>
        <div>
          <div>Together with <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150330/269160.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150330/269160.html</a>
            this should make it possible to cache more JITed functions
            containing patchpoints.</div>
          <div><br>
          </div>
          <div>Looking forward to comments on this patch.</div>
          <div>Cheers,</div>
          <div>Marius</div>
          <div><br>
          </div>
          <div><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </span><pre>_______________________________________________
llvm-commits mailing list
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div></div>