what if another pointer points to the same instruction? Is this possible to happen? Eirini -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130829/ad6ba4bb/attachment.html>
> > > 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>
On 8/29/2013 8:45 AM, Jonas Wagner wrote:> > 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.There can be a "reverse" situation: if an instruction is deleted, and another one is created, it can get the same address. -K -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Maybe Matching Threads
- [LLVMdev] unique id for a llvm Instruction
- [LLVMdev] get the address in memory where an instruction lives
- [LLVMdev] Problem with building llvm and running project
- [LLVMdev] get the value of a Constant in LLVM IR
- [LLVMdev] get the address in memory where an instruction lives