Hi, I had asked earlier from my another ID about duplicating a basic block, but that server is down for moment. I was given suggestion to use CloneBasicBlock, but when I used it I get an error : While deleting: i32* %a Use still stuck around after Def is destroyed: store i32* %a, i32** %p, align 4 opt: /home/ambika/llvm_3/llvm-2.6/lib/VMCore/Value.cpp:81: virtual llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a value is destroyed!"' failed. 0 opt 0x08471218 Aborted This message is printed inside destructor of class value . Now I dont understand that after all the instructions are duplicated why does thios kind of error come?? I will be very thankful if someone can help me. Thanks and Regards, Ambika MTech, CSE IIT Bombay -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100604/4485edd1/attachment.html>
On Fri, Jun 4, 2010 at 2:15 AM, Ambika Agarwal <agarwal.ambika at gmail.com> wrote:> Hi, > > I had asked earlier from my another ID about duplicating a basic block, but > that server is down for moment. > I was given suggestion to use CloneBasicBlock, but when I used it I get an > error : > > While deleting: i32* %a > Use still stuck around after Def is destroyed: store i32* %a, i32** %p, > align 4 > opt: /home/ambika/llvm_3/llvm-2.6/lib/VMCore/Value.cpp:81: virtual > llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a value > is destroyed!"' failed. > 0 opt 0x08471218 > Aborted > > This message is printed inside destructor of class value . > Now I dont understand that after all the instructions are duplicated why > does thios kind of error come?? > > I will be very thankful if someone can help me.As the message says, the value being destroyed is used. Check users of this value. You'll have to update them to use something else before destroying the value. There is not any magic utility that does everything. Take a look at how CloneBasicBlock is used other places and try to update your pass accordingly. - Devang
I have checked the way it is used in other file, but the problem is whenever I call CloneBasicBlock, after the block is duplicated it tries to delete some variables and I dont understand that why it does that. I am just trying to duplicate a single block, and that is giving error. I really dont understand why does it wants to delete it... On Fri, Jun 4, 2010 at 10:40 PM, Devang Patel <devang.patel at gmail.com>wrote:> On Fri, Jun 4, 2010 at 2:15 AM, Ambika Agarwal <agarwal.ambika at gmail.com> > wrote: > > Hi, > > > > I had asked earlier from my another ID about duplicating a basic block, > but > > that server is down for moment. > > I was given suggestion to use CloneBasicBlock, but when I used it I get > an > > error : > > > > While deleting: i32* %a > > Use still stuck around after Def is destroyed: store i32* %a, i32** %p, > > align 4 > > opt: /home/ambika/llvm_3/llvm-2.6/lib/VMCore/Value.cpp:81: virtual > > llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a > value > > is destroyed!"' failed. > > 0 opt 0x08471218 > > Aborted > > > > This message is printed inside destructor of class value . > > Now I dont understand that after all the instructions are duplicated why > > does thios kind of error come?? > > > > I will be very thankful if someone can help me. > > As the message says, the value being destroyed is used. Check users of > this value. You'll have to update them to use something else before > destroying the value. There is not any magic utility that does > everything. Take a look at how CloneBasicBlock is used other places > and try to update your pass accordingly. > > - > Devang >Thanks, Ambika -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100607/6e2494d4/attachment.html>
I have checked the way it is used in other file, but the problem is whenever I call CloneBasicBlock, after the block is duplicated it tries to delete some variables and I dont understand that why it does that. I am just trying to duplicate a single block, and that is giving error. I really dont understand why does it wants to delete it... On Fri, Jun 4, 2010 at 10:40 PM, Devang Patel <devang.patel at gmail.com>wrote:> On Fri, Jun 4, 2010 at 2:15 AM, Ambika Agarwal <agarwal.ambika at gmail.com> > wrote: > > Hi, > > > > I had asked earlier from my another ID about duplicating a basic block, > but > > that server is down for moment. > > I was given suggestion to use CloneBasicBlock, but when I used it I get > an > > error : > > > > While deleting: i32* %a > > Use still stuck around after Def is destroyed: store i32* %a, i32** %p, > > align 4 > > opt: /home/ambika/llvm_3/llvm-2.6/lib/VMCore/Value.cpp:81: virtual > > llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a > value > > is destroyed!"' failed. > > 0 opt 0x08471218 > > Aborted > > > > This message is printed inside destructor of class value . > > Now I dont understand that after all the instructions are duplicated why > > does thios kind of error come?? > > > > I will be very thankful if someone can help me. > > As the message says, the value being destroyed is used. Check users of > this value. You'll have to update them to use something else before > destroying the value. There is not any magic utility that does > everything. Take a look at how CloneBasicBlock is used other places > and try to update your pass accordingly. > > - > Devang >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100607/c87fb7a1/attachment.html>
Hi, I am so sorry for posting the same doubt again. But I am really stuck with the problem Whichever block I try to duplicate , error always come for last "store" instruction in that basic block. Any suggestions would help. Ambika Agarwal wrote:> Hi, > > I had asked earlier from my another ID about duplicating a basic > block, but that server is down for moment. > I was given suggestion to use CloneBasicBlock, but when I used it I > get an error : > > While deleting: i32* %a > Use still stuck around after Def is destroyed: store i32* %a, i32** > %p, align 4 > opt: /home/ambika/llvm_3/llvm-2.6/lib/VMCore/Value.cpp:81: virtual > llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a > value is destroyed!"' failed. > 0 opt 0x08471218 > Aborted > > This message is printed inside destructor of class value . > Now I dont understand that after all the instructions are duplicated > why does thios kind of error come?? > > I will be very thankful if someone can help me. > > Thanks and Regards, > Ambika > MTech, CSE > IIT Bombay > ------------------------------------------------------------------------ > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Reasonably Related Threads
- [LLVMdev] Duplicating a Basic Block
- [LLVMdev] Duplicating a Basic Block
- [LLVMdev] [Fwd: Can someone help me with error while i make my own pass]
- [LLVMdev] [Fwd: Can someone help me with error while i make my own pass]
- [LLVMdev] [Fwd: Can someone help me with error while i make my own pass]