Fixed optimization of Div/Mod/DivMod nodes
[libfirm] / ir / ir / ircons.h
index 1dd7151..8f4acec 100644 (file)
  *    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);
  *    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)
  *    ------------------------------
  *
@@ -1084,6 +1096,18 @@ ir_node *new_rd_End    (dbg_info *db, ir_graph *irg, ir_node *block);
  */
 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.
@@ -1824,6 +1848,17 @@ ir_node *new_r_End    (ir_graph *irg, ir_node *block);
  */
 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
@@ -1891,6 +1926,20 @@ ir_node *new_r_Const  (ir_graph *irg, ir_node *block,
 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.
@@ -2499,9 +2548,18 @@ ir_node *new_d_End    (dbg_info* db);
  *
  * @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.
@@ -3192,6 +3250,15 @@ ir_node *new_EndExcept(void);
  */
 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.