[PATCH] BumpPtr allocate SimpleReferences

kledzik at apple.com kledzik at apple.com
Thu Dec 4 11:47:52 PST 2014


>But using the BumpVector makes the code cleaner too right ? 
Only because you are adding new BumpVector code.  We could also add a new BumpList class to ADT and that would make the lld code very clean too.

>and also the memory sanitizers will not show any more leaks as they are going to be freed.
That is a false negative.  There will be leaks (unuseable memory lost) in the BumPtr pools.

> Another possiblity would be to resize the BumpVector by the size of references we need completely(by counting the number of relocation records).
On mach-o, there is not a one-to-one mapping of relocations to references.  Also that would take an extra pass to group relocs by atom before creating the References.  Right now, it takes one pass to iterate across all relocs, create a Reference, then figure out what atom to add it to.

http://reviews.llvm.org/D6518






More information about the llvm-commits mailing list