+#ifdef _DEBUG
+/* only for debugging */
+void firm_show_flags(FILE *f) {
+ if (! f)
+ f = stdout;
+ printf("Firm optimization state:\n");
+#define E_FLAG(name, value, def) printf(" %-20s = %s\n", #name, get_opt_##name() ? "ON" : "OFF");
+#define I_FLAG(name, value, def) printf(" %-20s = %s\n", #name, get_opt_##name() ? "ON" : "OFF");
+#define R_FLAG(name, value) printf(" %-20s = %s\n", #name, is_##name##_running() ? "is running" : "not running");
+#include "irflag_t.def"
+#undef I_FLAG
+#undef E_FLAG
+#undef R_FLAG
+ printf("\n");
+}
+#endif
+
+static const lc_opt_table_entry_t firm_flags[] = {
+#define I_FLAG(name, val, def) LC_OPT_ENT_BIT(#name, #name, &libFIRM_opt, (1 << val)),
+#define E_FLAG(name, val, def) LC_OPT_ENT_BIT(#name, #name, &libFIRM_opt, (1 << val)),
+#define R_FLAG(name, val)
+#include "irflag_t.def"
+#undef I_FLAG
+#undef E_FLAG
+#undef R_FLAG
+ LC_OPT_LAST
+};
+
+void firm_init_flags(void) {
+ lc_opt_entry_t *grp = lc_opt_get_grp(firm_opt_get_root(), "opt");
+ lc_opt_add_table(grp, firm_flags);
+}
+
+firm_verification_t opt_do_node_verification = FIRM_VERIFICATION_ON;
+
+void do_node_verification(firm_verification_t mode) {
+ opt_do_node_verification = mode;