return res;
}
-/**
+/*
* Reset the user's private data at offset 'offset'
* The user has to remember his offset and the size of his data!
* Caution: Using wrong values here can destroy other users private data!
*/
-void edges_reset_private_data(ir_graph *irg, int offset, size_t size) {
+void edges_reset_private_data(ir_graph *irg, int offset, unsigned size) {
irg_edge_info_t *info = _get_irg_edge_info(irg, EDGE_KIND_NORMAL);
ir_edge_t *edge;
ir_edgeset_iterator_t iter;
visit.data = &w;
+ assert(!info->activated);
+
info->activated = 1;
edges_init_graph_kind(irg, kind);
if (kind == EDGE_KIND_DEP) {
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;
}