<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 18, 2016 at 11:48 AM, Krzysztof Parzyszek <span dir="ltr"><<a href="mailto:kparzysz@codeaurora.org" target="_blank">kparzysz@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On 2/18/2016 1:40 PM, Rail Shafigulin wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
           0x3283608: i32,ch = CopyFromReg 0x3257980, 0x3283500 [ORD=1]<br>
         [ID=9]<br>
               0x3283500: i32 = Register %vreg5 [ID=1]<br>
<br>
Based on the code above, CopyFromReg is a node at address 0x3283608,<br>
returns i32, is of type chain and takes two inputs, the second of which<br>
is a %vreg5. So what is the first parameter? In fact where can I find<br>
the definition of CopyFromReg method?<br>
</blockquote>
<br></span>
The first parameter is a chain.<br>
<br>
Here are some comments from include/llvm/CodeGen/ISDOpcodes.h:<br>
<br>
    /// CopyToReg - This node has three operands: a chain, a register number to<br>
    /// set to this value, and a value.<br>
    CopyToReg,<br>
<br>
    /// CopyFromReg - This node indicates that the input value is a virtual or<br>
    /// physical register that is defined outside of the scope of this<br>
    /// SelectionDAG.  The register is available from the RegisterSDNode object.<br>
    CopyFromReg,<br>
<br>
I usually grep the sources if I want to find out about something.  I'm not sure if there is a better documentation about ISD nodes.</blockquote><div> </div><div>Thanks. I keep forgetting that I have grep at my disposal :) What I'm not clear about is the first parameter in CopyFromReg node.  <span class="">0x3283608: i32,ch = CopyFromReg 0x3257980, 0x3283500 [ORD=1]. Based on the comments for CopyFromReg, if I understand it correctly, there should be 1 input, virtual or physical register, which is what is given in the pattern as a second argument. So what is the first one. What does it do?</span><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5"><br>
<br>
-Krzysztof<br>
<br>
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Rail Shafigulin<br></div>Software Engineer <br>Esencia Technologies<br></div></div></div></div>
</div></div>