beifg: Simplify the quite complicated way to divide a number by 2 in be_ifg_stat().
[libfirm] / ir / ana / absgraph.c
index 8b55379..424db57 100644 (file)
@@ -1,27 +1,12 @@
 /*
- * Copyright (C) 1995-2008 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.
+ * Copyright (C) 2012 University of Karlsruhe.
  */
 
 /**
- * @file    absgraph.c
+ * @file
  * @author  Sebastian Hack
  * @date    20.04.2007
- * @version $Id$
  * @brief
  *
  * Abstract graph implementations for the CFG of a ir_graph.
 
 static void *irg_cfg_succ_get_root(void *self)
 {
-       ir_graph *irg = self;
-       edges_assure_kind(irg, EDGE_KIND_BLOCK);
+       ir_graph *irg = (ir_graph*) self;
+       assure_edges_kind(irg, EDGE_KIND_BLOCK);
        return get_irg_start_block(irg);
 }
 
 static void *irg_cfg_succ_get_end(void *self)
 {
-       ir_graph *irg = self;
+       ir_graph *irg = (ir_graph*) self;
        return get_irg_end_block(irg);
 }
 
 static void irg_cfg_succ_grow_succs(void *self, void *node, struct obstack *obst)
 {
-       ir_node *bl = node;
-       const ir_edge_t *edge;
+       ir_node *bl = (ir_node*) node;
 
        (void) self;
        foreach_block_succ(bl, edge) {
@@ -77,8 +61,8 @@ static void irg_cfg_pred_grow_succs(void *self, void *node, struct obstack *obst
        int i, n;
 
        (void) self;
-       for (i = 0, n = get_irn_arity(node); i < n; ++i) {
-               obstack_ptr_grow(obst, get_irn_n(node, i));
+       for (i = 0, n = get_irn_arity((ir_node*) node); i < n; ++i) {
+               obstack_ptr_grow(obst, get_irn_n((ir_node*) node, i));
        }
 }