All Projects → eduardo-elizondo → cppcon2017

eduardo-elizondo / cppcon2017

Licence: MIT license
Optimizing compilation times of Generated Code with Templates

Programming Languages

Thrift
134 projects
python
139335 projects - #7 most used programming language

cppcon2017

Optimizing compilation times of Generated Code with Templates

Requirements:

Build the tools:

  • ./tools/build_deps.sh

This will download, patch, and build clang, llvm, and templight.

What do the patches include?

Time Report:

These patches add modifications to Clang's frontend to gather more metrics on compilation times

Templight:

Tools:

How to use:

If you have CMake follow: example/CMakeLists.txt

Time Report:

  • ./external/llvm_build/bin/clang++ -ftime-report a.cpp

Templight:

  • ./external/llvm_build_bin/templight++ -Xtemplight -profiler -Xtemplight -ignore-system -c a.cpp
  • ./tools/get_inst_times.sh results your_build/file.cpp.o.trace.pbf

For more flags that you can use for templight, visit the github in the Requirement section. In general, "profiler" and "ignore-system" have been the most useful ones.

Questions?

Please create a github issue and we can start a discussion!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].