Rail Shafigulin via llvm-dev
2016-Feb-18 20:18 UTC
[llvm-dev] How to interpret Selection DAG error output
On Thu, Feb 18, 2016 at 11:48 AM, Krzysztof Parzyszek < kparzysz at codeaurora.org> wrote:> On 2/18/2016 1:40 PM, Rail Shafigulin wrote: > >> >> 0x3283608: i32,ch = CopyFromReg 0x3257980, 0x3283500 [ORD=1] >> [ID=9] >> 0x3283500: i32 = Register %vreg5 [ID=1] >> >> Based on the code above, CopyFromReg is a node at address 0x3283608, >> returns i32, is of type chain and takes two inputs, the second of which >> is a %vreg5. So what is the first parameter? In fact where can I find >> the definition of CopyFromReg method? >> > > The first parameter is a chain. > > Here are some comments from include/llvm/CodeGen/ISDOpcodes.h: > > /// CopyToReg - This node has three operands: a chain, a register > number to > /// set to this value, and a value. > CopyToReg, > > /// CopyFromReg - This node indicates that the input value is a > virtual or > /// physical register that is defined outside of the scope of this > /// SelectionDAG. The register is available from the RegisterSDNode > object. > CopyFromReg, > > 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.Thanks. I keep forgetting that I have grep at my disposal :) What I'm not clear about is the first parameter in CopyFromReg node. 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?> > -Krzysztof > > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted > by The Linux Foundation >-- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160218/a5ce6c86/attachment.html>
Krzysztof Parzyszek via llvm-dev
2016-Feb-18 20:20 UTC
[llvm-dev] How to interpret Selection DAG error output
On 2/18/2016 2:18 PM, Rail Shafigulin wrote:> Thanks. I keep forgetting that I have grep at my disposal :) What I'm > not clear about is the first parameter in CopyFromReg node. 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?It's a chain, it's used to maintain relative ordering between nodes. Both CopyToReg and CopyFromReg have the same arguments. I agree, it's not clear from the comments. -Krzysztof -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Rail Shafigulin via llvm-dev
2016-Feb-18 21:30 UTC
[llvm-dev] How to interpret Selection DAG error output
On Thu, Feb 18, 2016 at 12:20 PM, Krzysztof Parzyszek < kparzysz at codeaurora.org> wrote:> On 2/18/2016 2:18 PM, Rail Shafigulin wrote: > >> Thanks. I keep forgetting that I have grep at my disposal :) What I'm >> not clear about is the first parameter in CopyFromReg node. 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? >> > > It's a chain, it's used to maintain relative ordering between nodes. Both > CopyToReg and CopyFromReg have the same arguments. I agree, it's not clear > from the comments.Thanks for the explanation.> > > -Krzysztof > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted > by The Linux Foundation >-- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160218/255be720/attachment.html>