- ENABLE(OPT_OPTIMIZED) |
- ENABLE(OPT_CSE) |
- DISABLE(OPT_GLOBAL_CSE) |
- ENABLE(OPT_UNREACHABLE_CODE) |
- ENABLE(OPT_CONTROL_FLOW_STRAIGHTENING) |
- ENABLE(OPT_CONTROL_FLOW_WEAK_SIMPLIFICATION) |
- ENABLE(OPT_CONTROL_FLOW_STRONG_SIMPLIFICATION) |
- ENABLE(OPT_CRITICAL_EDGES) |
- ENABLE(OPT_DEAD_NODE_ELIMINATION) |
- ENABLE(OPT_REASSOCIATION) |
- ENABLE(OPT_INLINE) |
- ENABLE(OPT_DYN_METH_DISPATCH) |
- ENABLE(OPT_NORMALIZE);
-
-/* set the flags with set_flagname, get the flag with get_flagname */
-void set_opt_cse (int value)
-{
- if (value)
- libFIRM_opt |= OPT_CSE;
- else
- libFIRM_opt &= ~OPT_CSE;
+#include "irflag_t.def"
+ 0;
+
+#undef FLAG
+#undef E_FLAG
+#undef I_FLAG
+
+
+/* verbose is always off on default */
+optimization_state_t libFIRM_verb = 0;
+
+/** The Firm verbosity level */
+int firm_verbosity_level;
+
+/* an external flag can be set and get from outside */
+#define E_FLAG(name, value, def) \
+void set_opt_##name(int flag) { \
+ if (flag) libFIRM_opt |= irf_##name; \
+ else libFIRM_opt &= ~irf_##name; \
+} \
+void set_opt_##name##_verbose(int flag) { \
+ if (flag) libFIRM_verb |= irf_##name; \
+ else libFIRM_verb &= ~irf_##name; \
+} \
+int (get_opt_##name)(void) { \
+ return _get_opt_##name(); \