projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce flip-flopping normalisations
[libfirm]
/
ir
/
ir
/
iredges_t.h
diff --git
a/ir/ir/iredges_t.h
b/ir/ir/iredges_t.h
index
c1662ac
..
db8eede
100644
(file)
--- a/
ir/ir/iredges_t.h
+++ b/
ir/ir/iredges_t.h
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
*
* This file is part of libFirm.
*
@@
-50,10
+50,6
@@
struct ir_edge_t {
unsigned present : 1; /**< Used by the verifier. Don't rely on its content. */
unsigned kind : 4; /**< The kind of the edge. */
struct list_head list; /**< The list head to queue all out edges at a node. */
unsigned present : 1; /**< Used by the verifier. Don't rely on its content. */
unsigned kind : 4; /**< The kind of the edge. */
struct list_head list; /**< The list head to queue all out edges at a node. */
-#ifdef DEBUG_libfirm
- long src_nr; /**< The node number of the source node. */
- long edge_nr; /**< A unique number identifying the edge. */
-#endif
};
};
@@
-103,16
+99,7
@@
static inline const ir_edge_t *_get_irn_out_edge_next(const ir_node *irn, const
*/
static inline int _get_irn_n_edges_kind(const ir_node *irn, int kind)
{
*/
static inline int _get_irn_n_edges_kind(const ir_node *irn, int kind)
{
- /* Perhaps out_count was buggy. This code does it more safely. */
-#if 0
- int res = 0;
- const struct list_head *pos, *head = _get_irn_outs_head(irn, kind);
- list_for_each(pos, head)
- res++;
- return res;
-#else
return _get_irn_edge_info(irn, kind)->out_count;
return _get_irn_edge_info(irn, kind)->out_count;
-#endif
}
static inline int _edges_activated_kind(const ir_graph *irg, ir_edge_kind_t kind)
}
static inline int _edges_activated_kind(const ir_graph *irg, ir_edge_kind_t kind)
@@
-124,7
+111,7
@@
static inline int _edges_activated_kind(const ir_graph *irg, ir_edge_kind_t kind
* Assure, that the edges information is present for a certain graph.
* @param irg The graph.
*/
* Assure, that the edges information is present for a certain graph.
* @param irg The graph.
*/
-static inline void _edges_assure_kind(ir_graph *irg, i
n
t kind)
+static inline void _edges_assure_kind(ir_graph *irg, i
r_edge_kind_
t kind)
{
if(!_edges_activated_kind(irg, kind))
edges_activate_kind(irg, kind);
{
if(!_edges_activated_kind(irg, kind))
edges_activate_kind(irg, kind);
@@
-135,9
+122,9
@@
void edges_init_graph_kind(ir_graph *irg, ir_edge_kind_t kind);
/**
* A node might be revivaled by CSE.
*/
/**
* A node might be revivaled by CSE.
*/
-void edges_node_revival(ir_node *node
, ir_graph *irg
);
+void edges_node_revival(ir_node *node);
-void edges_invalidate_kind(ir_node *irn, ir_edge_kind_t kind
, ir_graph *irg
);
+void edges_invalidate_kind(ir_node *irn, ir_edge_kind_t kind);
/**
* Register additional memory in an edge.
/**
* Register additional memory in an edge.
@@
-147,7
+134,7
@@
void edges_invalidate_kind(ir_node *irn, ir_edge_kind_t kind, ir_graph *irg);
* edges_get_private_data()
* to get a pointer to your data.
*/
* edges_get_private_data()
* to get a pointer to your data.
*/
-
in
t edges_register_private_data(size_t n);
+
size_
t edges_register_private_data(size_t n);
/**
* Get a pointer to the private data you registered.
/**
* Get a pointer to the private data you registered.
@@
-177,7
+164,7
@@
static inline int _get_edge_src_pos(const ir_edge_t *edge)
*/
extern void init_edges(void);
*/
extern void init_edges(void);
-void edges_invalidate_all(ir_node *irn
, ir_graph *irg
);
+void edges_invalidate_all(ir_node *irn);
/**
* Helper function to dump the edge set of a graph,
/**
* Helper function to dump the edge set of a graph,
@@
-185,6
+172,12
@@
void edges_invalidate_all(ir_node *irn, ir_graph *irg);
*/
void edges_dump_kind(ir_graph *irg, ir_edge_kind_t kind);
*/
void edges_dump_kind(ir_graph *irg, ir_edge_kind_t kind);
+/**
+ * Notify normal and block edges.
+ */
+void edges_notify_edge(ir_node *src, int pos, ir_node *tgt,
+ ir_node *old_tgt, ir_graph *irg);
+
#define get_irn_n_edges_kind(irn, kind) _get_irn_n_edges_kind(irn, kind)
#define get_edge_src_irn(edge) _get_edge_src_irn(edge)
#define get_edge_src_pos(edge) _get_edge_src_pos(edge)
#define get_irn_n_edges_kind(irn, kind) _get_irn_n_edges_kind(irn, kind)
#define get_edge_src_irn(edge) _get_edge_src_irn(edge)
#define get_edge_src_pos(edge) _get_edge_src_pos(edge)