Tau clang plugin
Use
The aim of this plugin is to facilitate the use of TAU. Parsing a function-listing file, the TAU plugin runs a function pass on each function from the original source, adding them to be instrumented if the function-listing file specifies it.
Compilation and installation
As TAU relies on LLVM's Intermediate Representation, the TAU plugin is built upon an LLVM installation. If no installation is currently accessible LLVM's installation can be done by following these commands:
git clone https://github.com/llvm/llvm-project.git
cd llvm-project/llvm
mkdir build; cd build
cmake ../../llvm -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../install -DLLVM_ENABLE_PROJECTS="clang;mlir;polly;flang;libcxx;libcxxabi"
make -j install
That being done the plugin can be built upon LLVM:
git clone https://github.com/coti/tau-llvm-plugin.git
cd tau-llvm-plugin
mkdir build; cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../install -DLLVM_ROOT=/PATH/TO/LLVM/INSTALLATION/install
make -j install
Running it
Packaging
Linux
Mac OS
brew install --build-from-source llvm