[block-freq] Add the method APInt::nearestLogBase2().