Zhang Qiuyu
2004-Aug-19 20:13 UTC
[LLVMdev] How could I get memory address for each basic block?
On the pervious mail, I am trying to add label for each basic basic because I think I could get address by using nm if nm can show the address of each label, but it seems not . so do you guys have some idea how to get address for each basic block? Thanks.>I am trying to get the memory address of each basic block. So far I am trying to add the label >into each basic block, actually I need add the label at front of each basic block and then I >can use command 'nm' to find the memory address for each basic block. That's the way I got. >I don't know if there is another way to do it. Thanks.>So now I need add label to each basic block, I don't know how to do it. Thanks for any >response.>Qiuyu-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040819/c10dc5d2/attachment.html>
Misha Brukman
2004-Aug-19 22:11 UTC
[LLVMdev] How could I get memory address for each basic block?
On Thu, Aug 19, 2004 at 01:13:42PM -0700, Zhang Qiuyu wrote:> On the pervious mail, I am trying to add label for each basic basic > because I think I could get address by using nm if nm can show the > address of each label, but it seems not . so do you guys have some > idea how to get address for each basic block? Thanks.LLVM does not have a notion of C-style 'labels' that you can address and use as parameters. LLVM labels are simply NAMES of basic blocks, and they are printed out as `labels'. You can 'set' a name for a BasicBlock, but that's not what you are looking for, please see my other email for more details. -- Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu
Vikram S. Adve
2004-Aug-19 22:39 UTC
[LLVMdev] How could I get memory address for each basic block?
Qiuyu, The dynamic optimization project (an internal research project in our group) uses some way to map LLVM basic blocks to native code addresses. If this is what you want, perhaps you can ask Brian Gaeke (gaeke at uiuc.edu) to give you some information about how that is done. --Vikram http://www.cs.uiuc.edu/~vadve http://llvm.cs.uiuc.edu/ On Aug 19, 2004, at 5:11 PM, Misha Brukman wrote:> On Thu, Aug 19, 2004 at 01:13:42PM -0700, Zhang Qiuyu wrote: >> On the pervious mail, I am trying to add label for each basic basic >> because I think I could get address by using nm if nm can show the >> address of each label, but it seems not . so do you guys have some >> idea how to get address for each basic block? Thanks. > > LLVM does not have a notion of C-style 'labels' that you can address > and > use as parameters. LLVM labels are simply NAMES of basic blocks, and > they are printed out as `labels'. > > You can 'set' a name for a BasicBlock, but that's not what you are > looking for, please see my other email for more details. > > -- > Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
Seemingly Similar Threads
- [LLVMdev] How could I get memory address for each basic block?
- [LLVMdev] How could I get memory address for each basic block?
- [LLVMdev] How could I get memory address for each basic block?
- [LLVMdev] Could insert a label into basic block?
- [LLVMdev] Re:Re:Is there any way to modify basic block like adding junk code