* 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);
* 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.
* @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_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 SymConst node.
*
* This is the constructor for a symbolic constant.
* @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 *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.
*
*/
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. */
* @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.
*
/* --- 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 --- */