The fls* bit-finding functions have to include zero-checks. In a case where the caller knows that the argument is not zero, these new functions provide a way to avoid those zero-checks.
This change uses _Generic to define an ilog2 macro that picks the right ilog2 function based on argument type, and to identify constant arguments so that they can be computed at compile time.
This is an alternative to D45170, which does not use _Generic.