Commit bfbb4c3a authored by Christian Würdig's avatar Christian Würdig
Browse files

added be_kill_node function

parent c086f221
......@@ -189,6 +189,23 @@ unsigned get_num_reachable_nodes(ir_graph *irg) {
return num;
}
/**
* Sets all node inputs to BAD node.
*/
void be_kill_node(ir_node *irn) {
int i;
ir_graph *irg;
if (is_Bad(irn))
return;
irg = get_irn_irg(irn);
for (i = get_irn_arity(irn) - 1; i >= 0; --i) {
set_irn_n(irn, i, get_irg_bad(irg));
}
}
/* FIXME: not used. can be deleted? */
ir_node *dom_up_search(pset *accept, ir_node *start_point_exclusive) {
ir_node *irn, *idom;
......
......@@ -116,6 +116,12 @@ void be_dump(ir_graph *irg, const char *suffix, void (*dumper)(ir_graph *, const
*/
unsigned get_num_reachable_nodes(ir_graph *irg);
/**
* Sets all node inputs to BAD node.
* @param irn The node to be killed.
*/
void be_kill_node(ir_node *irn);
/**
* Search for an irn in @p accept.
* The search is started at @p start_point_exclusive and continues upwards the dom-tree
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment