Home
last modified time | relevance | path

Searched refs:alignment (Results 1 – 25 of 1999) sorted by relevance

12345678910>>...80

/llvm-project-15.0.7/llvm/test/CodeGen/SystemZ/
H A Dframe-26.mir38 alignment: 16
47 - { id: 0, size: 96, alignment: 8 }
49 - { id: 2, size: 8, alignment: 8 }
51 - { id: 4, size: 4, alignment: 4 }
52 - { id: 5, size: 8, alignment: 8 }
53 - { id: 6, size: 8, alignment: 8 }
54 - { id: 7, size: 4, alignment: 4 }
55 - { id: 8, size: 8, alignment: 8 }
56 - { id: 9, size: 4, alignment: 4 }
57 - { id: 10, size: 8, alignment: 8 }
[all …]
/llvm-project-15.0.7/libcxx/src/
H A Dnew.cpp179 if (static_cast<size_t>(alignment) < sizeof(void*)) in operator new()
180 alignment = std::align_val_t(sizeof(void*)); in operator new()
214 p = ::operator new(size, alignment); in operator new()
228 return ::operator new(size, alignment); in operator new[]()
240 p = ::operator new[](size, alignment); in operator new[]()
261 ::operator delete(ptr, alignment); in operator delete()
268 ::operator delete(ptr, alignment); in operator delete()
273 operator delete[] (void* ptr, std::align_val_t alignment) noexcept in operator delete[]() argument
275 ::operator delete(ptr, alignment); in operator delete[]()
282 ::operator delete[](ptr, alignment); in operator delete[]()
[all …]
/llvm-project-15.0.7/libcxxabi/src/
H A Dstdlib_new_delete.cpp142 if (static_cast<size_t>(alignment) < sizeof(void*)) in operator new()
143 alignment = std::align_val_t(sizeof(void*)); in operator new()
177 p = ::operator new(size, alignment); in operator new()
191 return ::operator new(size, alignment); in operator new[]()
203 p = ::operator new[](size, alignment); in operator new[]()
224 ::operator delete(ptr, alignment); in operator delete()
231 ::operator delete(ptr, alignment); in operator delete()
236 operator delete[] (void* ptr, std::align_val_t alignment) noexcept in operator delete[]() argument
238 ::operator delete(ptr, alignment); in operator delete[]()
245 ::operator delete[](ptr, alignment); in operator delete[]()
[all …]
/llvm-project-15.0.7/mlir/test/Interfaces/DataLayoutInterfaces/
H A Dquery.mlir5 // CHECK: alignment = 4
10 // CHECK: alignment = 8
15 // CHECK: alignment = 4
20 // CHECK: alignment = 1
31 // CHECK: alignment = 1
42 // CHECK: alignment = 1
55 // CHECK: alignment = 20
147 // CHECK: alignment = 1
185 // CHECK: alignment = 1
201 // CHECK: alignment = 8
[all …]
/llvm-project-15.0.7/mlir/test/Dialect/LLVMIR/
H A Dlayout.mlir6 // CHECK: alignment = 8
11 // CHECK: alignment = 8
16 // CHECK: alignment = 8
21 // CHECK: alignment = 8
26 // CHECK: alignment = 8
31 // CHECK: alignment = 8
36 // CHECK: alignment = 8
54 // CHECK: alignment = 4
59 // CHECK: alignment = 4
64 // CHECK: alignment = 4
[all …]
/llvm-project-15.0.7/compiler-rt/test/scudo/
H A Dmemalign.c21 void *aligned_alloc(size_t alignment, size_t size);
25 size_t alignment = 1U << 12; in main() local
32 posix_memalign(&p, alignment, size); in main()
34 assert(((uintptr_t)p & (alignment - 1)) == 0); in main()
36 p = aligned_alloc(alignment, size); in main()
38 assert(((uintptr_t)p & (alignment - 1)) == 0); in main()
42 alignment = 1U << i; in main()
56 alignment = 1U << i; in main()
60 assert(((uintptr_t)p & (alignment - 1)) == 0); in main()
67 p = memalign(alignment - 1, size); in main()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_allocator_checks.h44 inline bool CheckAlignedAllocAlignmentAndSize(uptr alignment, uptr size) { in CheckAlignedAllocAlignmentAndSize() argument
46 return alignment != 0 && IsPowerOfTwo(alignment) && in CheckAlignedAllocAlignmentAndSize()
47 (size & (alignment - 1)) == 0; in CheckAlignedAllocAlignmentAndSize()
49 return alignment != 0 && size % alignment == 0; in CheckAlignedAllocAlignmentAndSize()
55 inline bool CheckPosixMemalignAlignment(uptr alignment) { in CheckPosixMemalignAlignment() argument
56 return alignment != 0 && IsPowerOfTwo(alignment) && in CheckPosixMemalignAlignment()
57 (alignment % sizeof(void *)) == 0; in CheckPosixMemalignAlignment()
H A Dsanitizer_allocator.cpp50 uptr alignment) { in RawInternalAlloc() argument
51 if (alignment == 0) alignment = 8; in RawInternalAlloc()
55 alignment); in RawInternalAlloc()
57 return internal_allocator()->Allocate(cache, size, alignment); in RawInternalAlloc()
62 uptr alignment = 8; in RawInternalRealloc() local
66 size, alignment); in RawInternalRealloc()
68 return internal_allocator()->Reallocate(cache, ptr, size, alignment); in RawInternalRealloc()
86 void *InternalAlloc(uptr size, InternalAllocatorCache *cache, uptr alignment) { in InternalAlloc() argument
87 void *p = RawInternalAlloc(size, cache, alignment); in InternalAlloc()
163 void SetLowLevelAllocateMinAlignment(uptr alignment) { in SetLowLevelAllocateMinAlignment() argument
[all …]
H A Dsanitizer_allocator_combined.h44 void *Allocate(AllocatorCache *cache, uptr size, uptr alignment) { in Allocate() argument
48 if (size + alignment < size) { in Allocate()
51 SanitizerToolName, size, alignment); in Allocate()
59 if (alignment > 8) in Allocate()
60 size = RoundUpTo(size, alignment); in Allocate()
68 if (primary_.CanAllocate(size, alignment)) in Allocate()
72 if (alignment > 8) in Allocate()
73 CHECK_EQ(reinterpret_cast<uptr>(res) & (alignment - 1), 0); in Allocate()
98 uptr alignment) { in Reallocate() argument
100 return Allocate(cache, new_size, alignment); in Reallocate()
[all …]
/llvm-project-15.0.7/llvm/test/MC/ARM/
H A Dneon-vld-vst-align.s13 @ CHECK-ERRORS: alignment must be 64 or omitted
16 @ CHECK-ERRORS: alignment must be 64 or omitted
20 @ CHECK-ERRORS: alignment must be 64 or omitted
23 @ CHECK-ERRORS: alignment must be 64 or omitted
259 @ CHECK-ERRORS: alignment must be omitted
262 @ CHECK-ERRORS: alignment must be omitted
265 @ CHECK-ERRORS: alignment must be omitted
268 @ CHECK-ERRORS: alignment must be omitted
271 @ CHECK-ERRORS: alignment must be omitted
283 @ CHECK-ERRORS: alignment must be omitted
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/Utils/
H A DLayoutUtils.cpp23 Size alignment = 1; in decorateType() local
24 return decorateType(structType, size, alignment); in decorateType()
30 VulkanLayoutUtils::Size &alignment) { in decorateType() argument
69 alignment = maxMemberAlignment; in decorateType()
83 alignment = getScalarTypeAlignment(type); in decorateType()
85 size = alignment; in decorateType()
89 return decorateType(structType, size, alignment); in decorateType()
91 return decorateType(arrayType, size, alignment); in decorateType()
93 return decorateType(vectorType, size, alignment); in decorateType()
96 return decorateType(arrayType, alignment); in decorateType()
[all …]
/llvm-project-15.0.7/llvm/test/CodeGen/PowerPC/
H A Dmi-peepholes-trap-opt.mir7 alignment: 16
31 alignment: 16
50 alignment: 16
66 alignment: 16
82 alignment: 16
97 alignment: 16
113 alignment: 16
128 alignment: 16
143 alignment: 16
160 alignment: 16
[all …]
/llvm-project-15.0.7/openmp/runtime/test/api/
H A Dkmp_aligned_malloc.c10 uint64_t alignment = 1; in aligned_by() local
11 while((addr & (alignment-1)) == 0) { in aligned_by()
12 alignment <<= 1; in aligned_by()
14 return (alignment >> 1); in aligned_by()
28 int alignment = alignments[i]; in test_kmp_aligned_malloc() local
31 ptr = (int*)kmp_aligned_malloc(alignment, alignment); in test_kmp_aligned_malloc()
33 if(addr & (alignment-1)) { in test_kmp_aligned_malloc()
35 " alignment = %d\n", tid, ptr, aligned_by(addr), alignment); in test_kmp_aligned_malloc()
/llvm-project-15.0.7/libcxx/test/libcxx/strings/basic.string/string.capacity/
H A Dmax_size.pass.cpp21 static const size_t alignment = 16; variable
25 assert(str.max_size() == std::numeric_limits<size_t>::max() - alignment); in full_size()
29 assert(u8str.max_size() == std::numeric_limits<size_t>::max() - alignment); in full_size()
34 assert(wstr.max_size() == std::numeric_limits<size_t>::max() / sizeof(wchar_t) - alignment); in full_size()
39 assert(u16str.max_size() == std::numeric_limits<size_t>::max() / 2 - alignment); in full_size()
40 assert(u32str.max_size() == std::numeric_limits<size_t>::max() / 4 - alignment); in full_size()
45 assert(str.max_size() == std::numeric_limits<size_t>::max() / 2 - alignment); in half_size()
49 assert(u8str.max_size() == std::numeric_limits<size_t>::max() / 2 - alignment); in half_size()
54 …size() == std::numeric_limits<size_t>::max() / std::max<size_t>(2ul, sizeof(wchar_t)) - alignment); in half_size()
59 assert(u16str.max_size() == std::numeric_limits<size_t>::max() / 2 - alignment); in half_size()
[all …]
/llvm-project-15.0.7/llvm/test/tools/llvm-reduce/mir/
H A Dpreserve-frame-info.mir30 # RESULT-NEXT: - { id: 2, offset: 48, size: 8, alignment: 16, isAliased: true }
31 # RESULT-NEXT: - { id: 3, offset: 16, size: 16, alignment: 16 }
32 # RESULT-NEXT: - { id: 4, size: 8, alignment: 16 }
46 # RESULT-NEXT: - { id: 9, name: guard, offset: 128, size: 4, alignment: 4 }
129 - { id: 1, offset: 16, size: 16, alignment: 8, name: bigalloca }
130 - { id: 0, offset: 64, size: 4, alignment: 16,
133 - { id: 2, offset: 32, size: 4, alignment: 4, type: spill-slot }
135 - { id: 4, type: variable-sized, alignment: 64, name: dynamic_alloca }
136 - { id: 5, name: m1, size: 2052, alignment: 4, local-offset: 0 }
137 - { id: 6, name: m2, size: 2060, alignment: 32, local-offset: 2080 }
[all …]
/llvm-project-15.0.7/llvm/test/CodeGen/AArch64/
H A Dalign-down.ll5 ; ptr - (ptr & (alignment-1))
7 ; ptr & (0 - alignment)
23 %mask = add i32 %alignment, -1
34 %mask = add i64 %alignment, -1
46 %mask = add i32 %alignment, -1
62 %mask = add i32 %alignment, -1
76 %mask = add i32 %alignment, -1
91 %mask = add i32 %alignment, -1
108 %mask = add i32 %alignment, -1
120 %mask = add i32 %alignment, -1
[all …]
H A Dstack-id-pei-alloc.mir9 # CHECK: id: 0, name: '', type: default, offset: -8, size: 8, alignment: 8,
11 # CHECK: id: 1, name: '', type: default, offset: -16, size: 8, alignment: 8,
13 # CHECK: id: 2, name: '', type: default, offset: 0, size: 8, alignment: 8,
19 - { id: 0, stack-id: default, size: 8, alignment: 8, offset: 0 }
20 - { id: 1, stack-id: default, size: 8, alignment: 8, offset: 0 }
21 - { id: 2, stack-id: noalloc, size: 8, alignment: 8, offset: 0 }
28 # with alignment of 64. MaxAlignment only pertains to the default stack
38 - { id: 0, stack-id: default, size: 16, alignment: 32 }
39 - { id: 1, stack-id: noalloc, size: 16, alignment: 64 }
51 - { id: 0, stack-id: default, size: 16, alignment: 32 }
[all …]
/llvm-project-15.0.7/lld/wasm/
H A DOutputSegment.cpp23 alignment = std::max(alignment, inSeg->alignment); in addInputSegment()
25 size = llvm::alignTo(size, 1ULL << inSeg->alignment); in addInputSegment()
28 << " align=" << inSeg->alignment << " at:" << size << "\n"); in addInputSegment()
55 return seg->flags == ms->flags && seg->alignment == ms->alignment; in finalizeInputSegments()
59 << " alignment=" << ms->alignment << "\n"); in finalizeInputSegments()
60 auto *syn = make<SyntheticMergedChunk>(name, ms->alignment, ms->flags); in finalizeInputSegments()
77 size = llvm::alignTo(size, 1ULL << seg->alignment); in finalizeInputSegments()
/llvm-project-15.0.7/llvm/test/MC/MachO/
H A Dx86_32-optimal_nop.s4 .align 4, 0 # start with 16 byte alignment filled with zeros
11 .align 4, 0 # start with 16 byte alignment filled with zeros
19 .align 4, 0 # start with 16 byte alignment filled with zeros
26 .align 4, 0 # start with 16 byte alignment filled with zeros
36 .align 4, 0 # start with 16 byte alignment filled with zeros
45 .align 4, 0 # start with 16 byte alignment filled with zeros
53 .align 4, 0 # start with 16 byte alignment filled with zeros
60 .align 4, 0 # start with 16 byte alignment filled with zeros
74 .align 4, 0 # start with 16 byte alignment filled with zeros
87 .align 4, 0 # start with 16 byte alignment filled with zeros
[all …]
/llvm-project-15.0.7/llvm/test/tools/llvm-objcopy/ELF/
H A Dset-section-alignment.test3 # RUN: llvm-objcopy --set-section-alignment .foo=4 --set-section-alignment .bar=0x5 \
4 # RUN: --set-section-alignment .baz=0 %t %t.2
19 # RUN: llvm-objcopy --set-section-alignment .foo=4 --set-section-alignment=.foo=7 %t %t.3
33 # RUN: llvm-objcopy --set-section-alignment .not_exist=4 %t.3 %t.4
36 # RUN: not llvm-objcopy --set-section-alignment=.foo %t /dev/null 2>&1 | \
38 # MISSING-EQUAL: error: bad format for --set-section-alignment: missing '='
40 # RUN: not llvm-objcopy --set-section-alignment==4 %t /dev/null 2>&1 | \
42 # MISSING-SECTION: error: bad format for --set-section-alignment: missing section name
44 # RUN: not llvm-objcopy --set-section-alignment=.foo=bar %t /dev/null 2>&1 | \
46 # INVALID-ALIGN: error: invalid value for --set-section-alignment: 'bar'
/llvm-project-15.0.7/libcxx/test/std/utilities/memory/ptr.align/
H A Dassume_aligned.pass.cpp25 constexpr std::size_t alignment = alignof(T); in check() local
27 if constexpr (alignment >= 1) in check()
29 if constexpr (alignment >= 2) in check()
31 if constexpr (alignment >= 4) in check()
33 if constexpr (alignment >= 8) in check()
35 if constexpr (alignment >= 16) in check()
37 if constexpr (alignment >= 32) in check()
39 if constexpr (alignment >= 64) in check()
41 if constexpr (alignment >= 128) in check()
/llvm-project-15.0.7/compiler-rt/lib/dfsan/
H A Ddfsan_allocator.cpp100 allocated = allocator.Allocate(cache, size, alignment); in DFsanAllocate()
104 allocated = allocator.Allocate(cache, size, alignment); in DFsanAllocate()
231 void *dfsan_aligned_alloc(uptr alignment, uptr size) { in dfsan_aligned_alloc() argument
237 ReportInvalidAlignedAllocAlignment(size, alignment, &stack); in dfsan_aligned_alloc()
242 void *dfsan_memalign(uptr alignment, uptr size) { in dfsan_memalign() argument
243 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in dfsan_memalign()
248 ReportInvalidAllocationAlignment(alignment, &stack); in dfsan_memalign()
254 if (UNLIKELY(!CheckPosixMemalignAlignment(alignment))) { in dfsan_posix_memalign()
258 ReportInvalidPosixMemalignAlignment(alignment, &stack); in dfsan_posix_memalign()
260 void *ptr = DFsanAllocate(size, alignment, false /*zeroise*/); in dfsan_posix_memalign()
[all …]
/llvm-project-15.0.7/libc/src/string/memory_utils/
H A Dutils.h58 template <size_t alignment> intptr_t offset_from_last_aligned(const void *ptr) { in offset_from_last_aligned()
59 static_assert(is_power2(alignment), "alignment must be a power of 2"); in offset_from_last_aligned()
60 return reinterpret_cast<uintptr_t>(ptr) & (alignment - 1U); in offset_from_last_aligned()
63 template <size_t alignment> intptr_t offset_to_next_aligned(const void *ptr) { in offset_to_next_aligned()
64 static_assert(is_power2(alignment), "alignment must be a power of 2"); in offset_to_next_aligned()
67 return -reinterpret_cast<uintptr_t>(ptr) & (alignment - 1U); in offset_to_next_aligned()
75 template <size_t alignment, typename T> static T *assume_aligned(T *ptr) { in assume_aligned()
76 return reinterpret_cast<T *>(__builtin_assume_aligned(ptr, alignment)); in assume_aligned()
/llvm-project-15.0.7/compiler-rt/lib/hwasan/
H A Dhwasan_allocation_functions.cpp32 int __sanitizer_posix_memalign(void **memptr, uptr alignment, uptr size) { in __sanitizer_posix_memalign() argument
35 int res = hwasan_posix_memalign(memptr, alignment, size, &stack); in __sanitizer_posix_memalign()
40 void *__sanitizer_memalign(uptr alignment, uptr size) { in __sanitizer_memalign() argument
42 return hwasan_memalign(alignment, size, &stack); in __sanitizer_memalign()
46 void *__sanitizer_aligned_alloc(uptr alignment, uptr size) { in __sanitizer_aligned_alloc() argument
48 return hwasan_aligned_alloc(alignment, size, &stack); in __sanitizer_aligned_alloc()
52 void *__sanitizer___libc_memalign(uptr alignment, uptr size) { in __sanitizer___libc_memalign() argument
54 void *ptr = hwasan_memalign(alignment, size, &stack); in __sanitizer___libc_memalign()
153 INTERCEPTOR_ALIAS(int, posix_memalign, void **memptr, SIZE_T alignment,
155 INTERCEPTOR_ALIAS(void *, aligned_alloc, SIZE_T alignment, SIZE_T size);
[all …]
/llvm-project-15.0.7/llvm/test/CodeGen/MIR/AMDGPU/
H A Dstack-id.mir7 # CHECK: - { id: 0, type: spill-slot, offset: 0, size: 4, alignment: 4, stack-id: default,
8 # CHECK: - { id: 1, type: spill-slot, offset: 0, size: 8, alignment: 4, stack-id: default,
9 # CHECK: - { id: 2, type: spill-slot, offset: 0, size: 16, alignment: 4, stack-id: noalloc,
24 - { id: 0, type: spill-slot, offset: 0, size: 16, alignment: 4, stack-id: noalloc }
25 - { id: 1, type: spill-slot, offset: 0, size: 8, alignment: 4, stack-id: default }
26 - { id: 2, type: spill-slot, offset: 0, size: 4, alignment: 4 }
28 - { id: 0, name: '', type: spill-slot, offset: 0, size: 16, alignment: 4, stack-id: noalloc }
29 - { id: 1, name: '', type: spill-slot, offset: 0, size: 8, alignment: 4, stack-id: default }
30 - { id: 2, name: '', type: spill-slot, offset: 0, size: 4, alignment: 4 }

12345678910>>...80