X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firflag.c;h=0e6c7813108cb98906171e7c3b942b8e278322e7;hb=b78bdd4d94de46de4156272e6dbfe44e97933a5b;hp=6a656d39625ace2c463cbe9bb9934ad221eb6cef;hpb=09fcc6be7ee4866371d00de0203ef8be3e2ec1cf;p=libfirm diff --git a/ir/ir/irflag.c b/ir/ir/irflag.c index 6a656d396..0e6c78131 100644 --- a/ir/ir/irflag.c +++ b/ir/ir/irflag.c @@ -14,6 +14,8 @@ # include "config.h" #endif +#include + #ifdef WITH_LIBCORE #include #endif @@ -92,7 +94,6 @@ void set_opt_control_flow(int value) set_opt_control_flow_straightening(value); set_opt_control_flow_weak_simplification(value); set_opt_control_flow_strong_simplification(value); - set_opt_critical_edges(value); } void set_firm_verbosity (int value) { @@ -115,11 +116,24 @@ void restore_optimization_state(const optimization_state_t *state) libFIRM_opt = *state; } +/* Switches ALL optimizations off */ +void all_optimizations_off(void) +{ + libFIRM_opt = 0; +} + #ifdef _DEBUG -void firm_show_flags(void) { -#define E_FLAG(name, value, def) printf(#name " = %s\n", get_opt_##name() ? "ON" : "OFF"); -#define I_FLAG(name, value, def) printf(#name " = %s\n", get_opt_##name() ? "ON" : "OFF"); +/* 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"); #include "irflag_t.def" +#undef I_FLAG +#undef E_FLAG + printf("\n"); } #endif @@ -141,3 +155,9 @@ void firm_init_flags(void) lc_opt_add_table(grp, firm_flags); #endif } + +firm_verification_t opt_do_node_verification = FIRM_VERIFICATION_ON; + +void do_node_verification(firm_verification_t mode) { + opt_do_node_verification = mode; +}