projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove stray declaration
[libfirm]
/
ir
/
ana
/
absgraph.c
diff --git
a/ir/ana/absgraph.c
b/ir/ana/absgraph.c
index
1d483e2
..
f566344
100644
(file)
--- a/
ir/ana/absgraph.c
+++ b/
ir/ana/absgraph.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 1995-200
7
University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-200
8
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
*
* This file is part of libFirm.
*
@@
-22,13
+22,11
@@
* @author Sebastian Hack
* @date 20.04.2007
* @version $Id$
* @author Sebastian Hack
* @date 20.04.2007
* @version $Id$
- * @
summary
+ * @
brief
*
* Abstract graph implementations for the CFG of a ir_graph.
*/
*
* Abstract graph implementations for the CFG of a ir_graph.
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
#include <config.h>
-#endif
#include "irgraph_t.h"
#include "iredges_t.h"
#include "irgraph_t.h"
#include "iredges_t.h"
@@
-36,14
+34,20
@@
static void *irg_cfg_succ_get_root(void *self)
{
static void *irg_cfg_succ_get_root(void *self)
{
- ir_graph *irg = self;
- edges_a
ctivat
e_kind(irg, EDGE_KIND_BLOCK);
+ ir_graph *irg =
(ir_graph*)
self;
+ edges_a
ssur
e_kind(irg, EDGE_KIND_BLOCK);
return get_irg_start_block(irg);
}
return get_irg_start_block(irg);
}
+static void *irg_cfg_succ_get_end(void *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)
{
static void irg_cfg_succ_grow_succs(void *self, void *node, struct obstack *obst)
{
- ir_node *bl = node;
+ ir_node *bl =
(ir_node*)
node;
const ir_edge_t *edge;
(void) self;
const ir_edge_t *edge;
(void) self;
@@
-54,12
+58,18
@@
static void irg_cfg_succ_grow_succs(void *self, void *node, struct obstack *obst
const absgraph_t absgraph_irg_cfg_succ = {
irg_cfg_succ_get_root,
const absgraph_t absgraph_irg_cfg_succ = {
irg_cfg_succ_get_root,
- irg_cfg_succ_grow_succs
+ irg_cfg_succ_grow_succs,
+ irg_cfg_succ_get_end
};
static void *irg_cfg_pred_get_root(void *self)
{
};
static void *irg_cfg_pred_get_root(void *self)
{
- return get_irg_end_block(self);
+ return get_irg_end_block((ir_graph*) self);
+}
+
+static void *irg_cfg_pred_get_end(void *self)
+{
+ return get_irg_start_block((ir_graph*) self);
}
static void irg_cfg_pred_grow_succs(void *self, void *node, struct obstack *obst)
}
static void irg_cfg_pred_grow_succs(void *self, void *node, struct obstack *obst)
@@
-67,12
+77,13
@@
static void irg_cfg_pred_grow_succs(void *self, void *node, struct obstack *obst
int i, n;
(void) self;
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));
}
}
const absgraph_t absgraph_irg_cfg_pred = {
irg_cfg_pred_get_root,
}
}
const absgraph_t absgraph_irg_cfg_pred = {
irg_cfg_pred_get_root,
- irg_cfg_pred_grow_succs
+ irg_cfg_pred_grow_succs,
+ irg_cfg_pred_get_end
};
};