added new licence header
[libfirm] / ir / be / beifg_clique.c
index 745c2d4..2450578 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
 /**
  * @file   beifg_clique.c
  * @date   18.11.2005
@@ -24,6 +43,7 @@
 #include "bera.h"
 #include "beifg_t.h"
 #include "bechordal_t.h"
+#include "benodesets.h"
 
 typedef struct _cli_head_t {
        struct list_head list;
@@ -46,7 +66,7 @@ typedef struct _cli_element_t {
 } cli_element_t;
 
 typedef struct _cli_iter_t {
-       ifg_clique_t *ifg;
+       const ifg_clique_t *ifg;
        cli_head_t *curr_cli_head;
        cli_element_t *curr_cli_element;
        const ir_node *curr_irn;
@@ -383,7 +403,6 @@ static void find_first_neighbour(const ifg_clique_t *ifg, cli_iter_t *it, const
 static ir_node *get_next_neighbour(cli_iter_t *it)
 {
        ir_node *res = NULL;
-       cli_head_t *cli_head = it->curr_cli_head;
        const ir_node *irn = it->curr_irn;
 
        if (it->curr_cli_element != NULL)
@@ -419,8 +438,9 @@ static void ifg_clique_free(void *self)
        free(self);
 }
 
-static int ifg_clique_connected(const ifg_clique_t *ifg, const ir_node *a, const ir_node *b)
+static int ifg_clique_connected(const void *self, const ir_node *a, const ir_node *b)
 {
+       const ifg_clique_t *ifg = self;
        cli_iter_t it;
        int connected = -1;
        ir_node *irn = NULL;