From 8b9cffd15955b08311c41c37cd06acd7db3bd7f4 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 25 Nov 2012 21:54:33 +0100 Subject: [PATCH] documentation: Update (i.e. mostly delete) information regarding current_ir_graph. --- include/libfirm/irnode.h | 9 ++++----- include/libfirm/iroptimize.h | 6 +++--- include/libfirm/irouts.h | 2 +- include/libfirm/irtypeinfo.h | 3 +-- include/libfirm/irverify.h | 1 - include/libfirm/lowering.h | 2 -- include/libfirm/typerep.h | 2 +- 7 files changed, 10 insertions(+), 15 deletions(-) diff --git a/include/libfirm/irnode.h b/include/libfirm/irnode.h index f49d9eb32..0f457b55d 100644 --- a/include/libfirm/irnode.h +++ b/include/libfirm/irnode.h @@ -83,7 +83,6 @@ FIRM_API ir_node *get_irn_n(const ir_node *node, int n); * Replaces the old in array by a new one that will contain the ins given in * the parameters. Conserves the block predecessor. It copies the array passed. * This function is necessary to adjust in arrays of blocks, calls and phis. - * Assumes that current_ir_graph is set to the graph containing "node". * "in" must contain all predecessors except the block that are required for * the nodes opcode. */ FIRM_API void set_irn_in(ir_node *node, int arity, ir_node *in[]); @@ -163,11 +162,11 @@ FIRM_API ident *get_irn_opident(const ir_node *node); FIRM_API ir_visited_t get_irn_visited(const ir_node *node); /** Sets the visited counter of a node. */ FIRM_API void set_irn_visited(ir_node *node, ir_visited_t visited); -/** Sets visited to get_irg_visited(current_ir_graph). */ +/** Sets visited to get_irg_visited(get_irn_irg(node)). */ FIRM_API void mark_irn_visited(ir_node *node); -/** Returns 1 if visited >= get_irg_visited(current_ir_graph). */ +/** Returns 1 if visited >= get_irg_visited(get_irn_irg(node)). */ FIRM_API int irn_visited(const ir_node *node); -/** Returns 1 if visited >= get_irg_visited(current_ir_graph). Marks the node +/** Returns 1 if visited >= get_irg_visited(get_irn_irg(node)). Marks the node * visited, if it was not. */ FIRM_API int irn_visited_else_mark(ir_node *node); @@ -486,7 +485,7 @@ FIRM_API ir_entity *get_Call_callee(const ir_node *node, size_t pos); /** Sets the full callee array. * - * The passed array is copied. Assumes current_ir_graph set properly! */ + * The passed array is copied. */ FIRM_API void set_Call_callee_arr(ir_node *node, size_t n, ir_entity **arr); /** Frees callee array of call node @p node */ FIRM_API void remove_Call_callee_arr(ir_node *node); diff --git a/include/libfirm/iroptimize.h b/include/libfirm/iroptimize.h index d8be4c8ba..a1e31fc07 100644 --- a/include/libfirm/iroptimize.h +++ b/include/libfirm/iroptimize.h @@ -253,9 +253,9 @@ FIRM_API ir_graph_pass_t *opt_parallelize_mem_pass(const char *name); * @param load the load to replace * @param c the constant * - * @return in the modes match or can be transformed using a reinterpret cast - * returns a copy of the constant (possibly Conv'ed) on the - * current_ir_graph + * @return if the modes match or can be transformed using a reinterpret cast + * returns a copy of the constant (possibly Conv'ed) in the graph where + * the load is. */ FIRM_API ir_node *can_replace_load_by_const(const ir_node *load, ir_node *c); diff --git a/include/libfirm/irouts.h b/include/libfirm/irouts.h index dfa2f34be..57d5c5c54 100644 --- a/include/libfirm/irouts.h +++ b/include/libfirm/irouts.h @@ -73,7 +73,7 @@ FIRM_API ir_node *get_Block_cfg_out_ka(const ir_node *node, unsigned pos); /** * Walks over the graph starting at node. Walks also if graph is in state - * "outs_inconsistent". Assumes current_ir_graph is set properly. + * "outs_inconsistent". */ FIRM_API void irg_out_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env); diff --git a/include/libfirm/irtypeinfo.h b/include/libfirm/irtypeinfo.h index 9c559dcd2..45eaa912e 100644 --- a/include/libfirm/irtypeinfo.h +++ b/include/libfirm/irtypeinfo.h @@ -94,8 +94,7 @@ FIRM_API void set_irp_typeinfo_inconsistent(void); /** Accessing the type information. * * These routines only work properly if the ir_graph is in state - * ir_typeinfo_consistent or ir_typeinfo_inconsistent. They - * assume current_ir_graph set properly. + * ir_typeinfo_consistent or ir_typeinfo_inconsistent. */ FIRM_API ir_type *get_irn_typeinfo_type(const ir_node *n); /** Sets type information of procedure graph node @p node to type @p type. */ diff --git a/include/libfirm/irverify.h b/include/libfirm/irverify.h index f6997ea97..b54bc4a64 100644 --- a/include/libfirm/irverify.h +++ b/include/libfirm/irverify.h @@ -35,7 +35,6 @@ /** * Tests the modes of checknode and its predecessors. - * checknode must be in current_ir_graph. * * @return NON-zero on success */ diff --git a/include/libfirm/lowering.h b/include/libfirm/lowering.h index 9734eb4f8..9b4935373 100644 --- a/include/libfirm/lowering.h +++ b/include/libfirm/lowering.h @@ -207,8 +207,6 @@ typedef union i_record { * Every call or instruction is reported to its mapper function, * which is responsible for rebuilding the graph. * - * current_ir_graph is always set. - * * @param list an array of intrinsic map records * @param length the length of the array * @param part_block_used set to true if part_block() must be using during lowering diff --git a/include/libfirm/typerep.h b/include/libfirm/typerep.h index e2bc6b243..ed7d96260 100644 --- a/include/libfirm/typerep.h +++ b/include/libfirm/typerep.h @@ -1767,7 +1767,7 @@ FIRM_API const tp_op *get_tpop_method(void); * * The array type represents rectangular multi dimensional arrays. * The constants representing the bounds must be allocated to - * get_const_code_irg() by setting current_ir_graph accordingly. + * get_const_code_irg(). * * - n_dimensions: Number of array dimensions. * - *lower_bound: Lower bounds of dimensions. Usually all 0. -- 2.20.1