Home
last modified time | relevance | path

Searched refs:Alignment (Results 1 – 25 of 855) sorted by relevance

12345678910>>...35

/llvm-project-15.0.7/llvm/lib/CodeGen/
H A DMachineFrameInfo.cpp35 if (MaxAlignment < Alignment) in ensureMaxAlignment()
36 MaxAlignment = Alignment; in ensureMaxAlignment()
43 return Alignment; in clampStackAlignment()
56 Alignment = clampStackAlignment(!StackRealignable, Alignment, StackAlignment); in CreateStackObject()
67 Alignment = clampStackAlignment(!StackRealignable, Alignment, StackAlignment); in CreateSpillStackObject()
70 ensureMaxAlignment(Alignment); in CreateSpillStackObject()
77 Alignment = clampStackAlignment(!StackRealignable, Alignment, StackAlignment); in CreateVariableSizedObject()
92 Align Alignment = in CreateFixedObject() local
94 Alignment = clampStackAlignment(!StackRealignable, Alignment, StackAlignment); in CreateFixedObject()
105 Align Alignment = in CreateFixedSpillStackObject() local
[all …]
H A DSafeStackLayout.cpp39 void StackLayout::addObject(const Value *V, unsigned Size, Align Alignment, in addObject() argument
41 StackObjects.push_back({V, Size, Alignment, Range}); in addObject()
42 ObjectAlignments[V] = Alignment; in addObject()
43 MaxAlignment = std::max(MaxAlignment, Alignment); in addObject()
47 Align Alignment) { in AdjustStackOffset() argument
48 return alignTo(Offset + Size, Alignment) - Size; in AdjustStackOffset()
56 unsigned Start = AdjustStackOffset(LastRegionEnd, Obj.Size, Obj.Alignment); in layoutObject()
64 << Obj.Alignment.value() << ", range " << Obj.Range in layoutObject()
66 assert(Obj.Alignment <= MaxAlignment); in layoutObject()
67 unsigned Start = AdjustStackOffset(0, Obj.Size, Obj.Alignment); in layoutObject()
[all …]
/llvm-project-15.0.7/clang/test/Analysis/inlining/
H A Dplacement-new-fp-suppression.cpp23 return (((uintptr_t)Addr + Alignment - 1) & ~(uintptr_t)(Alignment - 1)); in alignAddr()
27 return alignAddr(Ptr, Alignment) - (uintptr_t)Ptr; in alignmentAdjustment()
51 void *Allocate(size_t Size, size_t Alignment) { in Allocate() argument
56 size_t PaddedSize = SizeToAllocate + Alignment - 1; in Allocate()
58 Alignment); in Allocate()
97 size_t Alignment /* = 8 */) { in operator new() argument
98 return C.Allocate(Bytes, Alignment); in operator new()
102 size_t Alignment /* = 8 */) { in operator new[]() argument
103 return C.Allocate(Bytes, Alignment); in operator new[]()
109 size_t Alignment = 8) noexcept { in operator new() argument
[all …]
/llvm-project-15.0.7/llvm/lib/Support/
H A DOptimizedStructLayout.cpp27 assert(isAligned(Field.Alignment, Field.Offset) && in checkValidLayout()
32 assert(Field.Alignment <= MaxAlign && in checkValidLayout()
96 MaxAlign = std::max(MaxAlign, I->Alignment); in performOptimizedStructLayout()
108 if (lhs->Alignment != rhs->Alignment) in performOptimizedStructLayout()
109 return (lhs->Alignment < rhs->Alignment ? 1 : -1); in performOptimizedStructLayout()
151 auto Offset = alignTo(LastEnd, I->Alignment); in performOptimizedStructLayout()
247 Align Alignment; in performOptimizedStructLayout() member
256 auto Alignment = I->Alignment; in performOptimizedStructLayout() local
260 for (++I; I != E && I->Alignment == Alignment; ++I) { in performOptimizedStructLayout()
278 LastQueueAlignment = Queue.Alignment; in performOptimizedStructLayout()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/gwp_asan/
H A Dguarded_pool_allocator.cpp167 if (Alignment <= PageSize) in getRequiredBackingSize()
170 return Size + Alignment - PageSize; in getRequiredBackingSize()
176 if ((Ptr & (Alignment - 1)) == 0) in alignUp()
179 Ptr += Alignment - (Ptr & (Alignment - 1)); in alignUp()
186 if ((Ptr & (Alignment - 1)) == 0) in alignDown()
189 Ptr -= Ptr & (Alignment - 1); in alignDown()
205 if (Alignment == 0) in allocate()
206 Alignment = alignof(max_align_t); in allocate()
208 if (!isPowerOfTwo(Alignment) || Alignment > State.maximumAllocationSize() || in allocate()
237 UserPtr = alignUp(SlotStart, Alignment); in allocate()
[all …]
/llvm-project-15.0.7/libc/src/string/memory_utils/
H A Daddress.h44 template <size_t Alignment, Permission P, Temporality TS> struct Address {
45 static_assert(is_power2(Alignment));
46 static constexpr size_t ALIGNMENT = Alignment;
83 template <size_t Alignment, Permission P, Temporality TS>
104 template <size_t Alignment, typename AddrT>
120 template <size_t Alignment>
122 template <size_t Alignment>
124 template <size_t Alignment>
126 Address<Alignment, Permission::Read, Temporality::NON_TEMPORAL>;
127 template <size_t Alignment>
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DASanStackFrameLayout.cpp30 return a.Alignment > b.Alignment; in CompareVars()
41 uint64_t Alignment) { in VarAndRedzoneSize() argument
49 return alignTo(std::max(Res, 2 * Granularity), Alignment); in VarAndRedzoneSize()
62 Vars[i].Alignment = std::max(Vars[i].Alignment, kMinAlignment); in ComputeASanStackFrameLayout()
68 Layout.FrameAlignment = std::max(Granularity, Vars[0].Alignment); in ComputeASanStackFrameLayout()
70 std::max(std::max(MinHeaderSize, Granularity), Vars[0].Alignment); in ComputeASanStackFrameLayout()
74 uint64_t Alignment = std::max(Granularity, Vars[i].Alignment); in ComputeASanStackFrameLayout() local
75 (void)Alignment; // Used only in asserts. in ComputeASanStackFrameLayout()
77 assert((Alignment & (Alignment - 1)) == 0); in ComputeASanStackFrameLayout()
78 assert(Layout.FrameAlignment >= Alignment); in ComputeASanStackFrameLayout()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/scudo/
H A Dscudo_errors.cpp30 void NORETURN reportAllocationAlignmentTooBig(uptr Alignment, in reportAllocationAlignmentTooBig() argument
33 "allocation of %zd\n", Alignment, MaxAlignment); in reportAllocationAlignmentTooBig()
36 void NORETURN reportAllocationAlignmentNotPowerOfTwo(uptr Alignment) { in reportAllocationAlignmentNotPowerOfTwo() argument
38 "of two\n", Alignment); in reportAllocationAlignmentNotPowerOfTwo()
41 void NORETURN reportInvalidPosixMemalignAlignment(uptr Alignment) { in reportInvalidPosixMemalignAlignment() argument
45 Alignment, sizeof(void *)); in reportInvalidPosixMemalignAlignment()
48 void NORETURN reportInvalidAlignedAllocAlignment(uptr Size, uptr Alignment) { in reportInvalidAlignedAllocAlignment() argument
52 "of alignment\n", Alignment, Size); in reportInvalidAlignedAllocAlignment()
55 "requested size 0x%zx must be a multiple of alignment\n", Alignment, in reportInvalidAlignedAllocAlignment()
H A Dscudo_allocator.cpp303 allocate(uptr Size, uptr Alignment, AllocType Type, in allocate()
307 if (UNLIKELY(Alignment > MaxAlignment)) { in allocate()
312 if (UNLIKELY(Alignment < MinAlignment)) in allocate()
313 Alignment = MinAlignment; in allocate()
327 const uptr AlignedSize = (Alignment > MinAlignment) ? in allocate()
374 if (UNLIKELY(!IsAligned(UserPtr, Alignment))) { in allocate()
703 if (Alignment && UNLIKELY(!IsPowerOfTwo(Alignment))) { in scudoAllocate()
707 reportAllocationAlignmentNotPowerOfTwo(Alignment); in scudoAllocate()
713 Instance.deallocate(Ptr, Size, Alignment, Type); in scudoDeallocate()
751 reportInvalidPosixMemalignAlignment(Alignment); in scudoPosixMemalign()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/scudo/standalone/
H A Dwrappers_c_checks.h33 inline bool checkAlignedAllocAlignmentAndSize(uptr Alignment, uptr Size) { in checkAlignedAllocAlignmentAndSize() argument
34 return Alignment == 0 || !isPowerOfTwo(Alignment) || in checkAlignedAllocAlignmentAndSize()
35 !isAligned(Size, Alignment); in checkAlignedAllocAlignmentAndSize()
40 inline bool checkPosixMemalignAlignment(uptr Alignment) { in checkPosixMemalignAlignment() argument
41 return Alignment == 0 || !isPowerOfTwo(Alignment) || in checkPosixMemalignAlignment()
42 !isAligned(Alignment, sizeof(void *)); in checkPosixMemalignAlignment()
/llvm-project-15.0.7/llvm/lib/ExecutionEngine/
H A DSectionMemoryManager.cpp22 unsigned Alignment, in allocateDataSection() argument
28 Size, Alignment); in allocateDataSection()
30 Alignment); in allocateDataSection()
38 Alignment); in allocateCodeSection()
43 unsigned Alignment) { in allocateSection() argument
44 if (!Alignment) in allocateSection()
45 Alignment = 16; in allocateSection()
47 assert(!(Alignment & (Alignment - 1)) && "Alignment must be a power of two."); in allocateSection()
49 uintptr_t RequiredSize = Alignment * ((Size + Alignment - 1) / Alignment + 1); in allocateSection()
71 Addr = (Addr + Alignment - 1) & ~(uintptr_t)(Alignment - 1); in allocateSection()
[all …]
/llvm-project-15.0.7/llvm/test/CodeGen/Generic/
H A D2009-03-17-LSR-APInt.ll8 %struct.Alignment = type { i32 }
14 …type { %"struct.QHashData::Node"*, %"struct.QHashData::Node"**, %struct.Alignment, i32, i32, i16, …
19 %"struct.QListData::Data" = type { %struct.Alignment, i32, i32, i32, i8, [1 x i8*] }
44 …%struct.Alignment*), i32 (%struct.pthread_mutex_t*, %struct.Alignment*)* @pthread_mutex_init ; <i…
47 …ttr_t = weak alias i32 (%struct.Alignment*), i32 (%struct.Alignment*)* @pthread_mutexattr_init ; …
48 … weak alias i32 (%struct.Alignment*, i32), i32 (%struct.Alignment*, i32)* @pthread_mutexattr_setty…
49 …r_t = weak alias i32 (%struct.Alignment*), i32 (%struct.Alignment*)* @pthread_mutexattr_destroy ;…
101 define i32 @pthread_mutex_init(%struct.pthread_mutex_t*, %struct.Alignment*) addrspace(0) {
113 define i32 @pthread_mutexattr_init(%struct.Alignment*) addrspace(0) {
117 define i32 @pthread_mutexattr_settype(%struct.Alignment*, i32) addrspace(0) {
[all …]
/llvm-project-15.0.7/llvm/lib/Target/RISCV/
H A DRISCVTargetTransformInfo.h97 Align Alignment,
132 if (Alignment < in isLegalMaskedLoadStore()
139 bool isLegalMaskedLoad(Type *DataType, Align Alignment) { in isLegalMaskedLoad() argument
140 return isLegalMaskedLoadStore(DataType, Alignment); in isLegalMaskedLoad()
142 bool isLegalMaskedStore(Type *DataType, Align Alignment) { in isLegalMaskedStore() argument
143 return isLegalMaskedLoadStore(DataType, Alignment); in isLegalMaskedStore()
160 if (Alignment < in isLegalMaskedGatherScatter()
167 bool isLegalMaskedGather(Type *DataType, Align Alignment) { in isLegalMaskedGather() argument
168 return isLegalMaskedGatherScatter(DataType, Alignment); in isLegalMaskedGather()
170 bool isLegalMaskedScatter(Type *DataType, Align Alignment) { in isLegalMaskedScatter() argument
[all …]
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DLoads.cpp32 const APInt APAlign(Offset.getBitWidth(), Alignment.value()); in isAligned()
34 return BA >= Alignment && !(Offset & (APAlign - 1)); in isAligned()
71 BC->getOperand(0), Alignment, Size, DL, CtxI, DT, TLI, in isDereferenceableAndAlignedPointer()
88 return isAligned(V, Offset, Alignment, DL); in isDereferenceableAndAlignedPointer()
101 if (RK.AttrKind == Attribute::Alignment) in isDereferenceableAndAlignedPointer()
122 !Offset.urem(APInt(Offset.getBitWidth(), Alignment.value())) in isDereferenceableAndAlignedPointer()
180 return isAligned(V, Offset, Alignment, DL); in isDereferenceableAndAlignedPointer()
206 Align Alignment, in isDereferenceableAndAlignedPointer() argument
274 const Align Alignment = LI->getAlign(); in isDereferenceableAndAlignedInLoop() local
311 if (EltSize.urem(Alignment.value()) != 0) in isDereferenceableAndAlignedInLoop()
[all …]
/llvm-project-15.0.7/bolt/include/bolt/Rewrite/
H A DExecutableFileMemoryManager.h25 uint8_t *allocateSection(intptr_t Size, unsigned Alignment,
45 uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, in allocateCodeSection() argument
48 return allocateSection(Size, Alignment, SectionID, SectionName, in allocateCodeSection()
52 uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, in allocateDataSection() argument
55 return allocateSection(Size, Alignment, SectionID, SectionName, in allocateDataSection()
60 TLSSection allocateTLSSection(uintptr_t Size, unsigned Alignment, in allocateTLSSection() argument
66 Size, Alignment, SectionID, SectionName, /*IsReadOnly=*/false); in allocateTLSSection()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DAddress.h33 CharUnits Alignment; variable
37 CharUnits Alignment) in AddressImpl() argument
38 : Pointer(Pointer), ElementType(ElementType), Alignment(Alignment) {} in AddressImpl()
41 CharUnits getAlignment() const { return Alignment; } in getAlignment()
52 CharUnits Alignment) in AddressImpl() argument
54 if (Alignment.isZero()) in AddressImpl()
59 assert(Alignment.isPowerOfTwo() && "Alignment cannot be zero"); in AddressImpl()
60 auto AlignLog = llvm::Log2_64(Alignment.getQuantity()); in AddressImpl()
81 Address(llvm::Value *Pointer, llvm::Type *ElementType, CharUnits Alignment) in Address() argument
82 : A(Pointer, ElementType, Alignment) { in Address()
/llvm-project-15.0.7/llvm/include/llvm/Support/
H A DAllocatorBase.h38 void *Allocate(size_t Size, size_t Alignment) { in Allocate() argument
47 return static_cast<DerivedT *>(this)->Allocate(Size, Alignment); in Allocate()
52 void Deallocate(const void *Ptr, size_t Size, size_t Alignment) { in Deallocate() argument
62 return static_cast<DerivedT *>(this)->Deallocate(Ptr, Size, Alignment); in Deallocate()
85 LLVM_ATTRIBUTE_RETURNS_NONNULL void *Allocate(size_t Size, size_t Alignment) { in Allocate() argument
86 return allocate_buffer(Size, Alignment); in Allocate()
92 void Deallocate(const void *Ptr, size_t Size, size_t Alignment) { in Deallocate() argument
93 deallocate_buffer(const_cast<void *>(Ptr), Size, Alignment); in Deallocate()
/llvm-project-15.0.7/llvm/lib/Target/X86/
H A DX86TargetTransformInfo.h167 Align Alignment,
231 bool isLegalMaskedLoad(Type *DataType, Align Alignment);
232 bool isLegalMaskedStore(Type *DataType, Align Alignment);
233 bool isLegalNTLoad(Type *DataType, Align Alignment);
234 bool isLegalNTStore(Type *DataType, Align Alignment);
236 bool forceScalarizeMaskedGather(VectorType *VTy, Align Alignment);
238 return forceScalarizeMaskedGather(VTy, Alignment); in forceScalarizeMaskedScatter()
240 bool isLegalMaskedGather(Type *DataType, Align Alignment);
241 bool isLegalMaskedScatter(Type *DataType, Align Alignment);
261 bool VariableMask, Align Alignment,
[all …]
/llvm-project-15.0.7/bolt/lib/Rewrite/
H A DExecutableFileMemoryManager.cpp24 unsigned Alignment, in allocateSection() argument
33 BC.registerOrUpdateNoteSection(SectionName, DataCopy, Size, Alignment); in allocateSection()
41 return SectionMemoryManager::allocateDataSection(Size, Alignment, SectionID, in allocateSection()
46 Ret = SectionMemoryManager::allocateCodeSection(Size, Alignment, SectionID, in allocateSection()
49 Ret = SectionMemoryManager::allocateDataSection(Size, Alignment, SectionID, in allocateSection()
69 BinarySection::getFlags(IsReadOnly, IsCode, true), Ret, Size, Alignment); in allocateSection()
78 << ", alignment " << Alignment << " at 0x" << Ret in allocateSection()
/llvm-project-15.0.7/llvm/lib/Target/Hexagon/
H A DHexagonTargetTransformInfo.cpp161 MaybeAlign Alignment, in getMemoryOpCost() argument
171 return BaseT::getMemoryOpCost(Opcode, Src, Alignment, AddressSpace, in getMemoryOpCost()
187 if (!Alignment || *Alignment > RegAlign) in getMemoryOpCost()
188 Alignment = RegAlign; in getMemoryOpCost()
189 assert(Alignment); in getMemoryOpCost()
190 unsigned AlignWidth = 8 * Alignment->value(); in getMemoryOpCost()
204 if (Alignment == Align(4) || Alignment == Align(8)) in getMemoryOpCost()
212 return BaseT::getMemoryOpCost(Opcode, Src, Alignment, AddressSpace, in getMemoryOpCost()
235 Alignment, CostKind, I); in getGatherScatterOpCost()
240 Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, in getInterleavedMemoryOpCost() argument
[all …]
/llvm-project-15.0.7/llvm/include/llvm/CodeGen/
H A DMachineConstantPool.h49 Align Alignment) = 0;
76 Align Alignment; variable
81 : Alignment(A), IsMachineConstantPoolEntry(false) { in MachineConstantPoolEntry()
86 : Alignment(A), IsMachineConstantPoolEntry(true) { in MachineConstantPoolEntry()
95 Align getAlign() const { return Alignment; } in getAlign()
139 unsigned getConstantPoolIndex(const Constant *C, Align Alignment);
140 unsigned getConstantPoolIndex(MachineConstantPoolValue *V, Align Alignment);
/llvm-project-15.0.7/clang/unittests/Format/
H A DFormatTest.cpp16723 Alignment); in TEST_F()
16726 Alignment); in TEST_F()
16736 Alignment); in TEST_F()
16739 Alignment); in TEST_F()
16742 Alignment); in TEST_F()
16748 Alignment); in TEST_F()
16998 Alignment); in TEST_F()
17382 Alignment); in TEST_F()
17963 Alignment); in TEST_F()
17985 Alignment); in TEST_F()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/gwp_asan/tests/
H A Dalignment.cpp14 static size_t getRequiredBackingSize(size_t Size, size_t Alignment, in getRequiredBackingSize() argument
16 return GuardedPoolAllocator::getRequiredBackingSize(Size, Alignment, in getRequiredBackingSize()
19 static uintptr_t alignUp(uintptr_t Ptr, size_t Alignment) { in alignUp() argument
20 return GuardedPoolAllocator::alignUp(Ptr, Alignment); in alignUp()
22 static uintptr_t alignDown(uintptr_t Ptr, size_t Alignment) { in alignDown() argument
23 return GuardedPoolAllocator::alignDown(Ptr, Alignment); in alignDown()
/llvm-project-15.0.7/llvm/include/llvm/Analysis/
H A DTargetTransformInfo.h667 bool isLegalNTLoad(Type *DataType, Align Alignment) const;
1222 Align Alignment, unsigned AddressSpace,
1460 Align Alignment) const;
1746 Align Alignment,
1817 Align Alignment,
2006 return Impl.isLegalMaskedStore(DataType, Alignment); in isLegalMaskedStore()
2009 return Impl.isLegalMaskedLoad(DataType, Alignment); in isLegalMaskedLoad()
2012 return Impl.isLegalNTStore(DataType, Alignment); in isLegalNTStore()
2015 return Impl.isLegalNTLoad(DataType, Alignment); in isLegalNTLoad()
2022 return Impl.isLegalMaskedScatter(DataType, Alignment); in isLegalMaskedScatter()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/scudo/standalone/tests/
H A Dwrappers_c_test.cpp117 const size_t Alignment = 1U << I; in TEST() local
119 P = memalign(Alignment, Size); in TEST()
126 EXPECT_EQ(posix_memalign(&P, Alignment, Size), 0); in TEST()
139 for (size_t Alignment = 0U; Alignment <= 128U; Alignment++) { in TEST() local
140 P = memalign(Alignment, 1024U); in TEST()
148 const size_t Alignment = 4096U; in TEST() local
149 void *P = aligned_alloc(Alignment, Alignment * 4U); in TEST()
151 EXPECT_LE(Alignment * 4U, malloc_usable_size(P)); in TEST()
156 P = aligned_alloc(Alignment, Size); in TEST()
204 const size_t Alignment = 1024U; in TEST() local
[all …]

12345678910>>...35