This is an archive of the discontinued LLVM Phabricator instance.

[lld][WebAssembly] Support for growable tables
ClosedPublic

Authored by jgravelle-google on Aug 7 2019, 6:10 PM.

Details

Reviewers
sbc100
Summary

Adds --growable-table flag to handle building wasm modules with tables
that can grow.

Wasm tables that we use to store function pointers. In order to add functions
to that table at runtime, we need to either preallocate space, or grow the table.
In order to specify a table with no maximum size, we need some flag to handle
that case, separately from a potential --max-table-size= flag.

Note that the number of elements in the table isn't knowable until link-time,
so it's unclear if we will want a --max-table-size= flag in the future.

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2019, 6:10 PM
sbc100 accepted this revision.Aug 7 2019, 7:29 PM
This revision is now accepted and ready to land.Aug 7 2019, 7:29 PM
ruiu added a subscriber: ruiu.Aug 8 2019, 1:04 AM

I feel that the help message and the commit message are a bit too terse. Could you add a bit more about what is the "table" here? If what that"table" means is obvious for most wasm linker users, we probably don't need to explain it, but I don't believe that's the case.

  • More precise help message
jgravelle-google edited the summary of this revision. (Show Details)Aug 9 2019, 11:13 AM

Landed as 92ed86d239cd