Home | History | Annotate | Download | only in CodeGen

Lines Matching full:memptr

73                                             llvm::Value *MemPtr,
247 /// struct { ptrdiff_t ptr; ptrdiff_t adj; } memptr;
250 /// - method pointers are virtual if (memptr.ptr & 1) is nonzero
251 /// - the this-adjustment is (memptr.adj)
252 /// - the virtual offset is (memptr.ptr - 1)
255 /// - method pointers are virtual if (memptr.adj & 1) is nonzero
256 /// - the this-adjustment is (memptr.adj >> 1)
257 /// - the virtual offset is (memptr.ptr)
264 /// If the member is non-virtual, memptr.ptr is the address of
284 llvm::BasicBlock *FnVirtual = CGF.createBasicBlock("memptr.virtual");
285 llvm::BasicBlock *FnNonVirtual = CGF.createBasicBlock("memptr.nonvirtual");
286 llvm::BasicBlock *FnEnd = CGF.createBasicBlock("memptr.end");
288 // Extract memptr.adj, which is in the second field.
289 llvm::Value *RawAdj = Builder.CreateExtractValue(MemFnPtr, 1, "memptr.adj");
294 Adj = Builder.CreateAShr(Adj, ptrdiff_1, "memptr.adj.shifted");
303 llvm::Value *FnAsInt = Builder.CreateExtractValue(MemFnPtr, 0, "memptr.ptr");
312 IsVirtual = Builder.CreateIsNotNull(IsVirtual, "memptr.isvirtual");
323 VTable = Builder.CreateLoad(VTable, "memptr.vtable");
333 llvm::Value *VirtualFn = Builder.CreateLoad(VTable, "memptr.virtualfn");
340 Builder.CreateIntToPtr(FnAsInt, FTy->getPointerTo(), "memptr.nonvirtualfn");
354 llvm::Value *MemPtr,
356 assert(MemPtr->getType() == CGM.PtrDiffTy);
366 llvm::Value *Addr = Builder.CreateInBoundsGEP(Base, MemPtr, "memptr.offset");
433 llvm::Value *isNull = Builder.CreateICmpEQ(src, null, "memptr.isnull");
535 llvm::Constant *MemPtr[2];
551 MemPtr[0] = llvm::ConstantInt::get(CGM.PtrDiffTy, VTableOffset);
552 MemPtr[1] = llvm::ConstantInt::get(CGM.PtrDiffTy,
559 MemPtr[0] = llvm::ConstantInt::get(CGM.PtrDiffTy, VTableOffset + 1);
560 MemPtr[1] = llvm::ConstantInt::get(CGM.PtrDiffTy,
577 MemPtr[0] = llvm::ConstantExpr::getPtrToInt(addr, CGM.PtrDiffTy);
578 MemPtr[1] = llvm::ConstantInt::get(CGM.PtrDiffTy,
583 return llvm::ConstantStruct::getAnon(MemPtr);
642 llvm::Value *LPtr = Builder.CreateExtractValue(L, 0, "lhs.memptr.ptr");
643 llvm::Value *RPtr = Builder.CreateExtractValue(R, 0, "rhs.memptr.ptr");
657 llvm::Value *LAdj = Builder.CreateExtractValue(L, 1, "lhs.memptr.adj");
658 llvm::Value *RAdj = Builder.CreateExtractValue(R, 1, "rhs.memptr.adj");
677 Inequality ? "memptr.ne" : "memptr.eq");
683 llvm::Value *MemPtr,
689 assert(MemPtr->getType() == CGM.PtrDiffTy);
691 llvm::Constant::getAllOnesValue(MemPtr->getType());
692 return Builder.CreateICmpNE(MemPtr, NegativeOne, "memptr.tobool");
696 llvm::Value *Ptr = Builder.CreateExtractValue(MemPtr, 0, "memptr.ptr");
699 llvm::Value *Result = Builder.CreateICmpNE(Ptr, Zero, "memptr.tobool");
705 llvm::Value *Adj = Builder.CreateExtractValue(MemPtr, 1, "memptr.adj");
706 llvm::Value *VirtualBit = Builder.CreateAnd(Adj, One, "memptr.virtualbit");
708 "memptr.isvirtual");