-/* This function can be used by targets to set the flags originally
- implied by -ffast-math and -fno-fast-math. */
-
-extern void set_fast_math_flags (int);
-
-extern void set_unsafe_math_optimizations_flags (int);
-
-/* Handle -d switch. */
-extern void decode_d_option (const char *);
-
-/* Return true iff flags are set as if -ffast-math. */
-extern bool fast_math_flags_set_p (void);
-extern bool fast_math_flags_struct_set_p (struct cl_optimization *);
-
-/* Inline versions of the above for speed. */
-#if GCC_VERSION < 3004
-
-extern int clz_hwi (unsigned HOST_WIDE_INT x);
-extern int ctz_hwi (unsigned HOST_WIDE_INT x);
-extern int ffs_hwi (unsigned HOST_WIDE_INT x);
-
-/* Return log2, or -1 if not exact. */
-extern int exact_log2 (unsigned HOST_WIDE_INT);
-
-/* Return floor of log2, with -1 for zero. */
-extern int floor_log2 (unsigned HOST_WIDE_INT);
-
-#else /* GCC_VERSION >= 3004 */
-
-/* For convenience, define 0 -> word_size. */
-static inline int
-clz_hwi (unsigned HOST_WIDE_INT x)
-{
- if (x == 0)
- return HOST_BITS_PER_WIDE_INT;
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
- return __builtin_clzl (x);
-# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG
- return __builtin_clzll (x);
-# else
- return __builtin_clz (x);
-# endif
-}
-
-static inline int
-ctz_hwi (unsigned HOST_WIDE_INT x)
-{
- if (x == 0)
- return HOST_BITS_PER_WIDE_INT;
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
- return __builtin_ctzl (x);
-# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG
- return __builtin_ctzll (x);
-# else
- return __builtin_ctz (x);
-# endif
-}
-
-static inline int
-ffs_hwi (unsigned HOST_WIDE_INT x)
-{
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
- return __builtin_ffsl (x);
-# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG
- return __builtin_ffsll (x);
-# else
- return __builtin_ffs (x);
-# endif
-}
-
-static inline int
-floor_log2 (unsigned HOST_WIDE_INT x)
-{
- return HOST_BITS_PER_WIDE_INT - 1 - clz_hwi (x);
-}
-
-static inline int
-exact_log2 (unsigned HOST_WIDE_INT x)
-{
- return x == (x & -x) && x ? ctz_hwi (x) : -1;
-}
-
-#endif /* GCC_VERSION >= 3004 */
-