Skip to content

OrderLab/phoenix-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phoenix Compiler

Dataflow analysis and instrumenter for Phoenix safe region

Dependencies

Build

mkdir build && cd build
cmake .. -DLLVM_DIR=/path/to/llvm-15/lib/cmake/llvm/
# example: cmake .. -DLLVM_DIR=/opt/local/libexec/llvm-15/lib/cmake/llvm/
make -j`nproc`

TBA

Usage

Compile Application

Example: Redis

export LLVM_COMPILER=clang
CC=wllvm make USE_JEMALLOC=no -j
extract-bc src/redis-server   # generates src/redis-server.bc
# for readable LLVM IR: llvm-dis src/redis-server.bc

Instrument

The legacy LLVM PM (Pass Manager) is disabled in LLVM 13 and above by default, but can still be enabled with a command line toggle. Switch to new PM in the future.

opt -enable-new-pm=0 -load=build/lib/PhoenixAnalysisPass.dylib -phoenix-analysis test/leaf.bc -o test/leaf-instrumented.bc

TBA

About

Phoenix compiler for automated unsafe region analysis and instrumentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published