In this talk I'll tell you about C++ AoT compiler, JiTs for dynamic language, JiTs for binary translation, and dive back 20, 30, 40, 50, 60 years, way
back into compiler history and read wonderful academic “just-in-time” compilation (JiT)
techniques since the 1960s. Broadly, JiT compilation includes any
translation performed dynamically, after a program has started
execution. We examine the motivation behind “just-in-time” compilation (JiT)
techniques since the 1960s. Broadly, JiT compilation includes any
translation performed dynamically, after a program has started
execution. We examine the motivation behind
Recap: Translation Units
• In C++, translation is performed in nine well-defined stages
• Phases 1 through 6 perform lexical analysis (the pre-processor)
• The output of Phase 6 is a translation unit unit
• A translation unit is defined [5.1] as
• A source file
• Plus all the headers and source files included via #include directives
• Minus any source lines skipped by conditional inclusion preprocessing template-id
• A declaration introduces one or more names into a translation unit
• A declaration may also re-introduce a name into a translation unit
• A definition is a declaration that fully defines the
Top level
○
version, revision
○
sets
●
Sets
○
family-name, name
○
visible-sets, translation-units
●
Translation units
○
object, source, work-directory
○
arguments, baseline-arguments, local-arguments Scanning performance metrics
21Build Databases: Sets
●
Each set has:
○
Name
○
Family name
○
Translation units
○
Visible sets (names of sets that provide modules that may be imported in this set)
● targets)
●
Using “visible sets”, the target graph can be known by tooling
22Build Databases: Translation Units
●
This is where existing compile database entries start showing up
○
Object (uniqueness