[llvm-dev] JIT compiler - showing generated machine code

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 5 22:12:15 PDT 2016


I'm not sure if there is a ready-made solution, but you can consider using the MC component of LLVM to easily write 
yourself a disassembler (easily == 100 to 200 LOC, if I recall correctly).  For inspiration, take a look at how "llvm-mc 
  --disassemble" works.

-- Sanjoy

Russell Wallace via llvm-dev wrote:
> When using LLVM as a JIT compiler, you can use module.dump() to show the generated intermediate code, which is good.
>
> Is there similarly a programmatic way to show the generated x64 machine code in assembly format?
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list