View analytic
Wednesday, October 17 • 11:30am - 12:00pm
Efficiently Implementing Runtime Metadata with LLVM

Sign up or log in to save this to your schedule and see who's attending!

Rich runtime metadata can enable powerful language features and tooling support, but also comes with code size, memory usage, and startup time costs. To mitigate these costs, the Swift programming language compiler uses some clever techniques and under-explored corners of LLVM to optimize metadata to minimize size, startup time, and memory costs while making it usable both in-process and offline, avoiding some of the costs traditionally associated with vtables, RTTI, and other data structures in languages like C++. This talk goes into detail of some of these techniques, including using relative references to make metadata position-independent, using mangled type names as a compact and offline-interpretable representation of language concepts, and organizing optional reflection metadata into its own segment of binaries so it can be discovered at load time and optionally stripped from binaries in cases where it is not desired. These techniques could also be applied to other languages, including C++, to reduce the costs of these data structures.


Doug Gregor


Joe Groff


Wednesday October 17, 2018 11:30am - 12:00pm
1 - General Session (Rm LL20ABC)

Attendees (38)