projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed addressmode
[libfirm]
/
ir
/
be
/
beifg.h
diff --git
a/ir/be/beifg.h
b/ir/be/beifg.h
index
18910b6
..
7130a13
100644
(file)
--- a/
ir/be/beifg.h
+++ b/
ir/be/beifg.h
@@
-10,17
+10,18
@@
#ifndef _BEIFG_H
#define _BEIFG_H
#ifndef _BEIFG_H
#define _BEIFG_H
-#include "
irnode
.h"
+#include "
firm_types
.h"
typedef struct _be_ifg_impl_t be_ifg_impl_t;
typedef struct _be_ifg_t be_ifg_t;
typedef struct _be_ifg_impl_t be_ifg_impl_t;
typedef struct _be_ifg_t be_ifg_t;
-#define be_ifg_nodes_iter_size(self) ((self)->impl->nodes_iter_size)
-#define be_ifg_neighbours_iter_size(self) ((self)->impl->neighbours_iter_size)
-
-#define be_ifg_neighbours_iter_alloca(self) (alloca(be_ifg_neighbours_iter_size(self)))
#define be_ifg_nodes_iter_alloca(self) (alloca(be_ifg_nodes_iter_size(self)))
#define be_ifg_nodes_iter_alloca(self) (alloca(be_ifg_nodes_iter_size(self)))
+#define be_ifg_neighbours_iter_alloca(self) (alloca(be_ifg_neighbours_iter_size(self)))
+#define be_ifg_cliques_iter_alloca(self) (alloca(be_ifg_cliques_iter_size(self)))
+size_t (be_ifg_nodes_iter_size)(const void *self);
+size_t (be_ifg_neighbours_iter_size)(const void *self);
+size_t (be_ifg_cliques_iter_size)(const void *self);
void (be_ifg_free)(void *self);
int (be_ifg_connected)(const void *self, const ir_node *a, const ir_node *b);
ir_node *(be_ifg_neighbours_begin)(const void *self, void *iter, const ir_node *irn);
void (be_ifg_free)(void *self);
int (be_ifg_connected)(const void *self, const ir_node *a, const ir_node *b);
ir_node *(be_ifg_neighbours_begin)(const void *self, void *iter, const ir_node *irn);
@@
-29,6
+30,9
@@
void (be_ifg_neighbours_break)(const void *self, void *iter);
ir_node *(be_ifg_nodes_begin)(const void *self, void *iter);
ir_node *(be_ifg_nodes_next)(const void *self, void *iter);
void (be_ifg_nodes_break)(const void *self, void *iter);
ir_node *(be_ifg_nodes_begin)(const void *self, void *iter);
ir_node *(be_ifg_nodes_next)(const void *self, void *iter);
void (be_ifg_nodes_break)(const void *self, void *iter);
+int (be_ifg_cliques_begin)(const void *self, void *iter, ir_node **buf);
+int (be_ifg_cliques_next)(const void *self, void *iter);
+void (be_ifg_cliques_break)(const void *self, void *iter);
int (be_ifg_degree)(const void *self, const ir_node *irn);
#define be_ifg_foreach_neighbour(self, iter, irn, pos) \
int (be_ifg_degree)(const void *self, const ir_node *irn);
#define be_ifg_foreach_neighbour(self, iter, irn, pos) \
@@
-37,4
+41,9
@@
int (be_ifg_degree)(const void *self, const ir_node *irn);
#define be_ifg_foreach_node(self, iter, pos) \
for(pos = be_ifg_nodes_begin(self, iter); (pos); pos = be_ifg_nodes_next(self, iter))
#define be_ifg_foreach_node(self, iter, pos) \
for(pos = be_ifg_nodes_begin(self, iter); (pos); pos = be_ifg_nodes_next(self, iter))
+#define be_ifg_foreach_clique(self, iter, buf, count) \
+ for(*(count) = be_ifg_cliques_begin(self, iter, buf); \
+ *(count) != -1 ; \
+ *(count) = be_ifg_cliques_next(self, iter))
+
#endif /* _BEIFG_H */
#endif /* _BEIFG_H */