+
+ for (i = 0; i < n_irgs; ++i)
+ set_irg_exec_freq_state(get_irp_irg(i), exec_freq_none);
+ set_irp_exec_freq_state(exec_freq_none);
+}
+
+exec_freq_state get_irg_exec_freq_state(ir_graph *irg) {
+ return irg->execfreq_state;
+}
+void set_irg_exec_freq_state(ir_graph *irg, exec_freq_state s) {
+ if ((get_irp_exec_freq_state() == exec_freq_consistent && s != exec_freq_consistent) ||
+ (get_irp_exec_freq_state() == exec_freq_none && s != exec_freq_none))
+ irp->execfreq_state = exec_freq_inconsistent;
+ irg->execfreq_state = s;
+}
+
+/* Sets irg and irp exec freq state to inconsistent if it is set to consistent. */
+void set_irg_exec_freq_state_inconsistent(ir_graph *irg) {
+ if (get_irg_exec_freq_state(irg) == exec_freq_consistent)
+ set_irg_exec_freq_state(irg, exec_freq_inconsistent);
+}
+
+void set_irp_exec_freq_state(exec_freq_state s) {
+ irp->execfreq_state = s;
+}
+
+exec_freq_state get_irp_exec_freq_state(void) {
+ return irp->execfreq_state;
+}
+
+/* Sets irp and all irg exec freq states to inconsistent if it is set to consistent. */
+void set_irp_exec_freq_state_inconsistent(void) {
+ if (get_irp_exec_freq_state() != exec_freq_none) {
+ int i, n_irgs = get_irp_n_irgs();
+ set_irp_exec_freq_state(exec_freq_inconsistent);
+ for (i = 0; i < n_irgs; ++i) {
+ ir_graph *irg = get_irp_irg(i);
+ if (get_irg_exec_freq_state(irg) != exec_freq_none)
+ irg->execfreq_state = exec_freq_inconsistent;
+ }
+ }