This code has been developed as a quick test in a weekend to evaluate how feasible it would have been to use LLVM-IR optimizations to simplify a TritonAST.
The steps are:
- getting an unrolled TritonAST;
- convert it to LLVM-IR via the TritonAstToLLVMIR function;
- get the simplified TritonAST as output with the LLVMIRToTritonAst function.
It's important to note that this is just an experiment to take the Triton + Arybo efforts in converting TritonAST to LLVM-IR a step further. Optimizing an AST is quite useful sometime, especially when attacking obfuscation or opaque predicates.
- Provide a C++ example showing the described steps.
- Verify the consistency of all the translations.