[llvm-commits] [patch] Refactoring of the llvm mangler
Rafael Avila de Espindola
rafael.espindola at gmail.com
Fri Feb 18 13:07:11 PST 2011
> How does this make LTO faster?
With just this patch, it doesn't.
I noticed that on ELF at least we spend a lot of time before even
getting the list of symbols that are needed. The best way to speed this
up is to have the necessary information in a symbol table like on real
ELF files. One of the things we need is the actual symbol name.
There are some lower hanging fruit (using mmap even for archive
members), but my idea with this patch is to follow it up with
*) Make getNameOnly a nop. This would drop funny features like mangling
"foo bar" to foo_20_bar.
*) Move the windows fastcall mangling to clang
With this the mangler would just be adding a prefix. If we can make it
handle only the linker visible ones, for elf at least it would be a nop
and a gold plugin could just use the IL symbol table instead of asking
libLTO.
> It seems that the major change here is to change the SmallString to a raw_ostream, which seems ok, but but also does seem to require adding raw_svector_ostream's around now. Almost all the clients actually do want to fill in a SmallString after all :)
True. The attached patch addresses the previous comments and keeps the
interface on the existing functions. Only the new ones use streams.
> -Chris
Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: refactor.patch
Type: text/x-patch
Size: 12506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110218/0878ea67/attachment.bin>
More information about the llvm-commits
mailing list