projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
14a32bf
)
Let edges_assure() only activate edge kinds, which are not activated yet.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Fri, 24 Oct 2008 17:32:01 +0000
(17:32 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Fri, 24 Oct 2008 17:32:01 +0000
(17:32 +0000)
[r23176]
ir/ir/iredges.c
patch
|
blob
|
history
diff --git
a/ir/ir/iredges.c
b/ir/ir/iredges.c
index
336c7b8
..
7bac22b
100644
(file)
--- a/
ir/ir/iredges.c
+++ b/
ir/ir/iredges.c
@@
-584,6
+584,8
@@
void edges_activate_kind(ir_graph *irg, ir_edge_kind_t kind)
visit.data = &w;
visit.data = &w;
+ assert(!info->activated);
+
info->activated = 1;
edges_init_graph_kind(irg, kind);
if (kind == EDGE_KIND_DEP) {
info->activated = 1;
edges_init_graph_kind(irg, kind);
if (kind == EDGE_KIND_DEP) {
@@
-891,11
+893,20
@@
void edges_deactivate(ir_graph *irg) {
edges_deactivate_kind(irg, EDGE_KIND_NORMAL);
}
edges_deactivate_kind(irg, EDGE_KIND_NORMAL);
}
-int edges_assure(ir_graph *irg) {
- int activated = edges_activated(irg);
+int edges_assure(ir_graph *irg)
+{
+ int activated = 0;
- if (!activated)
- edges_activate(irg);
+ if (edges_activated_kind(irg, EDGE_KIND_BLOCK)) {
+ activated = 1;
+ } else {
+ edges_activate_kind(irg, EDGE_KIND_BLOCK);
+ }
+ if (edges_activated_kind(irg, EDGE_KIND_NORMAL)) {
+ activated = 1;
+ } else {
+ edges_activate_kind(irg, EDGE_KIND_NORMAL);
+ }
return activated;
}
return activated;
}