[llvm-dev] Annotate generated machine code / binary with LLVM basic block information

Yizhou Wei via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 1 06:33:23 PST 2019


Hi everyone,
What I want to do is to generate an X86 binary that is annorated with LLVM
basic block information, which can be helpful for further trace-based
analysis. After I go through the documents, the only way I can think of is
writing a MachineFunctionPass and adding dummy instructions to the
beginning and end of each basic block that indicates its ID. Since this
requires a recompilation of entire LLVM, which is far from ideal, so I
follow the suggestion on the documentation and come and ask here first. I
am really new to LLVM, so any suggestions would be very appreciated!

Yizhou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190301/01834cdf/attachment.html>


More information about the llvm-dev mailing list