This is an archive of the discontinued LLVM Phabricator instance.

Minimum LTO implementation
ClosedPublic

Authored by rafael on Feb 11 2016, 3:17 PM.

Details

Reviewers
ruiu
Summary

This adds a truly minimum LTO implementation. It doesn't even handle undefined symbols.

The idea is to grow it with the test that were written for the gold plugin. One test at time so that each step is a simple patch.

Diff Detail

Event Timeline

rafael updated this revision to Diff 47736.Feb 11 2016, 3:17 PM
rafael retitled this revision from to Minimum LTO implementation.
rafael updated this object.
rafael added a reviewer: ruiu.
rafael added a subscriber: llvm-commits.
pcc added a subscriber: pcc.Feb 11 2016, 3:21 PM
ruiu added inline comments.Feb 11 2016, 3:42 PM
ELF/Driver.cpp
297–300

Do you know the cost of this initialization? (I mean if it is not cheap, say if it takes more than 10 milliseconds, then we want to do that lazily.)

ELF/InputFiles.cpp
443–446

According to the documentation of raw_svector_ostream, it is guranteed that the output is not buffered, so you don't need to enclose it in a narrower scope.

ELF/InputFiles.h
192

Ah, this is a nice way of initializing a StringSaver.

ELF/SymbolTable.cpp
83
// LLVM bitcode file
99

This function needs a comment.

116

You can remove this scope.

126

So you included Driver.h just for this line? If so, we want to move this buffer somewhere else so that we don't need to include that header.

130

This function needs a comment.

silvas added a subscriber: silvas.Feb 11 2016, 5:46 PM
silvas added inline comments.
test/ELF/lto-start.ll
6

Does it make sense to put all LTO tests in a subdirectory? I expect we'll have quite a few.

rafael updated this revision to Diff 47811.Feb 12 2016, 8:36 AM

Address review comments.

ruiu accepted this revision.Feb 12 2016, 9:52 AM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 12 2016, 9:52 AM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r260726.