Skip to content

Control-flow graph flattening LLVM pass

License

Notifications You must be signed in to change notification settings

Brythzz/cfg-flattening-pass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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