mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
IR: Replace DataLayout::RoundUpAlignment with RoundUpToAlignment
No functional change intended, just cleaning up some code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220187 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -597,7 +597,8 @@ inline uint64_t PowerOf2Floor(uint64_t A) {
|
||||
/// RoundUpToAlignment(~0LL, 8) = 0
|
||||
/// \endcode
|
||||
inline uint64_t RoundUpToAlignment(uint64_t Value, uint64_t Align) {
|
||||
return ((Value + Align - 1) / Align) * Align;
|
||||
assert(isPowerOf2_64(Align) && "Alignment must be power of 2!");
|
||||
return (Value + Align - 1) & ~uint64_t(Align - 1);
|
||||
}
|
||||
|
||||
/// Returns the offset to the next integer (mod 2**64) that is greater than
|
||||
|
Reference in New Issue
Block a user