X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeifg_pointer.c;h=5c99d7408947211c7a807861598065ad9c968c02;hb=d16d39df6772995a29ecdc8de1904ccb2e523599;hp=c1b06e376b2506af5d0062ae83ffaad22ca90cc7;hpb=dc2df8d109c0d6f2d9b0810aba2327497f543973;p=libfirm diff --git a/ir/be/beifg_pointer.c b/ir/be/beifg_pointer.c index c1b06e376..5c99d7408 100644 --- a/ir/be/beifg_pointer.c +++ b/ir/be/beifg_pointer.c @@ -15,7 +15,6 @@ #include "belive_t.h" #include "list.h" -#include "irphase.h" #include "irphase_t.h" #include "irnode_t.h" @@ -49,7 +48,7 @@ typedef struct _ptr_head_t { typedef struct _ifg_pointer_t { const be_ifg_impl_t *impl; const be_chordal_env_t *env; - phase_t ph; + ir_phase ph; struct obstack obst; ptr_head_t *curr_ptr_head; ptr_element_t *curr_element; @@ -70,7 +69,7 @@ typedef struct _ptr_iter_t { /* PRIVATE FUNCTIONS */ -static void *ptr_irn_data_init(phase_t *ph, const ir_node *irn, void *data) +static void *ptr_irn_data_init(ir_phase *ph, ir_node *irn, void *data) { ptr_head_t *head = phase_alloc(ph, sizeof(*head)); INIT_LIST_HEAD(&head->list); @@ -102,8 +101,11 @@ static void write_pointers(bitset_t *live, ifg_pointer_t *ifg) ptr_head_t *element = ptr_get_new_head(ifg); ir_node *irn = NULL; +#if 0 + // Matze: huh, what is this?!? node numbers aren't in any way deterministic AFAIK if (live_irn->node_nr == 1883 || live_irn->node_nr == 1858) irn = NULL; +#endif element->element = ifg->curr_element; /* write current highest sub-clique for each node */ list_add(&element->list, &head->list); @@ -192,10 +194,12 @@ static void find_neighbour_walker(ir_node *bl, void *data) { ir_node *irn = b->irn; ptr_element_t *element = NULL; - int i = 0; +#if 0 + // ?!? if (irn->node_nr == 1883 || irn->node_nr == 1858) i=1; +#endif if (b->is_def) /* b is a new node */ { @@ -219,8 +223,11 @@ static void find_neighbour_walker(ir_node *bl, void *data) element->content_second.irn = b->irn; element->kind = 8888; /* both are ir_nodes */ +#if 0 + // ?!? if (irn->node_nr == 1883 || irn->node_nr == 1858 || irn->node_nr == 1936) i=1; +#endif last_element.element = element; @@ -296,8 +303,11 @@ static void find_neighbour_walker(ir_node *bl, void *data) last_element.element = my_element; ifg->curr_element = my_element; +#if 0 + // ?!? if (my_irn->node_nr == 1883 || my_irn->node_nr == 1858 || my_irn->node_nr == 1936) i=1; +#endif first = NULL; @@ -394,14 +404,16 @@ static ir_node *get_next_neighbour(ptr_iter_t *it) ir_node *res; ptr_head_t *head; ptr_element_t *element; - static int i = 0; element = it->curr_element_t; if (element == NULL) { +#if 0 + // ?!? if (it->irn->node_nr == 1883 || it->irn->node_nr == 1858) i=1; +#endif if (it->curr_ptr_head->list.next != &it->first_head->list) { @@ -597,8 +609,9 @@ static void ifg_pointer_free(void *self) free(self); } -static int ifg_pointer_connected(const ifg_pointer_t *ifg, const ir_node *a, const ir_node *b) +static int ifg_pointer_connected(const void *self, const ir_node *a, const ir_node *b) { + const ifg_pointer_t *ifg = self; int connected = -1; ptr_iter_t it; ir_node *irn = NULL;