Remove the questionable and unused functions find_value() and r_find_value().
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 27 Feb 2012 13:11:13 +0000 (14:11 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 27 Feb 2012 13:16:11 +0000 (14:16 +0100)
include/libfirm/ircons.h
ir/ir/ircons.c

index 990c141..edbe936 100644 (file)
@@ -930,21 +930,6 @@ FIRM_API void set_value(int pos, ir_node *value);
 /** Sets current value of a variable in a given graph */
 FIRM_API void set_r_value(ir_graph *irg, int pos, ir_node *value);
 
-/**
- * Find the value number for a node in the current block.
- *
- * @param value  the searched value
- *
- * @return the value number of the value or -1 if this value has
- * no value number in the current block.
- */
-FIRM_API int find_value(ir_node *value);
-/**
- * Find value number for a node in the current block of a given graph
- * @see find_value()
- */
-FIRM_API int r_find_value(ir_graph *irg, ir_node *value);
-
 /** Returns the current memory state.
  *
  * Use this function to obtain the last definition of the memory
index b49ae6f..b7832bf 100644 (file)
@@ -624,23 +624,6 @@ void set_value(int pos, ir_node *value)
        set_r_value(current_ir_graph, pos, value);
 }
 
-int r_find_value(ir_graph *irg, ir_node *value)
-{
-       size_t i;
-       ir_node *bl = irg->current_block;
-
-       for (i = ARR_LEN(bl->attr.block.graph_arr); i > 1;) {
-               if (bl->attr.block.graph_arr[--i] == value)
-                       return i - 1;
-       }
-       return -1;
-}
-
-int find_value(ir_node *value)
-{
-       return r_find_value(current_ir_graph, value);
-}
-
 ir_node *get_r_store(ir_graph *irg)
 {
        assert(get_irg_phase_state(irg) == phase_building);