[llvm] [NFC] Various Cleanup in StackColoring, StackSlotColoring, LiveStacks (PR #143931)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 22 20:58:28 PDT 2025


================
@@ -795,6 +795,49 @@ using stack_float_t = volatile float;
 using stack_float_t = float;
 #endif
 
+/// Returns the number of digits in the given integer.
+inline int NumDigits(uint64_t N) {
----------------
dwblaikie wrote:

Presumably there's some builtin function to do this? (log10?) & maybe this could have some unit test coverage (moreso if it'll continue to be this manually crafted thing, less so if it's just delegating to another function)

(& this could be done in a separate change, perhaps)

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


More information about the llvm-commits mailing list