projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correctly caclulate the register use in the Op(x, x) case.
[libfirm]
/
ir
/
ana
/
absgraph.c
diff --git
a/ir/ana/absgraph.c
b/ir/ana/absgraph.c
index
b880304
..
efd9c0e
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.
*
@@
-26,6
+26,10
@@
*
* 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>
+#endif
+
#include "irgraph_t.h"
#include "iredges_t.h"
#include "absgraph.h"
#include "irgraph_t.h"
#include "iredges_t.h"
#include "absgraph.h"
@@
-37,6
+41,12
@@
static void *irg_cfg_succ_get_root(void *self)
return get_irg_start_block(irg);
}
return get_irg_start_block(irg);
}
+static void *irg_cfg_succ_get_end(void *self)
+{
+ ir_graph *irg = 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;
static void irg_cfg_succ_grow_succs(void *self, void *node, struct obstack *obst)
{
ir_node *bl = node;
@@
-50,12
+60,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)
@@
-70,5
+86,6
@@
static void irg_cfg_pred_grow_succs(void *self, void *node, struct obstack *obst
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
};
};