libWorklist handles initialization and manipulation of a queue of LLVM instructions.
$ git clone this_repository.git
$ cd this_repository
$ mkdir build; cd build
$ cmake .. && make
$ make install
- Path to shared libary and headers should be searchable by the compiler
- In your LLVM IR pass:
- Include the header file,
Worklist/Worklist.h
- Use namespace
WorklistUtil
- Include the header file,
- Load libWorklist.so before your pass's shared library
opt -load /usr/local/lib/libWorklist.so -load yourPass.so ...
The worklist can be initialized by a Module, Function, Basicblock and Instruction.
// M is a pointer to LLVM Module
WorklistUtil::Worklist W(M);