[LLVMdev] Getting basic block address offset from its parent function

Ziqiang Patrick Huang ziqiang.huang1001 at gmail.com
Fri Feb 27 15:30:51 PST 2015


Hi, all

Is there a way of getting the basic block offset from its parent function ?

What I'm trying to do is to get an execution count of each basic blocks, so
I need to know the starting address of each basic blocks. Obviously we
can't get the absolute address before linking the program, but the offset
relative to parent function should be available so I can take it and get
the function start address from objdump then figure out each basic block's
absolute address.

Or is there another way of doing this ...

Any suggestion is very much appreciated
Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150227/355e96c4/attachment.html>


More information about the llvm-dev mailing list