Home | History | Annotate | Download | only in CodeGen

Lines Matching defs:Adj

247 ///   struct { ptrdiff_t ptr; ptrdiff_t adj; } memptr;
251 /// - the this-adjustment is (memptr.adj)
255 /// - method pointers are virtual if (memptr.adj & 1) is nonzero
256 /// - the this-adjustment is (memptr.adj >> 1)
258 /// ARM uses 'adj' for the virtual flag because Thumb functions
288 // Extract memptr.adj, which is in the second field.
289 llvm::Value *RawAdj = Builder.CreateExtractValue(MemFnPtr, 1, "memptr.adj");
292 llvm::Value *Adj = RawAdj;
294 Adj = Builder.CreateAShr(Adj, ptrdiff_1, "memptr.adj.shifted");
299 Ptr = Builder.CreateInBoundsGEP(Ptr, Adj);
413 llvm::Constant *adj = getMemberPointerAdjustment(E);
414 if (!adj) return src;
427 dst = Builder.CreateNSWSub(src, adj, "adj");
429 dst = Builder.CreateNSWAdd(src, adj, "adj");
439 uint64_t offset = cast<llvm::ConstantInt>(adj)->getZExtValue();
441 adj = llvm::ConstantInt::get(adj->getType(), offset);
444 llvm::Value *srcAdj = Builder.CreateExtractValue(src, 1, "src.adj");
447 dstAdj = Builder.CreateNSWSub(srcAdj, adj, "adj");
449 dstAdj = Builder.CreateNSWAdd(srcAdj, adj, "adj");
465 llvm::Constant *adj = getMemberPointerAdjustment(E);
466 if (!adj) return src;
480 return llvm::ConstantExpr::getNSWSub(src, adj);
482 return llvm::ConstantExpr::getNSWAdd(src, adj);
487 uint64_t offset = cast<llvm::ConstantInt>(adj)->getZExtValue();
489 adj = llvm::ConstantInt::get(adj->getType(), offset);
495 dstAdj = llvm::ConstantExpr::getNSWSub(srcAdj, adj);
497 dstAdj = llvm::ConstantExpr::getNSWAdd(srcAdj, adj);
546 // This ABI specifies that adj contains twice the this
548 // least significant bit of adj then makes exactly the same
634 // (L == R) <==> (L.ptr == R.ptr && (L.ptr == 0 || L.adj == R.adj))
637 // (L.adj == R.adj ||
638 // (L.ptr == 0 && ((L.adj|R.adj) & 1) == 0)))
655 // This condition tests whether L.adj == R.adj. If this isn't
657 llvm::Value *LAdj = Builder.CreateExtractValue(L, 1, "lhs.memptr.adj");
658 llvm::Value *RAdj = Builder.CreateExtractValue(R, 1, "rhs.memptr.adj");
659 llvm::Value *AdjEq = Builder.CreateICmp(Eq, LAdj, RAdj, "cmp.adj");
661 // Null member function pointers on ARM clear the low bit of Adj,
666 // Compute (l.adj | r.adj) & 1 and test it against zero.
667 llvm::Value *OrAdj = Builder.CreateOr(LAdj, RAdj, "or.adj");
670 "cmp.or.adj");
701 // On ARM, a member function pointer is also non-null if the low bit of 'adj'
705 llvm::Value *Adj = Builder.CreateExtractValue(MemPtr, 1, "memptr.adj");
706 llvm::Value *VirtualBit = Builder.CreateAnd(Adj, One, "memptr.virtualbit");