#include <string.h>
#endif
+#include "debug.h"
#include "interval_analysis.h"
#include "execution_frequency.h"
#include "firm_common_t.h"
#include "irprintf.h"
#include "hashptr.h"
+DEBUG_ONLY(static firm_dbg_module_t *dbg);
+
/*------------------------------------------------------------------*/
/* A new in array via a hashmap. */
/* The in array refers to the loop the block is contained in if the */
int region_attr_cmp(const void *e1, const void *e2, size_t size) {
region_attr *ra1 = (region_attr *)e1;
region_attr *ra2 = (region_attr *)e2;
+ (void) size;
return (ra1->reg != ra2->reg);
}
}
-static int find_previous_loop(ir_loop *l, ir_loop *pred_l, ir_node *b, ir_node *pred_b, ir_node *cfop) {
+static int find_previous_loop(ir_loop *l, ir_loop *pred_l, ir_node *b,
+ ir_node *pred_b, ir_node *cfop)
+{
ir_loop *outer = get_loop_outer_loop(l);
int found, i;
int l_pos = get_loop_element_pos(outer, l);
+ (void) pred_l;
assert(l_pos > -1);
assert(l_pos > 0 && "Is this a necessary condition? There could be a perfect nest ...");
if (is_backedge(b, i)) {
if (b != get_loop_element(l, 0).node) {
- if (get_firm_verbosity()) {
- ir_printf("Loophead not at loop position 0. %+F\n", b);
- }
+ DB((dbg, LEVEL_1, "Loophead not at loop position 0. %+F\n", b));
}
/* There are no backedges in the interval decomposition. */
add_region_in(b, NULL);
int found = find_inner_loop(b, l, pred, cfop);
if (!found) {
if (b != get_loop_element(l, 0).node) {
- if (get_firm_verbosity()) {
- ir_printf("Loop entry not at loop position 0. %+F\n", b);
- }
+ DB((dbg, LEVEL_1, "Loop entry not at loop position 0. %+F\n", b));
}
found = find_outer_loop(l, pred_l, pred, cfop);
if (found) add_region_in(b, NULL); /* placeholder */
ir_graph *rem = current_ir_graph;
current_ir_graph = irg;
+ FIRM_DBG_REGISTER(dbg, "firm.ana.interval");
+
if (!region_attr_set)
region_attr_set = new_set(region_attr_cmp, 256);
dump_interval_loop(f, get_irg_loop(current_ir_graph));
- vcg_close(f);
+ dump_vcg_footer(f);
+ fclose(f);
}