search for: dropallreferences

Displaying 20 results from an estimated 45 matches for "dropallreferences".

2013 Mar 08
0
[LLVMdev] How to use dropAllReferences in dropAllReferences
Hi all. I want to know how the dropAllReferences() is used in the FunctionPass MoudlePass and so on. If I want to delete the node about function in Module, I can use it ,am i right? Thanks for your help. yao. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/...
2011 Feb 24
2
[LLVMdev] Valgrind memcheck errors in llvm
...by 0x9C6B103: llvm::iplist<llvm::BasicBlock, llvm::ilist_traits<llvm::BasicBlock> >::erase(llvm::ilist_iterator<llvm::BasicBlock>) (ilist.h:463) ==24227== by 0x9C69D1E: llvm::BasicBlock::eraseFromParent() (BasicBlock.cpp:101) ==24227== by 0x9CB6940: llvm::Function::dropAllReferences() (Function.cpp:233) ==24227== by 0x9D23754: llvm::Module::dropAllReferences() (Module.cpp:449) ==24227== by 0x9D225E9: llvm::Module::~Module() (Module.cpp:70)
2013 Sep 18
1
[LLVMdev] In llvm, how can I delete a whole branch elegantly?
...is absent), one of which should be pruned; let's name these 2 branches bb1 and bb2 and bb2 is to be pruned. 2. Find their nearest common post dominator, bb_join 3. Create a new branInst bb_new whose successors are bb1 and bb_join; replace the original BranchInst with bb_new 4. For bb2, dropAllReferences && eraseFromParent However since bb2 also has several successors(before bb_join), which are not pruned together with bb2. Is there any existing API to remove them as well? Also, in Step 4, could I just call bb2->eraseFromParent() without dropping any references? I am a bit confused wit...
2012 Jan 12
3
[LLVMdev] 'opt' Aborted "While deleting: void %"
...sicBlock*) + 30 16 libLLVM-2.9.so 0xf696a9a8 llvm::iplist<llvm::BasicBlock, llvm::ilist_traits<llvm::BasicBlock> >::erase(llvm::ilist_iterator<llvm::BasicBlock>) + 48 17 libLLVM-2.9.so 0xf696958f llvm::BasicBlock::eraseFromParent() + 77 18 libLLVM-2.9.so 0xf69b7b11 llvm::Function::dropAllReferences() + 159 19 libLLVM-2.9.so 0xf6a2dc59 llvm::Module::dropAllReferences() + 81 20 libLLVM-2.9.so 0xf6a2caf2 llvm::Module::~Module() + 50 21 opt 0x08081e36 std::auto_ptr<llvm::Module>::~auto_ptr() + 36 22 opt 0x0807d5a4 main + 5045 23 libc.so.6 0xf57bdbd6 __libc_start_m...
2008 Jul 11
0
[LLVMdev] Cloning Functions
...ule to what they are in the pristine function clones (they were changed to External by deleteBody). 8. Delete all the pristine Function clones, they are now cloned into the cloned Module. This should work as I understand things, but I have a question about Function::deleteBody. It calls dropAllReferences which has the following scary comment: /// dropAllReferences() - This method causes all the subinstructions to "let /// go" of all references that they are maintaining. This allows one to /// 'delete' a whole module at a time, even though there may be circular /// refer...
2012 Jan 12
0
[LLVMdev] 'opt' Aborted "While deleting: void %"
...ibLLVM-2.9.so 0xf696a9a8 llvm::iplist<llvm::BasicBlock, > llvm::ilist_traits<llvm::BasicBlock> >> ::erase(llvm::ilist_iterator<llvm::BasicBlock>) + 48 > 17 libLLVM-2.9.so 0xf696958f llvm::BasicBlock::eraseFromParent() + 77 > 18 libLLVM-2.9.so 0xf69b7b11 llvm::Function::dropAllReferences() + 159 > 19 libLLVM-2.9.so 0xf6a2dc59 llvm::Module::dropAllReferences() + 81 > 20 libLLVM-2.9.so 0xf6a2caf2 llvm::Module::~Module() + 50 > 21 opt 0x08081e36 std::auto_ptr<llvm::Module>::~auto_ptr() + 36 > 22 opt 0x0807d5a4 main + 5045 > 23 libc.so.6...
2008 Feb 15
2
[LLVMdev] Possible Bad Assertion in Value.cpp
...; Is the assertion an error, or should BasicBlock's deallocate >> instructions so that there are no dangling def-use chains? >> > > You probably have an instruction that you removed from the module but > didn't delete. The module dtor works fine: it uses > 'dropAllReferences' to clear the operands of instructions before > deleting the instructions themselves. > Okay. I wasn't aware I had to delete unneeded values as well as remove them. I'll try that. Thanks. -- John T. > -Chris > _______________________________________________ > LLV...
2008 Jul 09
2
[LLVMdev] Cloning Functions
On Wednesday 09 July 2008 13:24, Devang Patel wrote: > Is it possible to explain intended use of original unoptimized version ? bugpoint. I want to run it on the IR produced by our frontend. This will help us generate new LLVM tests we can send upstream. We've fixed bugs that aren't caught by the upstream tests and it would be nice to capture the problem and make the test
2012 Jan 25
2
[LLVMdev] PLEASE help with Alias Analysis initialization assertion at the end of my pass
...m::ilist_traits<llvm::BasicBlock> >::erase (this=0x80be818, where=...) at /x/grwright/llvm/llvm-2.9/include/llvm/ADT/ilist.h:463 #19 0xf71c658f in llvm::BasicBlock::eraseFromParent (this=0x8145cf8) at /x/grwright/llvm/llvm-2.9/lib/VMCore/BasicBlock.cpp:101 #20 0xf7214b11 in llvm::Function::dropAllReferences (this=0x80be7e8) at /x/grwright/llvm/llvm-2.9/lib/VMCore/Function.cpp:233 #21 0xf728ac59 in llvm::Module::dropAllReferences (this=0x80a9690) at /x/grwright/llvm/llvm-2.9/lib/VMCore/Module.cpp:449 #22 0xf7289af2 in ~Module (this=0x80a9690, __in_chrg=<value optimized out>) at /x/grwright...
2012 Jan 13
1
[LLVMdev] 'opt' Aborted "While deleting: void %"
...f696a9a8 llvm::iplist<llvm::BasicBlock, >> llvm::ilist_traits<llvm::BasicBlock> >>> ::erase(llvm::ilist_iterator<llvm::BasicBlock>) + 48 >> 17 libLLVM-2.9.so 0xf696958f llvm::BasicBlock::eraseFromParent() + 77 >> 18 libLLVM-2.9.so 0xf69b7b11 llvm::Function::dropAllReferences() + 159 >> 19 libLLVM-2.9.so 0xf6a2dc59 llvm::Module::dropAllReferences() + 81 >> 20 libLLVM-2.9.so 0xf6a2caf2 llvm::Module::~Module() + 50 >> 21 opt 0x08081e36 std::auto_ptr<llvm::Module>::~auto_ptr() + >> 36 >> 22 opt 0x0807d5a4 main + 504...
2015 Jan 14
2
[LLVMdev] Crash on invalid during LLVMContext destruction MDNode::dropAllReferences
...le.com> wrote: > >> Not at a computer right now, but it looks like teardown isn't working > correctly. Do you have an asserts build? Does an assertion fire there? > >> > >> That was with an asserts build. > >> > >> Looking at the stack trace, dropAllReferences() is being called on a > node, so it sets its operands to nullptr, and some operand has RAUW support > (so the tracking needs to be dropped) but looks like it might have been > deleted or is otherwise corrupt. Hard to tell though. > >> > >> Does this reproduce from prepr...
2012 Jan 25
1
[LLVMdev] PLEASE help with Alias Analysis initialization assertion at the end of my pass
...gt;> ::erase (this=0x80be818, where=...) at >> /x/grwright/llvm/llvm-2.9/include/llvm/ADT/ilist.h:463 #19 0xf71c658f in >> llvm::BasicBlock::eraseFromParent (this=0x8145cf8) at >> /x/grwright/llvm/llvm-2.9/lib/VMCore/BasicBlock.cpp:101 #20 0xf7214b11 in >> llvm::Function::dropAllReferences (this=0x80be7e8) at >> /x/grwright/llvm/llvm-2.9/lib/VMCore/Function.cpp:233 #21 0xf728ac59 in >> llvm::Module::dropAllReferences (this=0x80a9690) at >> /x/grwright/llvm/llvm-2.9/lib/VMCore/Module.cpp:449 #22 0xf7289af2 in >> ~Module (this=0x80a9690, __in_chrg=<value opti...
2012 Jan 25
0
[LLVMdev] PLEASE help with Alias Analysis initialization assertion at the end of my pass
...BasicBlock> >> ::erase (this=0x80be818, where=...) at > /x/grwright/llvm/llvm-2.9/include/llvm/ADT/ilist.h:463 #19 0xf71c658f in > llvm::BasicBlock::eraseFromParent (this=0x8145cf8) at > /x/grwright/llvm/llvm-2.9/lib/VMCore/BasicBlock.cpp:101 #20 0xf7214b11 in > llvm::Function::dropAllReferences (this=0x80be7e8) at > /x/grwright/llvm/llvm-2.9/lib/VMCore/Function.cpp:233 #21 0xf728ac59 in > llvm::Module::dropAllReferences (this=0x80a9690) at > /x/grwright/llvm/llvm-2.9/lib/VMCore/Module.cpp:449 #22 0xf7289af2 in > ~Module (this=0x80a9690, __in_chrg=<value optimized > >...
2012 Jan 23
1
[LLVMdev] Assertion `AA && "AA didn't call InitializeAliasAnalysis in its run method!"' failed.
...m::ilist_traits<llvm::BasicBlock> >::erase (this=0x80be818, where=...) at /x/grwright/llvm/llvm-2.9/include/llvm/ADT/ilist.h:463 #19 0xf71c658f in llvm::BasicBlock::eraseFromParent (this=0x8145cf8) at /x/grwright/llvm/llvm-2.9/lib/VMCore/BasicBlock.cpp:101 #20 0xf7214b11 in llvm::Function::dropAllReferences (this=0x80be7e8) at /x/grwright/llvm/llvm-2.9/lib/VMCore/Function.cpp:233 #21 0xf728ac59 in llvm::Module::dropAllReferences (this=0x80a9690) at /x/grwright/llvm/llvm-2.9/lib/VMCore/Module.cpp:449 #22 0xf7289af2 in ~Module (this=0x80a9690, __in_chrg=<value optimized out>) at /x/grwright/llvm/l...
2012 Feb 03
3
[LLVMdev] How can I see what opt tries to delete at the end of a pass?
...sicBlock*) + 30 16 libLLVM-2.9.so 0x5646c9a8 llvm::iplist<llvm::BasicBlock, llvm::ilist_traits<llvm::BasicBlock> >::erase(llvm::ilist_iterator<llvm::BasicBlock>) + 48 17 libLLVM-2.9.so 0x5646b58f llvm::BasicBlock::eraseFromParent() + 77 18 libLLVM-2.9.so 0x564b9b11 llvm::Function::dropAllReferences() + 159 19 libLLVM-2.9.so 0x5652fc59 llvm::Module::dropAllReferences() + 81 20 libLLVM-2.9.so 0x5652eaf2 llvm::Module::~Module() + 50 21 opt 0x08081e36 std::auto_ptr<llvm::Module>::~auto_ptr() + 36 22 opt 0x0807d5a4 main + 5045 23 libc.so.6 0x5740bbd6 __libc_start_m...
2016 Oct 26
0
How does one reduce a function CFG to its entry block?
Hello,  I wish to reduce a function CFG to its entry block. I wrote the following code using lib/IR/Function.cpp/Function::dropAllReferences() (from llvm-3.6) as reference:  Function *F; // Suitably initialized. BasicBlock *FEntryBlock = &F->getEntryBlock(); FEntryBlock->getTerminator()->eraseFromParent(); FEntryBlock->removeFromParent(); for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I)    I->...
2002 Nov 27
1
[LLVMdev] Instruciton replacement
...ve the following snippet of code: switch((*I)->getOpcode()) { case Instruction::Malloc: { AllocaInst *AI; AI = new AllocaInst(cast<AllocationInst>(*I)->getAllocatedType(), cast<AllocationInst>(*I)->getArraySize()); (*I)->replaceAllUsesWith(AI); // (*I)->dropAllReferences(); // (*I)->getParent()->getInstList().erase(*I); // delete (*I); // delete(AI); } break; running the code will report: Leaked objects found: after running pass 'move memory objects from the heap to the stack' LLVM Value subclasses leaked: alloca uint ; <uint...
2008 Feb 15
0
[LLVMdev] Possible Bad Assertion in Value.cpp
...alue has no > uses. > > Is the assertion an error, or should BasicBlock's deallocate > instructions so that there are no dangling def-use chains? You probably have an instruction that you removed from the module but didn't delete. The module dtor works fine: it uses 'dropAllReferences' to clear the operands of instructions before deleting the instructions themselves. -Chris
2008 Feb 15
0
[LLVMdev] Possible Bad Assertion in Value.cpp
>> You probably have an instruction that you removed from the module but >> didn't delete. The module dtor works fine: it uses >> 'dropAllReferences' to clear the operands of instructions before >> deleting the instructions themselves. >> > Okay. I wasn't aware I had to delete unneeded values as well as > remove > them. I'll try that. The convention is that 'remove' unlinks the object from the IR, a...
2005 Nov 02
1
[LLVMdev] Memory management and LLVM types
...at module. - Delete the module. - Use these types again. I'm using electric fence, so I don't *think* that it is luck, but I could be wrong. Should I be deleting the pointers that I get out of the module? A related question is how should I delete the module? I see that there is a "dropAllReferences" method. Is this called automatically for me from the Module's destructor? Thanks, Evan Jones -- Evan Jones http://evanjones.ca/