-
Notifications
You must be signed in to change notification settings - Fork 18
Getting Started Instrumentation
You will need to install LLVM to instrument any programs and collect new task graphs. A limited repository of task graphs is available upon request. Current work is using LLVM 3.8 (or greater), if you have an older version of LLVM, please see LLVM Pre 3.8 Support. LLVM 3.9 will require cmake, and so Contech has been updated to this requirement.
For best performance, Contech requires that LLVM is built with LTO support - see LLVM Gold Plugin. To use this support, clang will need to invoke gold instead of ld. You will need zlib to be installed.
We use the following flags when building LLVM.
-DLLVM_BINUTILS_INCDIR=~/source/binutils/include/ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_CXX1Y=ON
Three flags are passed to LLVM's cmake.
- binutils is necessary for LTO
- Optimize the compiler and analysis passes
- CXX11 required to support C++11 features in the LLVM analysis (Contech uses these features)
After LLVM is built / installed, you can run cmake from CONTECH_HOME/llvm-contech
. This will generate a makefile, which will build the pass. No installation required.
One environment variable is used in Contech's instrumentation and task graph generation:
- CONTECH_HOME - Root of Contech repository
After the instrumentation is built, the next step is Collecting a Task Graph.