[Mlir-commits] [llvm] [mlir] mlir/MathExtras: consolidate with llvm/MathExtras (PR #95087)

Thorsten Schütt llvmlistbot at llvm.org
Tue Jun 11 02:54:17 PDT 2024


================
@@ -424,11 +424,47 @@ template <uint64_t Align> constexpr inline uint64_t alignTo(uint64_t Value) {
   return (Value + Align - 1) / Align * Align;
 }
 
-/// Returns the integer ceil(Numerator / Denominator).
-inline uint64_t divideCeil(uint64_t Numerator, uint64_t Denominator) {
+/// Returns the integer ceil(Numerator / Denominator). Unsigned integer version.
+LLVM_ATTRIBUTE_ALWAYS_INLINE uint64_t divideCeil(uint64_t Numerator,
----------------
tschuett wrote:

The difference is that the traditional overflow functions are templated function. They cannot be always inlined. They are instantiated. `divideCeil` is not a templated function. It is open to always inline.

https://github.com/llvm/llvm-project/pull/95087


More information about the Mlir-commits mailing list