[Mlir-commits] [llvm] [mlir] mlir/MathExtras: consolidate with llvm/MathExtras (PR #95087)
Nikita Popov
llvmlistbot at llvm.org
Tue Jun 11 12:45:53 PDT 2024
================
@@ -424,11 +424,43 @@ template <uint64_t Align> constexpr inline uint64_t alignTo(uint64_t Value) {
return (Value + Align - 1) / Align * Align;
}
-/// Returns the integer ceil(Numerator / Denominator).
+/// Returns the integer ceil(Numerator / Denominator). Unsigned integer version.
----------------
nikic wrote:
Orthogonal to this change, but I think it would be good to template these functions in a follow-up. I think we have many places where we're upcasting unsigned to uint64_t to make use of these, and especially for divisions performing it in a larger width can be much more expensive.
https://github.com/llvm/llvm-project/pull/95087
More information about the Mlir-commits
mailing list