From: Christoph Mallon Date: Sat, 24 Nov 2012 19:57:19 +0000 (+0100) Subject: belive: Remove unused functions and macros. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=fd96240794b2bc719ca2da1e2415ae9cef8d475a;p=libfirm belive: Remove unused functions and macros. --- diff --git a/ir/be/beintlive_t.h b/ir/be/beintlive_t.h index 051d1078e..eae2e3dd9 100644 --- a/ir/be/beintlive_t.h +++ b/ir/be/beintlive_t.h @@ -186,84 +186,7 @@ static inline int _dominates_use(const ir_node *irn, const ir_edge_t *edge) return _value_dominates(irn, use); } -/** - * Check if a node strictly dominates a use. - * Note that the use of a phi is in its corresponding predecessor. - * @param irn The node. - * @param edge The use. - * @return 1, if @p irn strictly dominates the use @p edge. - */ -static inline int _strictly_dominates_use(const ir_node *irn, const ir_edge_t *edge) -{ - return get_edge_src_irn(edge) != irn && _dominates_use(irn, edge); -} - -/** - * Check, if a node is live in front of another. - * @param irg The backend irg. - * @param irn The node. - * @param where The location to check for. - * @return 1, if @p irn is live in front of @p where. - */ -static inline int _be_lv_chk_before_irn(ir_graph *irg, const ir_node *irn, - const ir_node *where) -{ - const be_lv_t *lv = be_get_irg_liveness(irg); - - /* the node must strictly dominate the location, else it cannot be live there. */ - if (!_value_dominates(irn, where) || irn == where) - return 0; - - /* - * now that it is clear that it strictly dominates the location it is surely live - * if it is also live end at the block. - */ - if (be_is_live_end(lv, get_nodes_block(where), irn)) - return 1; - - /* - * If the node is not live out, we have to check if there - * is a use which is dominated by the location. - */ - foreach_out_edge (irn, edge) { - if (_dominates_use(where, edge)) - return 1; - } - - return 0; -} - -/** - * Check, if a node is live after another node. - * @param irg The backend irg. - * @param irn The node. - * @param where The location to check for. - * @return 1, if @p irn is live after @p where. - */ -static inline int _be_lv_chk_after_irn(ir_graph *irg, const ir_node *irn, - const ir_node *where) -{ - const be_lv_t *lv = be_get_irg_liveness(irg); - - if (!_value_dominates(irn, where)) - return 0; - - if (be_is_live_end(lv, get_nodes_block(where), irn)) - return 1; - - foreach_out_edge (irn, edge) { - if (_strictly_dominates_use(where, edge)) - return 1; - } - - return 0; -} - -#define value_dominates_intrablock(a, b) _value_dominates_intrablock(a, b) #define value_dominates(a, b) _value_dominates(a, b) #define dominates_use(a, e) _dominates_use(a, e) -#define strictly_dominates_use(a, e) _strictly_dominates_use(a, e) -#define be_lv_chk_before_irn(irg, a, b) _be_lv_chk_before_irn(irg, a, b) -#define be_lv_chk_after_irn(irg, a, b) _be_lv_chk_after_irn(irg, a, b) #endif