#include "belive_t.h"
#include "list.h"
-#include "irphase.h"
#include "irphase_t.h"
#include "irnode_t.h"
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;
/* 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);
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);
{
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 */
{
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;
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;
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)
{
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;
ifg->node_map = pmap_create(); /* to find all nodes, should be replaced by a "keywalker" of irphase */
- phase_init(&ifg->ph, "ptr_map", env->irg, PHASE_DEFAULT_GROWTH, ptr_irn_data_init);
+ phase_init(&ifg->ph, "ptr_map", env->irg, PHASE_DEFAULT_GROWTH, ptr_irn_data_init, NULL);
obstack_init(&ifg->obst);
dom_tree_walk_irg(env->irg, find_neighbour_walker, NULL, ifg);