[LLVMdev] unique id for a llvm Instruction

Jonas Wagner jonas.wagner at epfl.ch
Thu Aug 29 06:45:41 PDT 2013


>
>
> what if another pointer points to the same instruction?
>

You can have many pointers to the same instruction. However, the address in
memory where that instruction lives is unique. Instruction pointers (or
Value pointers) are thus commonly used as keys in hash tables or similar.
Instructions or Values are almost never copied, so that you won't find the
same instruction at different addresses in memory.

Jonas


On Thu, Aug 29, 2013 at 2:57 PM, Eirini Psallida <eirini_dit at windowslive.com
> wrote:

>  what if another pointer points to the same instruction?
> Is this possible to happen?
>
> Eirini
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130829/abf57374/attachment.html>


More information about the llvm-dev mailing list