memset and memcpy builtins should have alignment parameter #247
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
Milestone
Alignment must be known at compile time. If the source and destination pointers are known to be aligned to a value that is greater than 1, this can allow more optimal code generation. Otherwise, an alignment of 1 will still work fine. Alignment must be a power of 2.
Additionally, the existence of this parameter will encourage users to use
@import("std").mem.copy
and@import("std").mem.set
rather than unsafe low level intrinsics, and those who use these builtins will think more carefully when they decide to use it.http://llvm.org/docs/LangRef.html#llvm-memcpy-intrinsic
The text was updated successfully, but these errors were encountered: