-extern optimization_state_t libFIRM_opt;
-
-/* take care of the INLINE/USE_GCC_INLINE mess */
-
-# ifndef INLINE
-# ifdef USE_GCC_INLINE
-# define INLINE __extension__ ((__inline__))
-# else /* defined USE_GCC_INLINE */
-# define INLINE
-# endif /* define USE_GCC_INLINE */
-# endif /* defined INLINE */
-
-
-/** Returns constant folding optimization setting. */
-INLINE int get_opt_cse(void)
-# ifdef USE_GCC_INLINE
-{
- return libFIRM_opt & OPT_CSE;
-}
-# else /* defined USE_GCC_INLINE */
-;
-# endif /* not defined USE_GCC_INLINE */
-
-/** Returns constant subexpression elimination setting. */
-INLINE int get_opt_global_cse(void)
-# ifdef USE_GCC_INLINE
-{
- return libFIRM_opt & OPT_GLOBAL_CSE;
-}
-# else /* defined USE_GCC_INLINE */
-;
-# endif /* not defined USE_GCC_INLINE */
-
-/** Returns global constant subexpression elimination setting. */
-INLINE int get_opt_constant_folding(void)
-# ifdef USE_GCC_INLINE
-{
- return libFIRM_opt & OPT_CONSTANT_FOLDING;
-}
-# else /* defined USE_GCC_INLINE */
-;
-# endif /* not defined USE_GCC_INLINE */
-
-/** Returns unreachable code elimination setting. */
-INLINE int get_opt_unreachable_code(void)
-# ifdef USE_GCC_INLINE
-{
- return libFIRM_opt & OPT_UNREACHABLE_CODE;
-}
-# else /* defined USE_GCC_INLINE */
-;
-# endif /* not defined USE_GCC_INLINE */
-
-/** Returns Straightening setting. */
-INLINE int get_opt_control_flow_straightening(void)
-# ifdef USE_GCC_INLINE
-{
- return libFIRM_opt & OPT_CONTROL_FLOW_STRAIGHTENING;
-}
-# else /* defined USE_GCC_INLINE */
-;
-# endif /* not defined USE_GCC_INLINE */
-
-/** Returns if simplifications in local optimizations setting. */
-INLINE int get_opt_control_flow_weak_simplification(void)
-# ifdef USE_GCC_INLINE
-{
- return libFIRM_opt & OPT_CONTROL_FLOW_WEAK_SIMPLIFICATION;
-}
-# else /* defined USE_GCC_INLINE */
-;
-# endif /* not defined USE_GCC_INLINE */
-
-/** Returns strong if and loop simplification setting */
-INLINE int get_opt_control_flow_strong_simplification(void)
-# ifdef USE_GCC_INLINE
-{
- return libFIRM_opt & OPT_CONTROL_FLOW_STRONG_SIMPLIFICATION;
+/**
+ * libFIRM running flags
+ */
+typedef enum {
+#define E_FLAG(name, value, def)
+#define I_FLAG(name, value, def)
+#define R_FLAG(name, value) ir_rf_##name = (1 << value),
+
+#include "irflag_t.def"
+ ir_rf_last
+#undef I_FLAG
+#undef E_FLAG
+#undef R_FLAG
+} libfirm_running_t;
+
+extern optimization_state_t libFIRM_opt, libFIRM_running, libFIRM_verb;
+extern firm_verification_t opt_do_node_verification;
+
+/** initialises the flags */
+void firm_init_flags(void);
+
+/* generate the getter functions for external access */
+#define E_FLAG(name, value, def) \
+static inline int _get_opt_##name(void) { \
+ return libFIRM_opt & irf_##name; \