[LLVMdev] obtaining the address of an instruction...?
markoskin at gmail.com
Sun Nov 4 10:25:50 PST 2007
Thanks. But I found a work around (some nasty switch hack).
On Nov 3, 2007, at 10:22 PM, Gordon Henriksen wrote:
> On Nov 4, 2007, at 01:00, Mark Oskin wrote:
>> I'm currently working on a compiler pass, where it would be vastly
>> simplified if I could obtain the address of an instruction. Any
>> suggestions on how to do this? Effectively, I'm trying to translate
>> code that looks like this:
>> call somewhere(&branch)
> Hi Mark,
> The LLVM IR does not directly support this. If you elaborate upon what
> you're trying to accomplish, perhaps the list can suggest an approach
> that'll work for you.
> The MachineFunction representation does allow labels to be inserted to
> refer to arbitrary instructions.
> — Gordon
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev