similar to: [LLVMdev] Memory leaks revisited (and many fixed)

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Memory leaks revisited (and many fixed)"

2004 Nov 19
0
[LLVMdev] Memory leaks revisited (and many fixed)
On Fri, 19 Nov 2004, Morten Ofstad wrote: > I finally took the time to track down the remaining memory leaks beside > the LeakDetector objects and TypeMaps/ValueMaps I already knew about. It > turns out almost all of them came from the command line options module, > so I cleaned up the patch for LeakDetector and made a new patch for > CommandLine. The patches are attached to this
2004 Nov 22
2
[LLVMdev] Memory leaks revisited (and many fixed)
Chris Lattner wrote: >>The four leaks are caused by the ConstantBool::True >>and ConstantBool::False (1 for each object + 1 for the use list dummy) - >> unfortunately they are not so easy to wrap with accessor functions >>since they are public member variables of the ConstantBool class... If >>only everyone used the ConstantBool::get() there would be no problem,
2004 Nov 22
0
[LLVMdev] Memory leaks revisited (and many fixed)
Morten Ofstad wrote: } Chris Lattner wrote: } >>The four leaks are caused by the ConstantBool::True } >>and ConstantBool::False (1 for each object + 1 for the use list dummy) - } >> unfortunately they are not so easy to wrap with accessor functions } >>since they are public member variables of the ConstantBool class... If } >>only everyone used the ConstantBool::get()
2004 Nov 12
2
[LLVMdev] LLVM and memory leaks
On Thu, 11 Nov 2004, Morten Ofstad wrote: > Well, I already tried that, but the destructors crash because they are > referencing other things which are being destroyed - Constants are Users > of each other and there is no easy way to destroy them in the right > order. There are ways around this, but it turns into a two-pass operation: loop over all constants to drop their uses, then
2004 Nov 15
0
[LLVMdev] LLVM and memory leaks
Chris Lattner wrote: >>It would also solve another problem -- We generate new shader code when >>the user changes parameters, because the shader will be executed >>millions of times it makes sense to recompile it with changed constants >>to get maximum optimization. But if some of these parameters are floats, >>and there is no way to destroy constants in LLVM we have
2004 Nov 16
2
[LLVMdev] LLVM and memory leaks
On Mon, 15 Nov 2004, Morten Ofstad wrote: > > If this is a serious issue, it would be straight-forward to add a global > > function to flush out unused constants. I would be happy to accept a > > patch to do that. > > Here is an implementation of this -- there are some things you might not > like about it: > > 1) I had to make the private destroyConstantImpl
2014 Dec 11
2
[LLVMdev] Metadata/Value split has landed
I committed: r224058 = 966942da9e68b59c31ce770e7f94c55a63482c6b r224060 = da75f7277e3a129aed8ef8aa4e0d84de40b76fd4 r224061 = f88e4c8e9171045454b2c8e05054c2af8da3fe4f Let me know if somehow you're still hitting the problem. r224061 removes leak detection entirely from `MachineInstr`. There aren't any leaks to be had there, since they're allocated in a custom allocator. They're
2014 Dec 11
2
[LLVMdev] Metadata/Value split has landed
On Wed, Dec 10, 2014 at 05:27:45PM -0800, Duncan P. N. Exon Smith wrote: > +zalman at google.com > Hi Duncan, This patch plus another small change fixes the assertion failure for me. With the patch alone, the void* overload of addGarbageObject() was being used by MDNode::getTemporary(), so I had to cast the object as an MDNode*: diff --git a/lib/IR/Metadata.cpp b/lib/IR/Metadata.cpp
2014 Dec 10
3
[LLVMdev] Metadata/Value split has landed
> On 2014 Dec 10, at 14:08, Tom Stellard <tom at stellard.net> wrote: > > On Wed, Dec 10, 2014 at 11:21:08AM -0800, Duncan P. N. Exon Smith wrote: >> >>> On 2014 Dec 10, at 08:40, Tom Stellard <tom at stellard.net> wrote: >>> >>> On Tue, Dec 09, 2014 at 09:22:16PM -0800, Duncan P. N. Exon Smith wrote: >>>> The `Metadata`/`Value`
2004 Nov 19
0
[LLVMdev] LLVM and memory leaks
Chris Lattner wrote: > Ok, here's some feedback. This patch looks like a combination of several > different things. If you resubmit the patch in pieces, we can get the > undebatable ones applied first: > > 2. The clearAllValueMaps related changes. These are also fine, but please > make clearAllValueMaps be a static function in the Constant class, >
2004 Jun 17
2
[LLVMdev] ConstantInt::getRawValue
Is there are reason why ConstantInt::getRawValue method can't be moved one step into class hierarchy, into ConstantIntegral::getRawValue The reason I'd like this is that to handle both ConstantInt and ConstantBool, I need the following: if (ConstantInt* CI = dyn_cast<ConstantInt>(V)) { BuildMI(*MBB, IPt, NM::MOVE, 1, Reg).addImm(CI->getRawValue()); } if
2003 Dec 09
2
[LLVMdev] Linking Errors?
Can anyone help with these crazy linking errors?? /home/kgibbs/CS321/CVS/llvm/lib/Debug/vmcore.o(.gnu.linkonce.t._ZN4llvm12Lea kDetector16addGarbageObjectEPKNS_5ValueE+0xd): In function `llvm::LeakDetector::addGarbageObject(llvm::Value const*)': /usr/include/c++/3.2.1/bits/stl_pair.h:148: undefined reference to `llvm::LeakDetector::addGarbageObjectImpl(llvm::Value const*)'
2003 Dec 09
0
[LLVMdev] Linking Errors?
You'll need to include the "support" library to resolve these LeakDetector symbols. You can do this by either placing the path to "support.o" or -lsupport on your link line (in your Makefile). Note that if you use the -l option, you'll likely need to use -L<path> as well to tell the linker where to find "libsupport.a" (file included by the
2004 Jun 17
0
[LLVMdev] ConstantInt::getRawValue
On Thu, 17 Jun 2004, Vladimir Prus wrote: > Is there are reason why ConstantInt::getRawValue method can't be moved one > step into class hierarchy, into ConstantIntegral::getRawValue > > The reason I'd like this is that to handle both ConstantInt and ConstantBool, > I need the following: > > if (ConstantInt* CI = dyn_cast<ConstantInt>(V)) { >
2003 Dec 09
3
[LLVMdev] Linking Errors?
Ok that works but why on earth would I get a runtime error of: Type.cpp:132: const llvm::Type* llvm::Type::getForwardedTypeInternal() const: Assertion `ForwardType && "This type is not being forwarded to another type!"' failed. Aborted For the line of code: MyModule = new Module( std::string("IDontWork")); > -----Original Message----- > From: llvmdev-admin
2004 Jun 19
1
[LLVMdev] ConstantInt::getRawValue
Chris Lattner wrote: > > If getRawValue is moved to ConstantIntegral, I'd simply write > > > > if (ConstantIntegral* CI = dyn_cast<ConstantInt>(V)) { > > BuildMI(*MBB, IPt, NM::MOVE, 1, Reg).addImm(CI->getRawValue()); > > } ... > > > > which is a bit nicer. Of course, if you think it's a good idea, I can > > send a patch.
2014 Dec 10
2
[LLVMdev] Metadata/Value split has landed
> On 2014 Dec 10, at 08:40, Tom Stellard <tom at stellard.net> wrote: > > On Tue, Dec 09, 2014 at 09:22:16PM -0800, Duncan P. N. Exon Smith wrote: >> The `Metadata`/`Value` split (PR21532) landed in r223802 -- at least, the >> C++ side of it. This was a rocky day, but I suppose that's what I get >> for failing to stage the change in smaller pieces. >>
2003 Nov 19
0
[LLVMdev] Need Some Help!
On Wed, 19 Nov 2003, Reid Spencer wrote: > I have a "first version" of Stacker up and running. Structurally its a > lot like llvm-as. When I run it, I get: > Leaked objects found: after running pass 'Function Pass Manager' > LLVM Value subclasses leaked: This is coming from the LLVM "LeakDetector" stuff. The idea is that you are not supposed to create
2010 Jun 14
1
[LLVMdev] Block management
Hi Chris, >> In my code generator, I need to prepare a block and add instructions to it, then insert this block in a function defined later (that is I cannot create the function at the beginning stage become some info are not available yet). I tried to create a block without any "parent" (BasicBlock::Create(getGlobalContext(), "init"), fill it, but how to link it with
2009 Jun 04
2
[LLVMdev] assertion in LeakDetector
I am seeing the following assertion in leak detector. /llvm/lib/VMCore/LeakDetector.cpp:43: void<unnamed>::LeakDetectorImpl<T>::addGarbage(const T*) [with T = void]: Assertion `Ts.count(Cache) == 0 && "Object already in set!"' failed. I am creating a list of instructions using BuildMI() and adding them to a basic block using BB->insert(). I am seeing this