When the explicit type id macros were added, they unfortunately moved
the definitions of the TypeID::get functions to the .cpp files. This commit
moves the method definition back to the header and instead uses a
global variable (declared in the header as well) to anchor the definition
to a specific translation unit. This leads to much more optimal code
for TypeID::get, and has improved the compile time of some benchmarks
by anywhere from 3.5-10%.
Details
Details
- Reviewers
mehdi_amini
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo