This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Write minimal types section
ClosedPublic

Authored by sbc100 on Jan 31 2018, 10:08 AM.

Details

Summary

Don't include type signatures that are not referenced by
some relocation.

We don't include this in the -gc-sections settings since
we are alwasy building the type section from scratch,
just like we do the table elements.

In the future we might want to unify the relocation
processing which is currently done once for gc-sections
and then again for building the sympathetic type and
table sections.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

sbc100 created this revision.Jan 31 2018, 10:08 AM
sbc100 edited the summary of this revision. (Show Details)Jan 31 2018, 10:14 AM
sbc100 added reviewers: ruiu, ncw.
ncw accepted this revision.Jan 31 2018, 10:42 AM

LGTM, can't see any potential problems (just endless merge conflicts coming up - I've just finished rebasing onto the GC changes...)

wasm/InputFiles.h
104

There is a class llvm::BitVector, but I don't know whether it's preferred over std::vector<bool> (presumably, or it wouldn't have been written?)

This revision is now accepted and ready to land.Jan 31 2018, 10:42 AM
ruiu added inline comments.Jan 31 2018, 3:05 PM
wasm/InputFiles.h
104

I'm fine with this code. I prefer std containers over llvm's in this case because I don't think there's a large difference.

This revision was automatically updated to reflect the committed changes.