Lines Matching refs:MemPtr
70 llvm::Value *MemPtr,
189 /// struct { ptrdiff_t ptr; ptrdiff_t adj; } memptr;
192 /// - method pointers are virtual if (memptr.ptr & 1) is nonzero
193 /// - the this-adjustment is (memptr.adj)
194 /// - the virtual offset is (memptr.ptr - 1)
197 /// - method pointers are virtual if (memptr.adj & 1) is nonzero
198 /// - the this-adjustment is (memptr.adj >> 1)
199 /// - the virtual offset is (memptr.ptr)
206 /// If the member is non-virtual, memptr.ptr is the address of
227 llvm::BasicBlock *FnVirtual = CGF.createBasicBlock("memptr.virtual");
228 llvm::BasicBlock *FnNonVirtual = CGF.createBasicBlock("memptr.nonvirtual");
229 llvm::BasicBlock *FnEnd = CGF.createBasicBlock("memptr.end");
231 // Extract memptr.adj, which is in the second field.
232 llvm::Value *RawAdj = Builder.CreateExtractValue(MemFnPtr, 1, "memptr.adj");
237 Adj = Builder.CreateAShr(Adj, ptrdiff_1, "memptr.adj.shifted");
246 llvm::Value *FnAsInt = Builder.CreateExtractValue(MemFnPtr, 0, "memptr.ptr");
255 IsVirtual = Builder.CreateIsNotNull(IsVirtual, "memptr.isvirtual");
266 VTable = Builder.CreateLoad(VTable, "memptr.vtable");
275 llvm::Value *VirtualFn = Builder.CreateLoad(VTable, "memptr.virtualfn");
282 Builder.CreateIntToPtr(FnAsInt, FTy->getPointerTo(), "memptr.nonvirtualfn");
296 llvm::Value *MemPtr,
298 assert(MemPtr->getType() == getPtrDiffTy());
308 llvm::Value *Addr = Builder.CreateInBoundsGEP(Base, MemPtr, "memptr.offset");
375 llvm::Value *isNull = Builder.CreateICmpEQ(src, null, "memptr.isnull");
480 llvm::Constant *MemPtr[2];
496 MemPtr[0] = llvm::ConstantInt::get(ptrdiff_t, VTableOffset);
497 MemPtr[1] = llvm::ConstantInt::get(ptrdiff_t,
504 MemPtr[0] = llvm::ConstantInt::get(ptrdiff_t, VTableOffset + 1);
505 MemPtr[1] = llvm::ConstantInt::get(ptrdiff_t,
522 MemPtr[0] = llvm::ConstantExpr::getPtrToInt(addr, ptrdiff_t);
523 MemPtr[1] = llvm::ConstantInt::get(ptrdiff_t, (IsARM ? 2 : 1) *
527 return llvm::ConstantStruct::getAnon(MemPtr);
601 llvm::Value *LPtr = Builder.CreateExtractValue(L, 0, "lhs.memptr.ptr");
602 llvm::Value *RPtr = Builder.CreateExtractValue(R, 0, "rhs.memptr.ptr");
616 llvm::Value *LAdj = Builder.CreateExtractValue(L, 1, "lhs.memptr.adj");
617 llvm::Value *RAdj = Builder.CreateExtractValue(R, 1, "rhs.memptr.adj");
636 Inequality ? "memptr.ne" : "memptr.eq");
642 llvm::Value *MemPtr,
648 assert(MemPtr->getType() == getPtrDiffTy());
650 llvm::Constant::getAllOnesValue(MemPtr->getType());
651 return Builder.CreateICmpNE(MemPtr, NegativeOne, "memptr.tobool");
655 llvm::Value *Ptr = Builder.CreateExtractValue(MemPtr, 0, "memptr.ptr");
658 llvm::Value *Result = Builder.CreateICmpNE(Ptr, Zero, "memptr.tobool");
664 llvm::Value *Adj = Builder.CreateExtractValue(MemPtr, 1, "memptr.adj");
665 llvm::Value *VirtualBit = Builder.CreateAnd(Adj, One, "memptr.virtualbit");
667 "memptr.isvirtual");