From a05d2b1230301e76b9c487ad659d163c5274fda3 Mon Sep 17 00:00:00 2001 From: Daniel Grund Date: Tue, 16 Aug 2005 18:16:41 +0000 Subject: [PATCH] changed IF_EDGE_HASH --- ir/be/bechordal.c | 2 +- ir/be/bechordal_t.h | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ir/be/bechordal.c b/ir/be/bechordal.c index d1fb81f00..fe26caea1 100644 --- a/ir/be/bechordal.c +++ b/ir/be/bechordal.c @@ -59,7 +59,7 @@ static firm_dbg_module_t *dbg; #ifdef BUILD_GRAPH -#define IF_EDGE_HASH(e) ((e)->src) +#define IF_EDGE_HASH(e) ((e)->src ^ (e)->tgt) #define IF_NODE_HASH(n) ((n)->nnr) static int if_edge_cmp(const void *p1, const void *p2, size_t size) diff --git a/ir/be/bechordal_t.h b/ir/be/bechordal_t.h index 35317c69a..071990dfb 100644 --- a/ir/be/bechordal_t.h +++ b/ir/be/bechordal_t.h @@ -52,8 +52,8 @@ typedef struct _border_t { */ struct _be_chordal_env_t { struct obstack obst; /**< An obstack for temporary storage. */ - const be_main_session_env_t *session_env; /**< The current session. */ - pmap *border_heads; /**< Maps blocks to border heads. */ + const be_main_session_env_t *session_env; /**< The current session. */ + pmap *border_heads; /**< Maps blocks to border heads. */ #ifdef BUILD_GRAPH set *nodes; /**< The interference graph nodes. */ @@ -64,16 +64,14 @@ struct _be_chordal_env_t { bitset_t *colors; /**< The color mask. */ bitset_t *in_colors; /**< Colors used by live in values. */ int colors_n; /**< The number of colors. */ - const arch_register_class_t *cls; /**< The current register class. */ - void *data; /**< Some pointer, to which different + const arch_register_class_t *cls; /**< The current register class. */ + void *data; /**< Some pointer, to which different phases can attach data to. */ }; typedef struct _be_chordal_env_t be_chordal_env_t; -static INLINE struct list_head * -_get_block_border_head(const be_chordal_env_t *inf, ir_node *bl) -{ +static INLINE struct list_head *_get_block_border_head(const be_chordal_env_t *inf, ir_node *bl) { return pmap_get(inf->border_heads, bl); } @@ -93,6 +91,7 @@ typedef struct _if_edge_t { set *be_ra_get_ifg_edges(const be_chordal_env_t *env); set *be_ra_get_ifg_nodes(const be_chordal_env_t *env); + int ifg_has_edge(const be_chordal_env_t *env, const if_node_t *n1, const if_node_t* n2); #define ifn_get_degree(ifnode) pset_count(ifnode->neighb) -- 2.20.1