Want to know about bolt and llvm post planning

I want to make a requirement in openeuler and understand that the bolt source code is now integrated into the llvm source code, which is a subdirectory under the llvm source code.

I’d like to ask whether bolt wants to build llvm IR from binary code and start the llvm back-end compilation function; Or how to integrate bolt and llvm in the later stage, and whether there are relevant plans?

Hi Wenmj201582,

BOLT does not raise binary code to LLVM IR and there are no immediate plans to do so.

BOLT’s IR is pretty close to binary level. In fact, it uses MC instructions, which is what LLVM uses to represent code in its assemblers/disassemblers. In this sense, BOLT is closer to a disassembler than it is to a decompiler. Raising to LLVM IR and running back-end passes would be similar to a decompiler project because LLVM IR is closer to C. See GitHub - microsoft/llvm-mctoll: llvm-mctoll

Regarding integration of LLVM and BOLT, note that BOLT is independent of the compiler and can be used in any binary, although it works best in gcc or clang generated C++ binaries.

Best regards,


(post deleted by author)

Thank you very much for your reply.
wish you all the best.

1 Like

Speaking of raising binary code to IR, what’s going on with McSema?