Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 892 Bytes

README.md

File metadata and controls

26 lines (21 loc) · 892 Bytes

CFG Flattening LLVM Pass

Control-flow Graph Flattening pass for LLVM 17

Build the pass

$ mkdir build
$ cd build
$ cmake ..
$ make
$ cd ..

Run the pass

# 1 iteration (default)
$ clang -fpass-plugin=`echo build/pass/FlattenCFGPass.*` something.c

# 3 iterations
$ clang -fplugin=`echo build/pass/FlattenCFGPass.*` -fpass-plugin=`echo build/pass/FlattenCFGPass.*` something.c -mllvm -iterations=3

Examples

Original CFG One iteration Two iterations