Home
last modified time | relevance | path

Searched refs:Ptr (Results 1 – 25 of 559) sorted by relevance

12345678910>>...23

/src/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DTargetLibraryInfo.def47 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 …]
/src/contrib/llvm-project/compiler-rt/lib/scudo/standalone/
H A Dmemtag.h37 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;
148 inline uptr selectRandomTag(uptr Ptr, uptr ExcludeMask) { in selectRandomTag() argument
157 : [Ptr] "r"(Ptr), [ExcludeMask] "r"(ExcludeMask)); in selectRandomTag()
161 inline uptr addFixedTag(uptr Ptr, uptr Tag) { in addFixedTag() argument
163 DCHECK_EQ(untagPointer(Ptr), Ptr); in addFixedTag()
[all …]
H A Dwrappers_cpp.cpp39 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::New); in operator new() local
40 reportAllocation(Ptr, size); in operator new()
41 return Ptr; in operator new()
44 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::NewArray); in operator new[]() local
45 reportAllocation(Ptr, size); in operator new[]()
46 return Ptr; in operator new[]()
50 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::New); in operator new() local
51 reportAllocation(Ptr, size); in operator new()
52 return Ptr; in operator new()
56 void *Ptr = Allocator.allocate(size, scudo::Chunk::Origin::NewArray); in operator new[]() local
[all …]
H A Dcombined.h71 void recycle(void *Ptr) { in recycle()
73 Chunk::loadHeader(Allocator.Cookie, Ptr, &Header); in recycle()
75 reportInvalidChunkState(AllocatorAction::Recycling, Ptr); in recycle()
78 Chunk::storeHeader(Allocator.Cookie, Ptr, &Header); in recycle()
81 Ptr = untagPointer(Ptr); in recycle()
82 void *BlockBegin = Allocator::getBlockBegin(Ptr, &Header); in recycle()
92 void *Ptr = Cache.allocate(QuarantineClassId); in allocate() local
94 if (UNLIKELY(!Ptr)) in allocate()
97 Ptr = reinterpret_cast<void *>(reinterpret_cast<uptr>(Ptr) + in allocate()
103 Chunk::storeHeader(Allocator.Cookie, Ptr, &Header); in allocate()
[all …]
H A Dchunk.h91 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 …]
/src/contrib/llvm-project/llvm/lib/Support/
H A DTwine.cpp59 void Twine::printOneChild(raw_ostream &OS, Child Ptr, in printOneChild() argument
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.decI; in printOneChild()
90 OS << *Ptr.decUL; in printOneChild()
[all …]
H A DFormattedStream.cpp26 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()
78 NumBytes = getNumBytesForUTF8(*Ptr); in UpdatePosition()
85 if ((unsigned)(End - Ptr) < NumBytes) { in UpdatePosition()
86 PartialUTF8Char = StringRef(Ptr, End - Ptr); in UpdatePosition()
90 ProcessUTF8CodePoint(StringRef(Ptr, NumBytes)); in UpdatePosition()
96 void formatted_raw_ostream::ComputePosition(const char *Ptr, size_t Size) { in ComputePosition() argument
[all …]
/src/contrib/llvm-project/compiler-rt/lib/memprof/
H A Dmemprof_rawprofile.cpp63 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 …]
/src/contrib/llvm-project/compiler-rt/lib/gwp_asan/platform_specific/
H A Dguarded_pool_allocator_posix.cpp47 void *Ptr = mmap(nullptr, Size, PROT_READ | PROT_WRITE, in map() local
49 check(Ptr != MAP_FAILED, "Failed to map guarded pool allocator memory"); in map()
50 MaybeSetMappingName(Ptr, Size, Name); in map()
51 return Ptr; in map()
54 void GuardedPoolAllocator::unmap(void *Ptr, size_t Size) const { in unmap() argument
55 assert((reinterpret_cast<uintptr_t>(Ptr) % State.PageSize) == 0); in unmap()
57 check(munmap(Ptr, Size) == 0, in unmap()
63 void *Ptr = in reserveGuardedPool() local
65 check(Ptr != MAP_FAILED, "Failed to reserve guarded pool allocator memory"); in reserveGuardedPool()
66 MaybeSetMappingName(Ptr, Size, kGwpAsanGuardPageName); in reserveGuardedPool()
[all …]
/src/contrib/llvm-project/clang/lib/AST/Interp/
H A DInterp.cpp125 static bool CheckActive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckActive() argument
127 if (Ptr.isActive()) in CheckActive()
131 const FieldDecl *InactiveField = Ptr.getField(); in CheckActive()
134 Pointer U = Ptr.getBase(); in CheckActive()
157 static bool CheckTemporary(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckTemporary() argument
159 if (auto ID = Ptr.getDeclID()) { in CheckTemporary()
160 if (!Ptr.isStaticTemporary()) in CheckTemporary()
163 if (Ptr.getDeclDesc()->getType().isConstQualified()) in CheckTemporary()
171 S.Note(Ptr.getDeclLoc(), diag::note_constexpr_temporary_here); in CheckTemporary()
177 static bool CheckGlobal(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckGlobal() argument
[all …]
H A DSource.h32 CodePtr() : Ptr(nullptr) {} in CodePtr()
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; }
52 operator bool() const { return Ptr; }
56 assert(aligned(Ptr)); in read()
[all …]
H A DPointer.cpp162 Pointer Ptr = *this; in toAPValue() local
163 while (Ptr.isField() || Ptr.isArrayElement()) { in toAPValue()
164 if (Ptr.isArrayRoot()) { in toAPValue()
166 {Ptr.getFieldDesc()->asDecl(), /*IsVirtual=*/false})); in toAPValue()
168 if (const auto *FD = dyn_cast<FieldDecl>(Ptr.getFieldDesc()->asDecl())) in toAPValue()
171 Ptr = Ptr.getBase(); in toAPValue()
172 } else if (Ptr.isArrayElement()) { in toAPValue()
174 if (Ptr.isOnePastEnd()) in toAPValue()
175 Index = Ptr.getArray().getNumElems(); in toAPValue()
177 Index = Ptr.getIndex(); in toAPValue()
[all …]
H A DInterp.h49 bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
52 bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
55 bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
59 bool CheckDummy(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
63 bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
67 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
71 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
75 bool CheckSubobject(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
80 bool CheckDowncast(InterpState &S, CodePtr OpPC, const Pointer &Ptr,
84 bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr);
[all …]
H A DDescriptor.cpp23 static void ctorTy(Block *, std::byte *Ptr, bool, bool, bool, in ctorTy() argument
25 new (Ptr) T(); in ctorTy()
29 static void dtorTy(Block *, std::byte *Ptr, const Descriptor *) { in dtorTy() argument
30 reinterpret_cast<T *>(Ptr)->~T(); in dtorTy()
42 static void ctorArrayTy(Block *, std::byte *Ptr, bool, bool, bool, in ctorArrayTy() argument
44 new (Ptr) InitMapPtr(std::nullopt); in ctorArrayTy()
46 Ptr += sizeof(InitMapPtr); in ctorArrayTy()
48 new (&reinterpret_cast<T *>(Ptr)[I]) T(); in ctorArrayTy()
53 static void dtorArrayTy(Block *, std::byte *Ptr, const Descriptor *D) { in dtorArrayTy() argument
54 InitMapPtr &IMP = *reinterpret_cast<InitMapPtr *>(Ptr); in dtorArrayTy()
[all …]
/src/contrib/llvm-project/clang/include/clang/Lex/
H A DExternalPreprocessorSource.h53 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 …]
/src/contrib/llvm-project/llvm/lib/ObjCopy/XCOFF/
H A DXCOFFWriter.cpp56 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 = std::copy(Sec.Contents.begin(), Sec.Contents.end(), Ptr); in writeSections()
83 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()) + in writeSections() local
[all …]
/src/contrib/llvm-project/clang/include/clang/Sema/
H A DIdentifierResolver.h83 uintptr_t Ptr = 0; variable
88 Ptr = reinterpret_cast<uintptr_t>(D); in iterator()
89 assert((Ptr & 0x1) == 0 && "Invalid Ptr!"); in iterator()
95 Ptr = reinterpret_cast<uintptr_t>(I) | 0x1; in iterator()
98 bool isIterator() const { return (Ptr & 0x1); } in isIterator()
102 return reinterpret_cast<BaseIter>(Ptr & ~0x1); in getIterator()
114 return reinterpret_cast<NamedDecl*>(Ptr);
118 return Ptr == RHS.Ptr;
121 return Ptr != RHS.Ptr;
127 Ptr = 0;
[all …]
/src/contrib/llvm-project/clang/lib/Sema/
H A DIdentifierResolver.cpp160 void *Ptr = Name.getFETokenInfo(); in AddDecl() local
162 if (!Ptr) { in AddDecl()
169 if (isDeclPtr(Ptr)) { in AddDecl()
172 NamedDecl *PrevD = static_cast<NamedDecl*>(Ptr); in AddDecl()
175 IDI = toIdDeclInfo(Ptr); in AddDecl()
185 void *Ptr = Name.getFETokenInfo(); in InsertDeclAfter() local
187 if (!Ptr) { in InsertDeclAfter()
192 if (isDeclPtr(Ptr)) { in InsertDeclAfter()
197 NamedDecl *PrevD = static_cast<NamedDecl*>(Ptr); in InsertDeclAfter()
211 IdDeclInfo *IDI = toIdDeclInfo(Ptr); in InsertDeclAfter()
[all …]
/src/contrib/llvm-project/llvm/lib/ObjCopy/COFF/
H A DCOFFWriter.cpp255 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()); in writeHeaders() local
257 memcpy(Ptr, &Obj.DosHeader, sizeof(Obj.DosHeader)); in writeHeaders()
258 Ptr += sizeof(Obj.DosHeader); in writeHeaders()
259 memcpy(Ptr, Obj.DosStub.data(), Obj.DosStub.size()); in writeHeaders()
260 Ptr += Obj.DosStub.size(); in writeHeaders()
261 memcpy(Ptr, PEMagic, sizeof(PEMagic)); in writeHeaders()
262 Ptr += sizeof(PEMagic); in writeHeaders()
265 memcpy(Ptr, &Obj.CoffFileHeader, sizeof(Obj.CoffFileHeader)); in writeHeaders()
266 Ptr += sizeof(Obj.CoffFileHeader); in writeHeaders()
288 memcpy(Ptr, &BigObjHeader, sizeof(BigObjHeader)); in writeHeaders()
[all …]
/src/contrib/llvm-project/compiler-rt/lib/gwp_asan/
H A Dcommon.cpp81 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 Dguarded_pool_allocator.cpp34 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 …]
/src/contrib/llvm-project/llvm/include/llvm/Support/
H A DSMLoc.h24 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 DManagedStatic.h29 static void call(void *Ptr) { delete (T *)Ptr; } in call()
32 static void call(void *Ptr) { delete[](T *)Ptr; }
52 mutable std::atomic<void *> Ptr{};
58 mutable std::atomic<void *> Ptr;
71 bool isConstructed() const { return Ptr != nullptr; }
87 void *Tmp = Ptr.load(std::memory_order_acquire);
91 return *static_cast<C *>(Ptr.load(std::memory_order_relaxed));
97 void *Tmp = Ptr.load(std::memory_order_acquire);
101 return *static_cast<C *>(Ptr.load(std::memory_order_relaxed));
109 return static_cast<C *>(Ptr.exchange(nullptr));
/src/contrib/llvm-project/llvm/include/llvm/ADT/
H A DSmallPtrSet.h127 std::pair<const void *const *, bool> insert_imp(const void *Ptr) { in insert_imp() argument
133 if (Value == Ptr) in insert_imp()
139 SmallArray[NumNonEmpty++] = Ptr; in insert_imp()
145 return insert_imp_big(Ptr); in insert_imp()
152 bool erase_imp(const void * Ptr) { in erase_imp() argument
156 if (*APtr == Ptr) { in erase_imp()
165 auto *Bucket = FindBucketFor(Ptr); in erase_imp()
166 if (*Bucket != Ptr) in erase_imp()
180 const void *const * find_imp(const void * Ptr) const { in find_imp() argument
185 if (*APtr == Ptr) in find_imp()
[all …]
/src/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUPromoteKernelArguments.cpp41 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 …]

12345678910>>...23