| /freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
| H A D | memtag.h | 37 inline uptr untagPointer(uptr Ptr) { return Ptr & ((1ULL << 56) - 1); } in untagPointer() argument 39 inline uint8_t extractTag(uptr Ptr) { return (Ptr >> 56) & 0xf; } in extractTag() argument 49 inline NORETURN uptr untagPointer(uptr Ptr) { 50 (void)Ptr; 54 inline NORETURN uint8_t extractTag(uptr Ptr) { 55 (void)Ptr; 153 inline uptr selectRandomTag(uptr Ptr, uptr ExcludeMask) { in selectRandomTag() argument 162 : [Ptr] "r"(Ptr), [ExcludeMask] "r"(ExcludeMask)); in selectRandomTag() 166 inline uptr addFixedTag(uptr Ptr, uptr Tag) { in addFixedTag() argument 168 DCHECK_EQ(untagPointer(Ptr), Ptr); in addFixedTag() [all …]
|
| H A D | combined.h | 72 void recycle(void *Ptr) { in recycle() 74 Chunk::loadHeader(Allocator.Cookie, Ptr, &Header); in recycle() 76 reportInvalidChunkState(AllocatorAction::Recycling, Ptr); in recycle() 79 Chunk::storeHeader(Allocator.Cookie, Ptr, &Header); in recycle() 82 Ptr = untagPointer(Ptr); in recycle() 83 void *BlockBegin = Allocator::getBlockBegin(Ptr, &Header); in recycle() 93 void *Ptr = SizeClassAllocator.allocate(QuarantineClassId); in allocate() local 95 if (UNLIKELY(!Ptr)) in allocate() 98 Ptr = reinterpret_cast<void *>(reinterpret_cast<uptr>(Ptr) + in allocate() 104 Chunk::storeHeader(Allocator.Cookie, Ptr, &Header); in allocate() [all …]
|
| H A D | chunk.h | 91 inline AtomicPackedHeader *getAtomicHeader(void *Ptr) { in getAtomicHeader() argument 92 return reinterpret_cast<AtomicPackedHeader *>(reinterpret_cast<uptr>(Ptr) - in getAtomicHeader() 96 inline const AtomicPackedHeader *getConstAtomicHeader(const void *Ptr) { in getConstAtomicHeader() argument 98 reinterpret_cast<uptr>(Ptr) - getHeaderSize()); in getConstAtomicHeader() 104 static inline u16 computeHeaderChecksum(u32 Cookie, const void *Ptr, in computeHeaderChecksum() argument 110 return computeChecksum(Cookie, reinterpret_cast<uptr>(Ptr), HeaderHolder, in computeHeaderChecksum() 114 inline void storeHeader(u32 Cookie, void *Ptr, in storeHeader() argument 117 computeHeaderChecksum(Cookie, Ptr, NewUnpackedHeader); in storeHeader() 119 atomic_store_relaxed(getAtomicHeader(Ptr), NewPackedHeader); in storeHeader() 122 inline void loadHeader(u32 Cookie, const void *Ptr, in loadHeader() argument [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
| H A D | TargetLibraryInfo.def | 47 TLI_DEFINE_SIG_INTERNAL(Ptr, Int) 52 TLI_DEFINE_SIG_INTERNAL(Ptr, Int, Ptr) 57 TLI_DEFINE_SIG_INTERNAL(Ptr, LLong) 62 TLI_DEFINE_SIG_INTERNAL(Ptr, LLong, Ptr) 67 TLI_DEFINE_SIG_INTERNAL(Void, Ptr) 72 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, Ptr) 77 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, Int) 82 TLI_DEFINE_SIG_INTERNAL(Void, Ptr) 87 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, Ptr) 92 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, LLong) [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Support/ |
| H A D | Twine.cpp | 59 void Twine::printOneChild(raw_ostream &OS, Child Ptr, in printOneChild() 65 Ptr.twine->print(OS); in printOneChild() 68 OS << Ptr.cString; in printOneChild() 71 OS << *Ptr.stdString; in printOneChild() 75 OS << StringRef(Ptr.ptrAndLength.ptr, Ptr.ptrAndLength.length); in printOneChild() 78 OS << *Ptr.formatvObject; in printOneChild() 81 OS << Ptr.character; in printOneChild() 84 OS << Ptr.decUI; in printOneChild() 87 OS << Ptr in printOneChild() 57 printOneChild(raw_ostream & OS,Child Ptr,NodeKind Kind) const printOneChild() argument 104 printOneChildRepr(raw_ostream & OS,Child Ptr,NodeKind Kind) const printOneChildRepr() argument [all...] |
| H A D | FormattedStream.cpp | 26 void formatted_raw_ostream::UpdatePosition(const char *Ptr, size_t Size) { in UpdatePosition() argument 61 PartialUTF8Char.append(StringRef(Ptr, Size)); in UpdatePosition() 67 PartialUTF8Char.append(StringRef(Ptr, BytesFromBuffer)); in UpdatePosition() 70 Ptr += BytesFromBuffer; in UpdatePosition() 77 for (const char *End = Ptr + Size; Ptr < End; Ptr += NumBytes) { in UpdatePosition() 79 if (*Ptr >= 0x20 && *Ptr <= 0x7e) { in UpdatePosition() 85 NumBytes = getNumBytesForUTF8(*Ptr); in UpdatePosition() 92 if ((unsigned)(End - Ptr) < NumBytes) { in UpdatePosition() 93 PartialUTF8Char = StringRef(Ptr, End - Ptr); in UpdatePosition() 97 ProcessUTF8CodePoint(StringRef(Ptr, NumBytes)); in UpdatePosition() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/AST/ByteCode/ |
| H A D | Interp.cpp | 89 const auto &Ptr = S.Stk.pop<Pointer>(); in BCP() local 92 Integral<32, true>::from(CheckBCPResult(S, Ptr))); in BCP() 210 static bool CheckTemporary(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckTemporary() argument 212 if (auto ID = Ptr.getDeclID()) { in CheckTemporary() 213 if (!Ptr.isStaticTemporary()) in CheckTemporary() 217 Ptr.getDeclDesc()->asExpr()); in CheckTemporary() 225 Ptr.block()->getEvalID() != S.Ctx.getEvalID()) { in CheckTemporary() 228 S.Note(Ptr.getDeclLoc(), diag::note_constexpr_temporary_here); in CheckTemporary() 235 static bool CheckGlobal(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckGlobal() argument 236 if (auto ID = Ptr.getDeclID()) { in CheckGlobal() [all …]
|
| H A D | Source.h | 35 Ptr += Offset; 40 assert(Ptr != nullptr && RHS.Ptr != nullptr && "Invalid code pointer"); 41 return Ptr - RHS.Ptr; 45 assert(Ptr != nullptr && "Invalid code pointer"); 46 return CodePtr(Ptr - RHS); 49 bool operator!=(const CodePtr &RHS) const { return Ptr != RHS.Ptr; } 50 const std::byte *operator*() const { return Ptr; } 51 explicit operator bool() const { return Ptr; } 52 bool operator<=(const CodePtr &RHS) const { return Ptr <= RHS.Ptr; } 53 bool operator>=(const CodePtr &RHS) const { return Ptr >= RHS.Ptr; } [all …]
|
| H A D | EvalEmitter.cpp | 161 const auto &Ptr = S.Stk.pop<Pointer>(); in speculate() local 162 return this->emitBool(CheckBCPResult(S, Ptr), E); in speculate() 184 const Pointer &Ptr = S.Stk.pop<Pointer>(); in emitRet() local 186 if (Ptr.isFunctionPointer()) { in emitRet() 187 EvalResult.setValue(Ptr.toAPValue(Ctx.getASTContext())); in emitRet() 193 return (*this->PtrCB)(Ptr); in emitRet() 195 if (!EvalResult.checkReturnValue(S, Ctx, Ptr, Info)) in emitRet() 197 if (CheckFullyInitialized && !EvalResult.checkFullyInitialized(S, Ptr)) in emitRet() 202 if (!Ptr.isZero() && !Ptr.isDereferencable()) in emitRet() 205 if (S.getLangOpts().CPlusPlus11 && Ptr.isBlockPointer() && in emitRet() [all …]
|
| H A D | Interp.h | 45 bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr); 48 bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr); 51 bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 55 bool CheckDummy(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 59 bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 63 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 67 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 71 bool CheckSubobject(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 76 bool CheckDowncast(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 80 bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr); [all …]
|
| H A D | EvaluationResult.cpp | 150 const Pointer &Ptr) const { in checkFullyInitialized() 154 if (Ptr.isZero()) in checkFullyInitialized() 159 if (!Ptr.isLive()) in checkFullyInitialized() 168 if (const Record *R = Ptr.getRecord()) in checkFullyInitialized() 169 return CheckFieldsInitialized(S, InitLoc, Ptr, R); in checkFullyInitialized() 172 Ptr.getType()->getAsArrayTypeUnsafe())) in checkFullyInitialized() 173 return CheckArrayInitialized(S, InitLoc, Ptr, CAT); in checkFullyInitialized() 178 static void collectBlocks(const Pointer &Ptr, in collectBlocks() argument 185 if (!isUsefulPtr(Ptr)) in collectBlocks() 188 Blocks.insert(Ptr.block()); in collectBlocks() [all …]
|
| H A D | Pointer.cpp | 215 Pointer Ptr = *this; in toAPValue() local 216 while (Ptr.isField() || Ptr.isArrayElement()) { in toAPValue() 218 if (Ptr.isArrayRoot()) { in toAPValue() 220 if (Ptr.isArrayElement()) { in toAPValue() 221 Ptr = Ptr.expand(); in toAPValue() 222 const Descriptor *Desc = Ptr.getFieldDesc(); in toAPValue() 223 unsigned Index = Ptr.getIndex(); in toAPValue() 226 if (Ptr.getArray().getType()->isArrayType()) in toAPValue() 228 Ptr = Ptr.getArray(); in toAPValue() 230 const Descriptor *Desc = Ptr.getFieldDesc(); in toAPValue() [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/memprof/ |
| H A D | memprof_rawprofile.cpp | 63 char *Ptr = Buffer; in SerializeSegmentsToBuffer() local 65 Ptr += sizeof(u64); in SerializeSegmentsToBuffer() 76 memcpy(Ptr, &Entry, sizeof(SegmentEntry)); in SerializeSegmentsToBuffer() 77 Ptr += sizeof(SegmentEntry); in SerializeSegmentsToBuffer() 84 CHECK(ExpectedNumBytes >= static_cast<u64>(Ptr - Buffer) && in SerializeSegmentsToBuffer() 119 char *Ptr = Buffer; in SerializeStackToBuffer() local 120 Ptr = WriteBytes(static_cast<u64>(NumIds), Ptr); in SerializeStackToBuffer() 124 Ptr = WriteBytes(Id, Ptr); in SerializeStackToBuffer() 125 Ptr += sizeof(u64); // Bump it by u64, we will fill this in later. in SerializeStackToBuffer() 132 Ptr = WriteBytes(static_cast<u64>(pc), Ptr); in SerializeStackToBuffer() [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/gwp_asan/platform_specific/ |
| H A D | guarded_pool_allocator_posix.cpp | 48 void *Ptr = mmap(nullptr, Size, PROT_READ | PROT_WRITE, in map() local 50 checkWithErrorCode(Ptr != MAP_FAILED, in map() 52 MaybeSetMappingName(Ptr, Size, Name); in map() 53 return Ptr; in map() 56 void GuardedPoolAllocator::unmap(void *Ptr, size_t Size) const { in unmap() argument 57 assert((reinterpret_cast<uintptr_t>(Ptr) % State.PageSize) == 0); in unmap() 59 checkWithErrorCode(munmap(Ptr, Size) == 0, in unmap() 65 void *Ptr = in reserveGuardedPool() local 67 checkWithErrorCode(Ptr != MAP_FAILED, in reserveGuardedPool() 69 MaybeSetMappingName(Ptr, Size, kGwpAsanGuardPageName); in reserveGuardedPool() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/ObjCopy/XCOFF/ |
| H A D | XCOFFWriter.cpp | 56 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()); in writeHeaders() local 57 memcpy(Ptr, &Obj.FileHeader, sizeof(XCOFFFileHeader32)); in writeHeaders() 58 Ptr += sizeof(XCOFFFileHeader32); in writeHeaders() 62 memcpy(Ptr, &Obj.OptionalFileHeader, Obj.FileHeader.AuxHeaderSize); in writeHeaders() 63 Ptr += Obj.FileHeader.AuxHeaderSize; in writeHeaders() 68 memcpy(Ptr, &Sec.SectionHeader, sizeof(XCOFFSectionHeader32)); in writeHeaders() 69 Ptr += sizeof(XCOFFSectionHeader32); in writeHeaders() 76 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()) + in writeSections() local 78 Ptr = llvm::copy(Sec.Contents, Ptr); in writeSections() 83 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()) + in writeSections() local [all …]
|
| /freebsd/contrib/llvm-project/clang/include/clang/Lex/ |
| H A D | ExternalPreprocessorSource.h | 53 mutable uint64_t Ptr = 0; variable 58 explicit LazyIdentifierInfoPtr(const IdentifierInfo *Ptr) in LazyIdentifierInfoPtr() argument 59 : Ptr(reinterpret_cast<uint64_t>(Ptr)) {} in LazyIdentifierInfoPtr() 61 explicit LazyIdentifierInfoPtr(uint64_t ID) : Ptr((ID << 1) | 0x01) { in LazyIdentifierInfoPtr() 64 Ptr = 0; in LazyIdentifierInfoPtr() 67 LazyIdentifierInfoPtr &operator=(const IdentifierInfo *Ptr) { 68 this->Ptr = reinterpret_cast<uint64_t>(Ptr); 75 Ptr = 0; 77 Ptr = (ID << 1) | 0x01; 85 bool isValid() const { return Ptr != 0; } in isValid() [all …]
|
| /freebsd/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| H A D | APSIntPtr.h | 31 static APSIntPtr unsafeConstructor(const APSInt *Ptr) { in unsafeConstructor() argument 32 return APSIntPtr(Ptr); in unsafeConstructor() 36 const APSInt *get() const { return Ptr; } in get() 39 APSInt operator-() const { return -*Ptr; } 40 APSInt operator~() const { return ~*Ptr; } 43 bool operator OP(APSIntPtr Other) const { return (*Ptr)OP(*Other.Ptr); } 52 const APSInt &operator*() const { return *Ptr; } 53 const APSInt *operator->() const { return Ptr; } 56 explicit APSIntPtr(const APSInt *Ptr) : Ptr(Ptr) {} in APSIntPtr() argument 59 const APSInt *Ptr; variable
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/gwp_asan/ |
| H A D | common.cpp | 81 bool AllocatorState::isGuardPage(uintptr_t Ptr) const { in isGuardPage() 82 assert(pointerIsMine(reinterpret_cast<void *>(Ptr))); in isGuardPage() 83 size_t PageOffsetFromPoolStart = (Ptr - GuardedPagePool) / PageSize; in isGuardPage() 88 static size_t addrToSlot(const AllocatorState *State, uintptr_t Ptr) { in addrToSlot() argument 89 size_t ByteOffsetFromPoolStart = Ptr - State->GuardedPagePool; in addrToSlot() 94 size_t AllocatorState::getNearestSlot(uintptr_t Ptr) const { in getNearestSlot() 95 if (Ptr <= GuardedPagePool + PageSize) in getNearestSlot() 97 if (Ptr > GuardedPagePoolEnd - PageSize) in getNearestSlot() 100 if (!isGuardPage(Ptr)) in getNearestSlot() 101 return addrToSlot(this, Ptr); in getNearestSlot() [all …]
|
| H A D | guarded_pool_allocator.cpp | 34 uintptr_t getPageAddr(uintptr_t Ptr, uintptr_t PageSize) { in getPageAddr() argument 35 return Ptr & ~(PageSize - 1); in getPageAddr() 184 uintptr_t GuardedPoolAllocator::alignUp(uintptr_t Ptr, size_t Alignment) { in alignUp() argument 187 if ((Ptr & (Alignment - 1)) == 0) in alignUp() 188 return Ptr; in alignUp() 190 Ptr += Alignment - (Ptr & (Alignment - 1)); in alignUp() 191 return Ptr; in alignUp() 194 uintptr_t GuardedPoolAllocator::alignDown(uintptr_t Ptr, size_t Alignment) { in alignDown() argument 197 if ((Ptr & (Alignment - 1)) == 0) in alignDown() 198 return Ptr; in alignDown() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/ObjCopy/COFF/ |
| H A D | COFFWriter.cpp | 333 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()); in writeHeaders() local 335 memcpy(Ptr, &Obj.DosHeader, sizeof(Obj.DosHeader)); in writeHeaders() 336 Ptr += sizeof(Obj.DosHeader); in writeHeaders() 337 memcpy(Ptr, Obj.DosStub.data(), Obj.DosStub.size()); in writeHeaders() 338 Ptr += Obj.DosStub.size(); in writeHeaders() 339 memcpy(Ptr, PEMagic, sizeof(PEMagic)); in writeHeaders() 340 Ptr += sizeof(PEMagic); in writeHeaders() 343 memcpy(Ptr, &Obj.CoffFileHeader, sizeof(Obj.CoffFileHeader)); in writeHeaders() 344 Ptr += sizeof(Obj.CoffFileHeader); in writeHeaders() 366 memcpy(Ptr, &BigObjHeader, sizeof(BigObjHeader)); in writeHeaders() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
| H A D | SMLoc.h | 24 const char *Ptr = nullptr; variable 29 constexpr bool isValid() const { return Ptr != nullptr; } in isValid() 31 constexpr bool operator==(const SMLoc &RHS) const { return RHS.Ptr == Ptr; } 32 constexpr bool operator!=(const SMLoc &RHS) const { return RHS.Ptr != Ptr; } 34 constexpr const char *getPointer() const { return Ptr; } in getPointer() 36 static SMLoc getFromPointer(const char *Ptr) { in getFromPointer() argument 38 L.Ptr = Ptr; in getFromPointer()
|
| H A D | ManagedStatic.h | 30 static void call(void *Ptr) { delete (T *)Ptr; } in call() 33 static void call(void *Ptr) { delete[](T *)Ptr; } 53 mutable std::atomic<void *> Ptr{}; 59 mutable std::atomic<void *> Ptr; 73 bool isConstructed() const { return Ptr != nullptr; } 89 void *Tmp = Ptr.load(std::memory_order_acquire); 93 return *static_cast<C *>(Ptr.load(std::memory_order_relaxed)); 99 void *Tmp = Ptr.load(std::memory_order_acquire); 103 return *static_cast<C *>(Ptr.load(std::memory_order_relaxed)); 111 return static_cast<C *>(Ptr.exchange(nullptr));
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/ADT/ |
| H A D | SmallPtrSet.h | 153 std::pair<const void *const *, bool> insert_imp(const void *Ptr) { in insert_imp() argument 159 if (Value == Ptr) in insert_imp() 165 CurArray[NumNonEmpty++] = Ptr; in insert_imp() 171 return insert_imp_big(Ptr); in insert_imp() 178 bool erase_imp(const void * Ptr) { in erase_imp() argument 182 if (*APtr == Ptr) { in erase_imp() 191 auto *Bucket = doFind(Ptr); in erase_imp() 206 const void *const * find_imp(const void * Ptr) const { in find_imp() argument 212 if (*APtr == Ptr) in find_imp() 218 if (auto *Bucket = doFind(Ptr)) in find_imp() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/ProfileData/ |
| H A D | MemProf.cpp | 200 const unsigned char *Ptr) { in deserializeV2() argument 207 endian::readNext<uint64_t, llvm::endianness::little>(Ptr); in deserializeV2() 211 Node.CSId = endian::readNext<CallStackId, llvm::endianness::little>(Ptr); in deserializeV2() 212 Node.Info.deserialize(Schema, Ptr); in deserializeV2() 213 Ptr += PortableMemInfoBlock::serializedSize(Schema); in deserializeV2() 219 endian::readNext<uint64_t, llvm::endianness::little>(Ptr); in deserializeV2() 223 endian::readNext<CallStackId, llvm::endianness::little>(Ptr); in deserializeV2() 231 const unsigned char *Ptr) { in deserializeV3() argument 238 endian::readNext<uint64_t, llvm::endianness::little>(Ptr); in deserializeV3() 244 endian::readNext<LinearCallStackId, llvm::endianness::little>(Ptr); in deserializeV3() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUPromoteKernelArguments.cpp | 41 void enqueueUsers(Value *Ptr); 43 bool promotePointer(Value *Ptr); 65 void AMDGPUPromoteKernelArguments::enqueueUsers(Value *Ptr) { in enqueueUsers() argument 66 SmallVector<User *> PtrUsers(Ptr->users()); in enqueueUsers() 78 if (LD->getPointerOperand()->stripInBoundsOffsets() == Ptr && in enqueueUsers() 87 if (U->getOperand(0)->stripInBoundsOffsets() == Ptr) in enqueueUsers() 94 bool AMDGPUPromoteKernelArguments::promotePointer(Value *Ptr) { in promotePointer() argument 97 LoadInst *LI = dyn_cast<LoadInst>(Ptr); in promotePointer() 101 PointerType *PT = dyn_cast<PointerType>(Ptr->getType()); in promotePointer() 108 enqueueUsers(Ptr); in promotePointer() [all …]
|