Don't check nunber of Proj's for dead blocks
[libfirm] / ir / ir / irnode.c
index bb4ac80..7828fca 100644 (file)
@@ -547,6 +547,11 @@ get_irn_except_attr (ir_node *node)
   return node->attr.except;
 }
 
+void *
+get_irn_generic_attr (ir_node *node) {
+  return &node->attr;
+}
+
 /** manipulate fields of individual nodes **/
 
 /* this works for all except Block */
@@ -2246,15 +2251,40 @@ ir_node *get_fragile_op_mem(ir_node *node) {
 }
 
 /* Returns true if the operation is a forking control flow operation. */
-int
-is_forking_op(const ir_node *node) {
-  return is_op_forking(get_irn_op(node));
+int (is_irn_forking)(const ir_node *node) {
+  return _is_irn_forking(node);
 }
 
 type *(get_irn_type)(ir_node *node) {
   return _get_irn_type(node);
 }
 
+/* Returns non-zero for constant-like nodes. */
+int (is_irn_constlike)(const ir_node *node) {
+  return _is_irn_constlike(node);
+}
+
+/* Gets the string representation of the jump prediction .*/
+const char *get_cond_jmp_predicate_name(cond_jmp_predicate pred)
+{
+  switch (pred) {
+  default:
+  case COND_JMP_PRED_NONE:  return "no prediction";
+  case COND_JMP_PRED_TRUE:  return "true taken";
+  case COND_JMP_PRED_FALSE: return "false taken";
+  }
+}
+
+/* Returns the conditional jump prediction of a Cond node. */
+cond_jmp_predicate (get_Cond_jmp_pred)(ir_node *cond) {
+  return _get_Cond_jmp_pred(cond);
+}
+
+/* Sets a new conditional jump prediction. */
+void (set_Cond_jmp_pred)(ir_node *cond, cond_jmp_predicate pred) {
+  _set_Cond_jmp_pred(cond, pred);
+}
+
 /** the get_type operation must be always implemented */
 static type *get_Null_type(ir_node *n) {
   return NULL;