feature-extractor
is a LLVM analysis pass to extract static program
features for use in machine learning projects. The extracted features
are those present in the following article:
Practical Aggregation of Semantical Program Properties for Machine Learning Based Optimization
This pass has only been tested on Linux, although it is expected to run on MacOS without any modifications; Other platforms may require modifications to the source code (contributions are welcome).
In order to build feature-extractor
from source you will need:
- LLVM 9 or higher
- CMake 3.4.3 or higher
- CMake compatible build system like Make or Ninja
- Modern C++14 compiler (Clang is recommended)
In order to run this pass, you will need a compiler that either emits LLVM IR
to be used with llvm-opt
or can use LLVM out-of-tree passes natively, such
as Clang or Rust.
Example using Clang as compiler and Ninja as build system:
export CC=clang
export CXX=clang++
export CMAKE_GENERATOR=Ninja
export CMAKE_BUILD_TYPE=Release
git clone https://github.com/andrefz/feature-extractor.git
cd feature-extractor
mkdir build
cd build
cmake .. && cmake --build .
Those are the people who contributed to this project, in alphabetical order:
- @andrefz - André F. Zanella
- @leonardohn - Leonardo H. Neumann
This project is licensed under the MIT License.