Rail Shafigulin via llvm-dev
2016-Feb-18 19:40 UTC
[llvm-dev] How to interpret Selection DAG error output
On Thu, Feb 18, 2016 at 11:34 AM, Krzysztof Parzyszek < kparzysz at codeaurora.org> wrote:> On 2/18/2016 1:32 PM, Rail Shafigulin wrote: > >> I think this is where I'm loosing the "thread". Based on what I'm seeing >> SET_FLAG has three operands, the first of which is a CopyFromReg. So how >> come the pattern is SET_FLAG %vreg5, 3, 20 and not SET_FLAG CopyFromReg, >> 3, 20? In other words how do we go from CopyFromReg to %vreg5? >> > > CopyFromReg is a "helper" instruction meaning "use the value from this > vreg". Values that are live across basic blocks are remembered in vregs, > and CopyToReg and CopyFromReg are opcodes used to express it.I see. Thanks. 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?> > -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/e4059528/attachment.html>
Krzysztof Parzyszek via llvm-dev
2016-Feb-18 19:48 UTC
[llvm-dev] How to interpret Selection DAG error output
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. -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 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>