The C++ Relooper code linked to before comes with some testcases, which are good examples for how to use it. As you can see there, using the Relooper is very simple: There are both C++ and C APIs, and what you do in them is basically
- Define the output buffer
- Create the basic blocks, specifying the text they contain and which other blocks they branch to
- Create a relooper instance and add blocks to it
- Tell the relooper to perform its calculation on those blocks, and finally to render to the output buffer
Is there an example of taking a 'soup' of labeled LLVM Blocks and using the Relooper algorithm?ReplyDelete
It is unclear to me the relationship between the Relooper Block and the LLVM BasicBlocks and LLVM BranchInst.
The emscripten paper has an example. Otherwise you can run emscripten on data and follow code through the stages of LLVM and so forth.ReplyDelete