local_optimize() now kills unrteachable code if dominance info is available.
[libfirm] / ir / ir / irnode.h
index a1cae7a..48d41bd 100644 (file)
@@ -189,6 +189,7 @@ op_pin_state is_irn_pinned_in_irg (const ir_node *node);
  *
  * @param db    Debug info.
  * @param irg   IR-graph on with this new node should be constructed.
+ * @param block The block the new node belongs to
  * @param op    The opcode of the new node.
  * @param mode  The mode of the new node.
  * @param arity The arity of the new node, may be <0 if yet.
@@ -332,6 +333,11 @@ void set_End_keepalive(ir_node *end, int pos, ir_node *ka);
    free_End() frees these data structures. */
 void free_End (ir_node *end);
 
+/** Return the target address of an IJmp */
+ir_node *get_IJmp_target(ir_node *ijmp);
+
+/** Sets the target address of an IJmp */
+void set_IJmp_target(ir_node *ijmp, ir_node *tgt);
 
 /* We distinguish three kinds of Cond nodes.  These can be distinguished
    by the mode of the selector operand and an internal flag of type cond_kind.
@@ -439,8 +445,9 @@ typedef enum {
                           Type_or_id_p is entity *. */
 } symconst_kind;
 
-/** SymConst attributes
-    This union contains the symbolic information represented by the node  */
+/** SymConst attribute.
+ *
+ *  This union contains the symbolic information represented by the node.  */
 union symconst_symbol {
   type   *type_p;
   ident  *ident_p;
@@ -645,7 +652,8 @@ void     set_Div_mem (ir_node *node, ir_node *mem);
 typedef enum {
   pn_Div_M,           /**< Memory result.    */
   pn_Div_X_except,    /**< Execution result if exception occurred. */
-  pn_Div_res          /**< Result of computation. */
+  pn_Div_res,         /**< Result of computation. */
+  pn_Div_max          /**< number of projections from a Div */
 } pn_Div;  /* Projection numbers for Div. */
 
 ir_node *get_Mod_left (ir_node *node);
@@ -980,13 +988,34 @@ ir_node *get_fragile_op_mem(ir_node *node);
 
 /** Returns true if the operation is a forking control flow
  *  operation: Cond. */
-int is_forking_op(const ir_node *node);
+int is_irn_forking(const ir_node *node);
 
 /** Return the type associated with the value produced by n
  *  if the node remarks this type as it is the case for
  *  Cast, Const, SymConst and some Proj nodes. */
 type *get_irn_type(ir_node *n);
 
+/** Returns non-zero for constant-like nodes. */
+int is_irn_constlike(const ir_node *node);
+
+/**
+ * A type to express conditional jump predictions.
+ */
+typedef enum {
+  COND_JMP_PRED_NONE,        /**< No jump prediction. Default. */
+  COND_JMP_PRED_TRUE,        /**< The True case is predicted. */
+  COND_JMP_PRED_FALSE        /**< The False case is predicted. */
+} cond_jmp_predicate;
+
+/** Gets the string representation of the jump prediction .*/
+const char *get_cond_jmp_predicate_name(cond_jmp_predicate pred);
+
+/** Returns the conditional jump prediction of a Cond node. */
+cond_jmp_predicate get_Cond_jmp_pred(ir_node *cond);
+
+/** Sets a new conditional jump prediction. */
+void set_Cond_jmp_pred(ir_node *cond, cond_jmp_predicate pred);
+
 /**
  * Access custom node data.
  * The data must have been registered with
@@ -1017,6 +1046,11 @@ type *get_irn_type(ir_node *n);
  */
 unsigned register_additional_node_data(unsigned size);
 
+/**
+ * Return a pointer to the node attributes.
+ * Needed for user-defined nodes.
+ */
+void *get_irn_generic_attr(ir_node *node);
 
 /*-----------------------------------------------------------------*/
 /** Debug aides                                                   **/