[rfc][gold plugin] Fix pr19901

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jul 29 21:41:11 PDT 2014


This is a second version of the fix  of pr19901. The main difference
is that now we have tests :-)

The patch now implements the command lines options the previous
version was missing and includes a fix to the obj-path option that is
broken for ages.

The patch can bootstrap with LTO and is a bit faster. I tested it by
linking clang with -plugin-opt=emit-llvm. With this patch in my
machine a Release build takes 15.768s, trunk takes 19.272.

The peak memory usage as reported by massif is about the same for
gold. For "ar --plugin" the patch is quiet a bit better since ar never
calls all_symbols_read_hook and we are never forced to materialize a
full module. The peak memory creating libclangSema.a is 31,740,848
with trunk but only 4,275,192 with the patch.

What I think is missing for now is just refactoring to avoid code
duplication. I can hopefully fix that tomorrow. Once this patch is in
the next item is adding support for comdats.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 26461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140730/3a0c0e90/attachment.bin>


More information about the llvm-commits mailing list