* constructors and at the paragraph COPING WITH DATA OBJECTS at the
* end of this documentation.
*
- * The comfortable interface contains the following routines further explained
+ * The comfortable interface contains the following routines further explained
* below:
*
* ir_node *new_immBlock (void);
* ir_node *new_Start (void);
* ir_node *new_End (void);
* ir_node *new_Jmp (void);
+ * ir_node *new_IJmp (ir_node *tgt);
* ir_node *new_Cond (ir_node *c);
* ir_node *new_Return (ir_node *store, int arity, ir_node **in);
* ir_node *new_Raise (ir_node *store, ir_node *obj);
* ir_node *new_Alloc (ir_node *store, ir_node *size, type *alloc_type,
* where_alloc where);
* ir_node *new_Free (ir_node *store, ir_node *ptr, ir_node *size,
- * type *free_type);
+ * type *free_type, where_alloc where);
* ir_node *new_Proj (ir_node *arg, ir_mode *mode, long proj);
* ir_node *new_NoMem (void);
* ir_node *new_Mux (ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
* Output:
* Control flow to the next block.
*
+ * ir_node *new_IJmp (ir_node *tgt)
+ * -----------------------
+ *
+ * Creates an IJmp node.
+ *
+ * Inputs:
+ * The node that represents the target jump address
+ * Output:
+ * Control flow to an unknown target, must be pinned by
+ * the End node.
+ *
* ir_node *new_Cond (ir_node *c)
* ------------------------------
*
* ir_node *new_Minus (ir_node *op, ir_mode *mode)
* -----------------------------------------------
*
- * Unary Minus operations on floating point values.
+ * Unary Minus operations on integer and floating point values.
*
* ir_node *new_Mul (ir_node *op1, ir_node *op2, ir_mode *mode)
* ------------------------------------------------------------
* Output:
* A 16-tuple containing the results of the 16 different comparisons.
* The following is a list giving the comparisons and a projection
- * number (pnc_number) to use in Proj nodes to extract the proper result.
- * False false
- * Eq equal
- * Lt less
- * Le less or equal
- * Gt greater
- * Ge greater of equal
- * Lg less or greater
- * Leg less, equal or greater = ordered
- * Uo unordered
- * Ue unordered or equal
- * Ul unordered or less
- * Ule unordered, less or equal
- * Ug unordered or greater
- * Uge unordered, greater or equal
- * Ne unordered, less or greater = not equal
- * True true
+ * number (pn_Cmp) to use in Proj nodes to extract the proper result.
+ * pn_Cmp_False false
+ * pn_Cmp_Eq equal
+ * pn_Cmp_Lt less
+ * pn_Cmp_Le less or equal
+ * pn_Cmp_Gt greater
+ * pn_Cmp_Ge greater of equal
+ * pn_Cmp_Lg less or greater
+ * pn_Cmp_Leg less, equal or greater = ordered
+ * pn_Cmp_Uo unordered
+ * pn_Cmp_Ue unordered or equal
+ * pn_Cmp_Ul unordered or less
+ * pn_Cmp_Ule unordered, less or equal
+ * pn_Cmp_Ug unordered or greater
+ * pn_Cmp_Uge unordered, greater or equal
+ * pn_Cmp_Ne unordered, less or greater = not equal
+ * pn_Cmp_True true
*
*
*
* a.*type A pointer to the class the allocated data object
* belongs to.
*
- * ir_node *new_Free (ir_node *store, ir_node *ptr, type *free_type)
- * ------------------------------------------------------------------
+ * ir_node *new_Free (ir_node *store, ir_node *ptr, ir_node *size, type *free_type,
+ * --------------------------------------------------------------------------------
+ * where_alloc where)
+ * ------------------
*
* The Free node frees memory of the given variable.
*
* *ptr The pointer to the object to free.
* *size The number of objects of type free_type to free in a sequence.
* *free_type The type of the freed variable.
+ * where Where the variable was allocated, either heap_alloc or stack_alloc.
*
* Inputs:
* A memory, a pointer and an unsigned integer.
*/
ir_node *new_rd_Jmp (dbg_info *db, ir_graph *irg, ir_node *block);
+/** Constructor for an IJmp node.
+ *
+ * IJmp represents control flow to a single control successor not
+ * statically known i.e. an indirect Jmp.
+ *
+ * @param *db A pointer for debug information.
+ * @param *irg The ir graph the node belongs to.
+ * @param *block The ir block the node belongs to.
+ * @param *tgt The ir node representing the target address.
+ */
+ir_node *new_rd_IJmp (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *tgt);
+
/** Constructor for a Break node.
*
* Break represents control flow to a single control successor just as Jmp.
* @param *db A pointer for debug information.
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_rd_Add (dbg_info *db, ir_graph *irg, ir_node *block,
* @param *db A pointer for debug information.
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_rd_Sub (dbg_info *db, ir_graph *irg, ir_node *block,
* @param *db A pointer for debug information.
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_rd_Mul (dbg_info *db, ir_graph *irg, ir_node *block,
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_rd_Quot (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *memop, ir_node *op1, ir_node *op2);
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_rd_DivMod (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *memop, ir_node *op1, ir_node *op2);
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_rd_Div (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *memop, ir_node *op1, ir_node *op2);
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_rd_Mod (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *memop, ir_node *op1, ir_node *op2);
* @param *db A pointer for debug information.
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_rd_And (dbg_info *db, ir_graph *irg, ir_node *block,
* @param *db A pointer for debug information.
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_rd_Or (dbg_info *db, ir_graph *irg, ir_node *block,
* @param *db A pointer for debug information.
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the results.
*/
ir_node *new_rd_Eor (dbg_info *db, ir_graph *irg, ir_node *block,
* @param *db A pointer for debug information.
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_rd_Cmp (dbg_info *db, ir_graph *irg, ir_node *block,
ir_node *op1, ir_node *op2);
* @param *ptr The pointer to the object to free.
* @param *size The number of objects of type free_type to free in a sequence.
* @param *free_type The type of the freed variable.
+ * @param where Where the variable was allocated, either heap_alloc or stack_alloc.
*/
ir_node *new_rd_Free (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
- ir_node *ptr, ir_node *size, type *free_type);
+ ir_node *ptr, ir_node *size, type *free_type, where_alloc where);
/** Constructor for a Sync node.
*
*/
ir_node *new_r_Jmp (ir_graph *irg, ir_node *block);
+/** Constructor for an IJmp node.
+ *
+ * IJmp represents control flow to a single control successor not
+ * statically known i.e. an indirect Jmp.
+ *
+ * @param *irg The ir graph the node belongs to.
+ * @param *block The ir block the node belongs to.
+ * @param *tgt The ir node representing the target address.
+ */
+ir_node *new_r_IJmp (ir_graph *irg, ir_node *block, ir_node *tgt);
+
/** Constructor for a Cond node.
*
* If c is mode_b represents a conditional branch (if/else). If c is
ir_node *new_r_Const (ir_graph *irg, ir_node *block,
ir_mode *mode, tarval *con);
+/** Constructor for a Const node.
+ *
+ * Constructor for a Const node. The constant represents a target
+ * value. Sets the type information to type_unknown. (No more
+ * supported: If tv is entity derives a somehow useful type.)
+ *
+ * @param *irg The ir graph the node belongs to.
+ * @param *block The ir block the node belongs to.
+ * @param *mode The mode of the operands and the results.
+ * @param value A value from which the tarval is made.
+ */
+ir_node *new_r_Const_long(ir_graph *irg, ir_node *block,
+ ir_mode *mode, long value);
+
+/** Constructor for a Const_type node.
+ *
+ * The constant represents a target value. This constructor sets high
+ * level type information for the constant value.
+ *
+ * @param *irg The ir graph the node belongs to.
+ * @param *block The ir block the node belongs to.
+ * @param *mode The mode of the operands and results.
+ * @param *con Points to an entry in the constant table.
+ * @param *tp The type of the constant.
+ */
+ir_node *new_r_Const_type(ir_graph *irg, ir_node *block,
+ ir_mode *mode, tarval *con, type *tp);
+
/** Constructor for a SymConst node.
*
* This is the constructor for a symbolic constant.
*
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param * store The actual store.
+ * @param *store The actual store.
* @param *callee A pointer to the called procedure.
* @param arity The number of procedure parameters.
* @param *in[] An array with the pointers to the parameters. The constructor copies this array.
*
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_r_Add (ir_graph *irg, ir_node *block,
*
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the results.
*/
ir_node *new_r_Sub (ir_graph *irg, ir_node *block,
*
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_r_Mul (ir_graph *irg, ir_node *block,
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_r_Quot (ir_graph *irg, ir_node *block,
ir_node *memop, ir_node *op1, ir_node *op2);
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_r_DivMod (ir_graph *irg, ir_node *block,
ir_node *memop, ir_node *op1, ir_node *op2);
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_r_Div (ir_graph *irg, ir_node *block,
ir_node *memop, ir_node *op1, ir_node *op2);
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_r_Mod (ir_graph *irg, ir_node *block,
ir_node *memop, ir_node *op1, ir_node *op2);
*
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_r_And (ir_graph *irg, ir_node *block,
*
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_r_Or (ir_graph *irg, ir_node *block,
*
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the results.
*/
ir_node *new_r_Eor (ir_graph *irg, ir_node *block,
*
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_r_Cmp (ir_graph *irg, ir_node *block,
ir_node *op1, ir_node *op2);
* @param *ptr The pointer to the object to free.
* @param *size The number of objects of type free_type to free in a sequence.
* @param *free_type The type of the freed variable.
+ * @param where Where the variable was allocated, either heap_alloc or stack_alloc.
*/
ir_node *new_r_Free (ir_graph *irg, ir_node *block, ir_node *store,
- ir_node *ptr, ir_node *size, type *free_type);
+ ir_node *ptr, ir_node *size, type *free_type, where_alloc where);
/** Constructor for a Sync node.
*
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
* @param arg A node producing a tuple.
- * @param max_ proj The end position of the value in the tuple.
+ * @param max_proj The end position of the value in the tuple.
*/
ir_node *new_r_defaultProj (ir_graph *irg, ir_node *block, ir_node *arg, long max_proj);
*
* @param *irg The ir graph the node belong to.
* @param *block The ir block the node belong to.
- * @param *db A pointer for debug information.
* @param *val The value we express a constraint for
* @param *bound The value to compare against. Must be a firm node, typically a constant.
* @param cmp The compare operation.
*
* @param *db A pointer for debug information.
*/
-
ir_node *new_d_Jmp (dbg_info* db);
+/** Constructor for an IJmp node.
+ *
+ * IJmp represents control flow to a single control successor not
+ * statically known i.e. an indirect Jmp.
+ *
+ * @param *db A pointer for debug information.
+ * @param *tgt The ir node representing the target address.
+ */
+ir_node *new_d_IJmp (dbg_info *db, ir_node *tgt);
+
/** Constructor for a Cond node.
*
* Adds the node to the block in current_ir_block.
*
* @param *db A pointer for debug information.
* @param value A type, entity or ident depending on the SymConst kind.
- * @param symkind The kind of the symbolic constant: symconst_type_tag, symconst_size
+ * @param kind The kind of the symbolic constant: symconst_type_tag, symconst_size
* or symconst_addr_name.
* @param tp The source type of the constant.
- *
*/
ir_node *new_d_SymConst_type (dbg_info* db, union symconst_symbol value, symconst_kind kind, type* tp);
* from is allocated.
* @param *objptr A pointer to a compound entity the Sel operation selects a
* single attribute from.
- * @param *n_index The number of array indices needed to select an array element entity.
- * @param *index[] If the compound entity is an array the indices of the selected
+ * @param arity The number of array indices needed to select an array element entity.
+ * @param *in[] If the compound entity is an array the indices of the selected
* element entity. The constructor copies this array.
* @param *ent The entity to select.
*/
* Adds the node to the block in current_ir_block.
*
* @param *db A pointer for debug information.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_d_Add (dbg_info* db, ir_node *op1, ir_node *op2, ir_mode *mode);
* Adds the node to the block in current_ir_block.
*
* @param *db A pointer for debug information.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
* Adds the node to the block in current_ir_block.
*
* @param *db A pointer for debug information.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_d_Mul (dbg_info* db, ir_node *op1, ir_node *op2, ir_mode *mode);
*
* @param *db A pointer for debug information.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_d_Quot (dbg_info* db, ir_node *memop, ir_node *op1, ir_node *op2);
*
* @param *db A pointer for debug information.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_d_DivMod (dbg_info* db, ir_node *memop, ir_node *op1, ir_node *op2);
*
* @param *db A pointer for debug information.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_d_Div (dbg_info* db, ir_node *memop, ir_node *op1, ir_node *op2);
*
* @param *db A pointer for debug information.
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_d_Mod (dbg_info* db, ir_node *memop, ir_node *op1, ir_node *op2);
* Adds the node to the block in current_ir_block.
*
* @param *db A pointer for debug information.
- * @param *irg The ir graph the node belongs to.
- * @param *block The ir block the node belongs to.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_d_And (dbg_info* db, ir_node *op1, ir_node *op2, ir_mode *mode);
* Adds the node to the block in current_ir_block.
*
* @param *db A pointer for debug information.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_d_Or (dbg_info* db, ir_node *op1, ir_node *op2, ir_mode *mode);
* Adds the node to the block in current_ir_block.
*
* @param *db A pointer for debug information.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the results.
*/
ir_node *new_d_Eor (dbg_info* db, ir_node *op1, ir_node *op2, ir_mode *mode);
* Adds the node to the block in current_ir_block.
*
* @param *db A pointer for debug information.
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_d_Cmp (dbg_info* db, ir_node *op1, ir_node *op2);
*
* @param *db A pointer for debug information.
* @param *store The current memory
- * @param *adr A pointer to the variable to be read in this memory.
+ * @param *addr A pointer to the variable to be read in this memory.
* @param *mode The mode of the value to be loaded.
*/
ir_node *new_d_Load (dbg_info* db, ir_node *store, ir_node *addr, ir_mode *mode);
*
* @param *db A pointer for debug information.
* @param *store The current memory
- * @param *adr A pointer to the variable to be read in this memory.
+ * @param *addr A pointer to the variable to be read in this memory.
* @param *val The value to write to this variable.
*/
ir_node *new_d_Store (dbg_info* db, ir_node *store, ir_node *addr, ir_node *val);
* @param *ptr The pointer to the object to free.
* @param *size The number of objects of type free_type to free in a sequence.
* @param *free_type The type of the freed variable.
+ * @param where Where the variable was allocated, either heap_alloc or stack_alloc.
*/
ir_node *new_d_Free (dbg_info* db, ir_node *store, ir_node *ptr, ir_node *size,
- type *free_type);
+ type *free_type, where_alloc where);
/** Constructor for a Sync node.
*
*
* @param *db A pointer for debug information.
* @param arg A node producing a tuple.
- * @param max_ proj The end position of the value in the tuple.
+ * @param max_proj The end position of the value in the tuple.
*/
ir_node *new_d_defaultProj (dbg_info* db, ir_node *arg, long max_proj);
*/
ir_node *new_Jmp (void);
+/** Constructor for an IJmp node.
+ *
+ * IJmp represents control flow to a single control successor not
+ * statically known i.e. an indirect Jmp.
+ *
+ * @param *tgt The ir node representing the target address.
+ */
+ir_node *new_IJmp (ir_node *tgt);
+
/** Constructor for a Break node.
* Break represents control flow to a single control successor just as Jmp.
* The blocks separated by a break may not be concatenated by an optimization.
*/
ir_node *new_Const (ir_mode *mode, tarval *con);
+/**
+ * Make a const from a long.
+ * This is just convenience for the usual
+ * <code>
+ * new_Const(mode, tarval_from_long(mode, ...))
+ * </code>
+ * pain.
+ * @param mode The mode for the const.
+ * @param value The value of the constant.
+ * @return A new const node.
+ */
+ir_node *new_Const_long(ir_mode *mode, long value);
+
/** Constructor for a Const node.
*
* Derives mode from passed type. */
/** Constructor for a SymConst node.
*
* Adds the node to the block in current_ir_block.
- * This is the constructor for a symbolic constant.
- * There are four kinds of symbolic constants:
- * - type_tag The symbolic constant represents a type tag. The type the
- * tag stands for is given explicitly.
- * - size The symbolic constant represents the size of a type. The
- * type of which the constant represents the size is given
- * explicitly.
- * - addr_name The symbolic constant represents the address of an entity
- * (variable or method). The variable is indicated by a name
- * that is valid for linking.
- * - addr_ent The symbolic constant represents the address of an entity
- * (variable or method). The variable is given explicitly by
- * a firm entity.
+ * This is the constructor for a symbolic constant.
+ * There are four kinds of symbolic constants:
+ * -# type_tag The symbolic constant represents a type tag. The type the
+ * tag stands for is given explicitly.
+ * -# size The symbolic constant represents the size of a type. The
+ * type of which the constant represents the size is given
+ * explicitly.
+ * -# addr_name The symbolic constant represents the address of an entity
+ * (variable or method). The variable is indicated by a name
+ * that is valid for linking.
+ * -# addr_ent The symbolic constant represents the address of an entity
+ * (variable or method). The variable is given explicitly by
+ * a firm entity.
*
* Inputs to the node:
* No inputs except the block it belongs to.
* An unsigned integer (I_u) or a pointer (P).
*
* @param value A type or a ident depending on the SymConst kind.
- * @param symkind The kind of the symbolic constant: symconst_type_tag, symconst_size or symconst_addr_name.
+ * @param kind The kind of the symbolic constant: symconst_type_tag, symconst_size or symconst_addr_name.
*/
ir_node *new_SymConst (union symconst_symbol value, symconst_kind kind);
* from is allocated.
* @param *objptr A pointer to a compound entity the Sel operation selects a
* single attribute from.
- * @param *n_index The number of array indices needed to select an array element entity.
- * @param *index[] If the compound entity is an array the indices of the selected
+ * @param arity The number of array indices needed to select an array element entity.
+ * @param *in[] If the compound entity is an array the indices of the selected
* element entity. The constructor copies this array.
* @param *ent The entity to select.
*/
* Adds the node to the block in current_ir_block.
* For translating Java. Not supported as standard firm node.
*
- * @param *store
- * @param *objptr
+ * @param *store The actual store.
+ * @param *obj
* @param *ent
*/
ir_node *new_InstOf (ir_node *store, ir_node *obj, type *ent);
* constructor copies the method pointer input from the passed Call
* node.Adds the node to the block in current_ir_block.
*
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_Add (ir_node *op1, ir_node *op2, ir_mode *mode);
*
* Adds the node to the block in current_ir_block.
*
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_Sub (ir_node *op1, ir_node *op2, ir_mode *mode);
/**
* Constructor for a Mul node. Adds the node to the block in current_ir_block.
*
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_Mul (ir_node *op1, ir_node *op2, ir_mode *mode);
* Adds the node to the block in current_ir_block.
*
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_Quot (ir_node *memop, ir_node *op1, ir_node *op2);
* Adds the node to the block in current_ir_block.
*
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_DivMod (ir_node *memop, ir_node *op1, ir_node *op2);
* Adds the node to the block in current_ir_block.
*
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_Div (ir_node *memop, ir_node *op1, ir_node *op2);
* Adds the node to the block in current_ir_block.
*
* @param *memop The store needed to model exceptions
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_Mod (ir_node *memop, ir_node *op1, ir_node *op2);
*
* Adds the node to the block in current_ir_block.
*
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_And (ir_node *op1, ir_node *op2, ir_mode *mode);
/**
* Constructor for a Or node. Adds the node to the block in current_ir_block.
*
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
ir_node *new_Or (ir_node *op1, ir_node *op2, ir_mode *mode);
/**
* Constructor for a Eor node. Adds the node to the block in current_ir_block.
*
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
* @param *mode The mode of the operands and the results.
*/
ir_node *new_Eor (ir_node *op1, ir_node *op2, ir_mode *mode);
*
* Adds the node to the block in current_ir_block.
*
- * @param *op1 The operand 1.
- * @param *op2 The operand 2.
+ * @param *op1 The first operand.
+ * @param *op2 The second operand.
*/
ir_node *new_Cmp (ir_node *op1, ir_node *op2);
* @param *ptr The pointer to the object to free.
* @param *size The number of objects of type free_type to free in a sequence.
* @param *free_type The type of the freed variable.
+ * @param where Where the variable was allocated, either heap_alloc or stack_alloc.
*/
ir_node *new_Free (ir_node *store, ir_node *ptr, ir_node *size,
- type *free_type);
+ type *free_type, where_alloc where);
/** Constructor for a Sync node.
*
* Adds the node to the block in current_ir_block.
*
* @param arg A node producing a tuple.
- * @param max_ proj The end position of the value in the tuple.
+ * @param max_proj The end position of the value in the tuple.
*/
ir_node *new_defaultProj (ir_node *arg, long max_proj);
/** Add a control flow edge to an immature block. */
void add_immBlock_pred (ir_node *immblock, ir_node *jmp);
-/** Fix the number of predecessors of an immature block. */
+/** Finalize a Block node, when all control flows are known. */
void mature_immBlock (ir_node *block);
#define mature_cur_block() mature_immBlock(get_cur_block());
* @param pos The position/id of the local variable.
* @param *mode The mode of the value to get.
*/
-ir_node *get_d_value (dbg_info* db, int pos, ir_mode *mode);
+ir_node *get_d_value (dbg_info *db, int pos, ir_mode *mode);
ir_node *get_value (int pos, ir_mode *mode);
/** Remark a new definition of a variable.
/* --- initialize and finalize ir construction --- */
/** Puts the graph into state "phase_high" */
-void finalize_cons (ir_graph *irg);
+void irg_finalize_cons (ir_graph *irg);
+
+/** Puts the program and all graphs into state phase_high.
+ *
+ * This also remarks, the construction of types is finished,
+ * e.g., that no more subtypes will be added. */
+void irp_finalize_cons(void);
/* --- Initialization --- */
/**
* This function is called, whenever a local variable is used before definition
*
- * @parameter mode the mode of the local var
- * @pos position chosen be the frontend for this var
+ * @param irg the IR graph on which this happens
+ * @param mode the mode of the local var
+ * @param pos position chosen be the frontend for this variable (n_loc)
*
* @return a firm node of mode @p mode that initializes the var at position pos
*
* @note
- * Do not return NULL
- * If this function is not set, FIRM will create a const node with tarval BAD
+ * Do not return NULL!
+ * If this function is not set, FIRM will create a const node with tarval BAD.
+ * Use set_irg_loc_description()/get_irg_loc_description() to assign additional
+ * informations to local variables.
*/
-typedef ir_node *default_initialize_local_variable_func_t(ir_mode *mode, int pos);
-
+typedef ir_node *uninitialized_local_variable_func_t(ir_graph *irg, ir_mode *mode, int pos);
# endif /* _IRCONS_H_ */