/** @} */
-/** @addtogroup Conv
- * @{
- */
-
-/** Constructor for a strictConv node.
- *
- * @param db A pointer for debug information.
- * @param block The IR block the node belongs to.
- * @param op The operand.
- * @param mode The mode of this the operand muss be converted .
- */
-FIRM_API ir_node *new_rd_strictConv(dbg_info *db, ir_node *block,
- ir_node *op, ir_mode *mode);
-
-/** Constructor for a strictConv node.
- *
- * @param block The IR block the node belongs to.
- * @param op The operand.
- * @param mode The mode of this the operand muss be converted .
- */
-FIRM_API ir_node *new_r_strictConv(ir_node *block, ir_node *op, ir_mode *mode);
-
-/** Constructor for a strict Conv node.
- *
- * @param db A pointer for debug information.
- * @param op The operand.
- * @param mode The mode of this the operand muss be converted .
- */
-FIRM_API ir_node *new_d_strictConv(dbg_info *db, ir_node *op, ir_mode *mode);
-
-/** Constructor for a strict Conv node.
- *
- * @param op The operand.
- * @param mode The mode of this the operand muss be converted .
- */
-FIRM_API ir_node *new_strictConv(ir_node *op, ir_mode *mode);
-
-/** @} */
-
/** @addtogroup Sel
* @{
*/
*
* @param *db A pointer for debug information.
* @param *block The block the node belong to.
+ * @param *mem memory dependency
* @param arity The number of data inputs to the node.
* @param *in The array of length arity of data inputs.
* @param *inputs The array of length arity of input constraints.
* @param *clobber The array of length n_clobber of clobbered registers.
* @param *asm_text The assembler text.
*/
-FIRM_API ir_node *new_rd_ASM(dbg_info *db, ir_node *block,
+FIRM_API ir_node *new_rd_ASM(dbg_info *db, ir_node *block, ir_node *mem,
int arity, ir_node *in[], ir_asm_constraint *inputs,
size_t n_outs, ir_asm_constraint *outputs,
size_t n_clobber, ident *clobber[],
/** Constructor for an ASM pseudo node.
*
* @param *block The block the node belong to.
+ * @param *mem memory dependency
* @param arity The number of data inputs to the node.
* @param *in The array of length arity of data inputs.
* @param *inputs The array of length arity of input constraints.
* @param *clobber The array of length n_clobber of clobbered registers.
* @param *asm_text The assembler text.
*/
-FIRM_API ir_node *new_r_ASM(ir_node *block,
+FIRM_API ir_node *new_r_ASM(ir_node *block, ir_node *mem,
int arity, ir_node *in[], ir_asm_constraint *inputs,
size_t n_outs, ir_asm_constraint *outputs,
size_t n_clobber, ident *clobber[],
/** Constructor for an ASM pseudo node.
*
* @param *db A pointer for debug information.
+ * @param *mem memory dependency
* @param arity The number of data inputs to the node.
* @param *in The array of length arity of data inputs.
* @param *inputs The array of length arity of input constraints.
* @param *asm_text The assembler text.
* @ingroup ASM
*/
-FIRM_API ir_node *new_d_ASM(dbg_info *db, int arity, ir_node *in[],
- ir_asm_constraint *inputs,
+FIRM_API ir_node *new_d_ASM(dbg_info *db, ir_node *mem, int arity,
+ ir_node *in[], ir_asm_constraint *inputs,
size_t n_outs, ir_asm_constraint *outputs,
size_t n_clobber, ident *clobber[],
ident *asm_text);
/** Constructor for an ASM pseudo node.
*
+ * @param *mem memory dependency
* @param arity The number of data inputs to the node.
* @param *in The array of length arity of data inputs.
* @param *inputs The array of length arity of input constraints.
* @param *asm_text The assembler text.
* @ingroup ASM
*/
-FIRM_API ir_node *new_ASM(int arity, ir_node *in[], ir_asm_constraint *inputs,
- size_t n_outs, ir_asm_constraint *outputs,
+FIRM_API ir_node *new_ASM(ir_node *mem, int arity, ir_node *in[],
+ ir_asm_constraint *inputs, size_t n_outs,
+ ir_asm_constraint *outputs,
size_t n_clobber, ident *clobber[], ident *asm_text);
/** @} */
* @{
*/
-/** Global variable holding the current ir graph.
- *
- * This global variable is used by the ir construction
- * interface in ircons and by the optimizations.
- * Further it is set by all walker functions.
+/**
+ * Global variable holding the graph which is currently constructed.
*/
FIRM_API ir_graph *current_ir_graph;
+/**
+ * Returns graph which is currently constructed
+ */
FIRM_API ir_graph *get_current_ir_graph(void);
+
+/**
+ * Sets graph which is currently constructed
+ */
FIRM_API void set_current_ir_graph(ir_graph *graph);
/** Create an immature Block.
* can be added with add_immBlock_pred(). Once all predecessors are
* added the block must be matured.
*
- * Adds the block to the graph in current_ir_graph. Can be used with automatic
- * Phi node construction.
+ * Adds the block to the graph in current_ir_graph.
* This constructor can only be used if the graph is in state_building.
*/
FIRM_API ir_node *new_d_immBlock(dbg_info *db);
+/** Create an immature Block.
+ *
+ * An immature Block has an unknown number of predecessors. Predecessors
+ * can be added with add_immBlock_pred(). Once all predecessors are
+ * added the block must be matured.
+ *
+ * Adds the block to the graph in current_ir_graph.
+ * This constructor can only be used if the graph is in state_building.
+ */
FIRM_API ir_node *new_immBlock(void);
+/** Create an immature Block.
+ *
+ * An immature Block has an unknown number of predecessors. Predecessors
+ * can be added with add_immBlock_pred(). Once all predecessors are
+ * added the block must be matured.
+ *
+ * This constructor can only be used if the graph is in state_building.
+ */
FIRM_API ir_node *new_r_immBlock(ir_graph *irg);
+/** Create an immature Block.
+ *
+ * An immature Block has an unknown number of predecessors. Predecessors
+ * can be added with add_immBlock_pred(). Once all predecessors are
+ * added the block must be matured.
+ *
+ * This constructor can only be used if the graph is in state_building.
+ */
FIRM_API ir_node *new_rd_immBlock(dbg_info *db, ir_graph *irg);
/** Add a control flow edge to an immature block. */
/** Finalize a Block node, when all control flows are known. */
FIRM_API void mature_immBlock(ir_node *block);
-/** Sets the current block in which the following constructors place the
- * nodes they construct.
+/**
+ * Sets the current block in which the following constructors place the
+ * nodes they construct.
*
- * @param target The new current block.
+ * @param target The new current block.
*/
FIRM_API void set_cur_block(ir_node *target);
+/**
+ * Sets current block of a given graph.
+ * @see set_cur_block()
+ */
FIRM_API void set_r_cur_block(ir_graph *irg, ir_node *target);
/** Returns the current block of the current graph. */
FIRM_API ir_node *get_cur_block(void);
+/** Returns current block of a given graph */
FIRM_API ir_node *get_r_cur_block(ir_graph *irg);
-/** Get the current value of a local variable.
+/** Returns the current value of a local variable.
*
* Use this function to obtain the last definition of the local variable
- * associated with pos. Pos may not exceed the value passed as n_loc
+ * associated with pos. pos must be less than the value passed as n_loc
* to new_ir_graph. This call automatically inserts Phi nodes.
*
* @param pos The position/id of the local variable.
* @param *mode The mode of the value to get.
*/
FIRM_API ir_node *get_value(int pos, ir_mode *mode);
+/** Returns the current value of a local variable in given graph
+ * @see get_value() */
FIRM_API ir_node *get_r_value(ir_graph *irg, int pos, ir_mode *mode);
/**
* @param pos The position/id of the local variable.
*/
FIRM_API ir_mode *ir_guess_mode(int pos);
+/**
+ * Try to guess the mode of a local variable in a given graph.
+ */
FIRM_API ir_mode *ir_r_guess_mode(ir_graph *irg, int pos);
-/** Remark a new definition of a variable.
+/** Memorize a new definition of a variable.
*
* Use this function to remember a new definition of the value
- * associated with pos. Pos may not exceed the value passed as n_loc
+ * associated with pos. pos must be less than the value passed as n_loc
* to new_ir_graph. This call is needed to automatically inserts Phi
* nodes.
*
* @param *value The new value written to the local variable.
*/
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);
-FIRM_API int r_find_value(ir_graph *irg, ir_node *value);
-
-/** Get the current memory state.
+/** Returns the current memory state.
*
* Use this function to obtain the last definition of the memory
* state. This call automatically inserts Phi nodes for the memory
* state value.
*/
FIRM_API ir_node *get_store(void);
+/** Returns current memory state for a given graph
+ * @see get_store() */
FIRM_API ir_node *get_r_store(ir_graph *irg);
-/** Remark a new definition of the memory state.
+/** Memorize a new definition of the memory state.
*
* Use this function to remember a new definition of the memory state.
* This call is needed to automatically inserts Phi nodes.
* @param *store The new memory state.
*/
FIRM_API void set_store(ir_node *store);
+/** Sets current memory state for a given graph
+ * @see set_store() */
FIRM_API void set_r_store(ir_graph *irg, ir_node *store);
/** keep this node alive even if End is not control-reachable from it
*/
FIRM_API void keep_alive(ir_node *ka);
-/* --- initialize and finalize IR construction --- */
-
/** Puts the graph into state "phase_high" */
FIRM_API void irg_finalize_cons(ir_graph *irg);
* e.g., that no more subtypes will be added. */
FIRM_API void irp_finalize_cons(void);
+/**
+ * Register a new callback for the case that the value of an uninitialized
+ * variable is requested.
+ */
FIRM_API void ir_set_uninitialized_local_variable_func(
uninitialized_local_variable_func_t *func);