[llvm-dev] Question concerning llvm::BlockAddress class

Brenda So via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 16 13:14:03 PDT 2018


Hi all,

I have a question concerning block address class in LLVM. I am currently
working on a project where I need to obtain and manipulate basic block
virtual addresses. I was searching the web and found the llvm::BlockAddress
class (http://llvm.org/doxygen/classllvm_1_1BlockAddress.html). With this
class I was able to obtain a printout like this:

i8* blockaddress(@func_name, %bb_label)

How do I obtain the virtual memory address from the Block address class?
Can I even do so?

Moreover, I thought that one can only obtain the virtual memory address
after linking the object files together. So how would the BlockAddress
class help me when it's working on the IR level? If BlockAddress class is
not the way to go, is there another api function that I can use to obtain
the addresses?

Thanks!
Brenda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180416/b6a047c8/attachment.html>


More information about the llvm-dev mailing list