obtaining the address of an instruction...?

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:

instruction
branch

into:

instruction
call somewhere(&branch)
branch

thanks,

-mark

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

Thanks. But I found a work around (some nasty switch hack).