This is an archive of the discontinued LLVM Phabricator instance.

Add comdat support.
ClosedPublic

Authored by rafael on Oct 9 2015, 10:23 AM.

Details

Reviewers
ruiu

Diff Detail

Repository
rL LLVM

Event Timeline

rafael updated this revision to Diff 36960.Oct 9 2015, 10:23 AM
rafael retitled this revision from to Add comdat support..
rafael updated this object.
rafael set the repository for this revision to rL LLVM.
rafael added a subscriber: llvm-commits.
ruiu edited edge metadata.Oct 9 2015, 10:46 AM

I'm not in favor of the optimization you made by merging two hash tables, one for group merging and the other for regular symbols, into one hash table using tagged pointer. I'd really want to simply use StringSet for group dedup'ing and keep the symbol table as is.

Except that the patch looks good overall.

rafael updated this revision to Diff 36974.Oct 9 2015, 12:03 PM
rafael updated this revision to Diff 36975.
rafael edited edge metadata.
rafael removed rL LLVM as the repository for this revision.
rafael set the repository for this revision to rL LLVM.

It was missing some cleanups.

emaste added a subscriber: emaste.Oct 9 2015, 12:16 PM
ruiu accepted this revision.Oct 9 2015, 12:18 PM
ruiu edited edge metadata.

This looks much better! A few minor comments.

ELF/OutputSections.cpp
551

Add a comment saying that returning false if Sym is pointing to a discarded section group member.

ELF/SymbolTable.h
98

You are not using ComdatSet type here. Maybe we should just remove ComdatSet typedef and always write as DenseSet<StringRef>?

This revision is now accepted and ready to land.Oct 9 2015, 12:18 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r249881.