<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 6/22/12 2:04 PM, Justin Holewinski
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAJgxuaerCK1_i9MeaXfK0xPS4Jo1kT+67jo7tbWuW1hW9W8Kkg@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div class="gmail_quote">On Fri, Jun 22, 2012 at 2:46 PM,
        amruth.rd <span dir="ltr"><<a moz-do-not-send="true"
            href="mailto:amruth.rd@knights.ucf.edu" target="_blank">amruth.rd@knights.ucf.edu</a>></span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <br>
          Does LLVM allow mapping a virtual register to a specific
          memory location? If not, how do we extract information on
          where the virtual registers are mapped to?<br>
        </blockquote>
        <div><br>
        </div>
        <div>In general, you do not know where a virtual register is
          mapped, and the mapping is dependent on the back-end.  It
          could be allocated or spilled onto the stack, or it may live
          entirely within a physical register (e.g. no address).</div>
      </div>
    </blockquote>
    <br>
    To elaborate on what Justin said, at the LLVM IR level, you don't
    know where a virtual register will live after code generation (or
    even if it will live in the same "place;" the code generator is free
    to allocate it to a register for part of its life and a stack spill
    slot for another part of its life).<br>
    <br>
    You may be able to get this information if you write a
    MachineFunction pass or some other code that is run by LLVM after
    code generation and register allocation (because you can see the
    generated code).  However, I don't know enough about MachineFunction
    passes to be sure that it's possible; that's just where I'd look if
    I were you.<br>
    <br>
    -- John T.<br>
    <br>
    <blockquote
cite="mid:CAJgxuaerCK1_i9MeaXfK0xPS4Jo1kT+67jo7tbWuW1hW9W8Kkg@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div> </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <br>
          Thanks,<br>
          Amruth<br>
          <br>
          <br>
          <br>
          _______________________________________________<br>
          LLVM Developers mailing list<br>
          <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" target="_blank">http://llvm.cs.uiuc.edu</a><br>
          <a moz-do-not-send="true"
            href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev"
            target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
        </blockquote>
      </div>
      <br>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <br>
      <div>Thanks,</div>
      <div><br>
      </div>
      <div>Justin Holewinski</div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
    <br>
  </body>
</html>