[llvm] [offload] add handling of memory alignment to MemoryManagerTy (PR #218418)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 06:15:48 PDT 2026
================
@@ -264,32 +281,55 @@ class MemoryManagerTy {
ODBG(OLDT_Alloc) << "Got target pointer " << *TgtPtrOrErr
<< ". Return directly.";
+ if (Alignment > 0 && !isAddrAligned(Align(Alignment), *TgtPtrOrErr)) {
+ auto AlignErr = make_error<StringError>(
+ "Allocated address is misaligned", inconvertibleErrorCode());
----------------
EuphoricThinking wrote:
Yes, we check whether the default alignment complies with the user requirements. I forgot to mention this in the commit message.
https://github.com/llvm/llvm-project/pull/218418
More information about the llvm-commits
mailing list