[llvm-commits] [PATCH] Make Inits FoldingSetNodes

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Jul 14 16:11:58 PDT 2011


On Jul 14, 2011, at 3:09 PM, David A. Greene wrote:

> Hmm...Some of our groups here have testing policies that say if valgrind
> reports a problem, it's a bug.

Heh. Have you told them to avoid grep because it is buggy by their definition? ;-)

>> Short-lived command line tools like TableGen don't really benefit from
>> cleaning up. And it can take a long time to deallocate complicated
>> data structures.
> 
> I wouldn't think deallocation time dominates TableGen.  Does it?

Well, TableGen isn't deallocating anything today, so no ;-)

I don't think deallocating objects would be a significant time sink for TableGen, but it needs to be done right. You must take things down in the right order, so you don't dereference deleted objects accidentally etc. This is probably why you were seeing the pure virtual method calls with your patch. Different compilers delete globals in different orders.

All of the drivers need to deal with that stuff as well. It's a lot of work, and as you have seen, it is easy to introduce subtle bugs while trying to fix a non-bug.

I don't think it is worth the effort, but I wouldn't object to someone else spending the time to do it.

/jakob




More information about the llvm-commits mailing list