- say debug message BEFORE the irg is killed
[libfirm] / ir / opt / combo.c
index a2f8ee9..e0decd5 100644 (file)
@@ -112,6 +112,7 @@ struct opcode_key_t {
                long      proj;   /**< For Proj nodes, its proj number */
                ir_entity *ent;   /**< For Sel Nodes, its entity */
                int       intVal; /**< For Conv/Div Nodes: strict/remainderless */
+               unsigned  uintVal;/**< for Builtin: the kind */
                ir_node   *block; /**< for Block: itself */
                void      *ptr;   /**< generic pointer for hash/cmp */
        } u;
@@ -295,6 +296,9 @@ static void check_opcode(const partition_t *Z) {
                        case iro_Load:
                                key.mode = get_Load_mode(irn);
                                break;
+                       case iro_Builtin:
+                               key.u.intVal = get_Builtin_kind(irn);
+                               break;
                        default:
                                break;
                        }
@@ -323,6 +327,9 @@ static void check_opcode(const partition_t *Z) {
                        case iro_Load:
                                assert(key.mode == get_Load_mode(irn));
                                break;
+                       case iro_Builtin:
+                               assert(key.u.intVal == get_Builtin_kind(irn));
+                               break;
                        default:
                                break;
                        }
@@ -578,7 +585,7 @@ static int cmp_opcode(const void *elt, const void *key, size_t size) {
        return o1->code != o2->code || o1->mode != o2->mode ||
               o1->arity != o2->arity ||
               o1->u.proj != o2->u.proj ||
-              o1->u.intVal != o2->u.intVal ||
+              o1->u.intVal != o2->u.intVal || /* this already checks uIntVal */
               o1->u.ptr != o2->u.ptr;
 }  /* cmp_opcode */
 
@@ -1680,6 +1687,9 @@ static void *lambda_opcode(const node_t *node, environment_t *env) {
        case iro_Load:
                key.mode = get_Load_mode(irn);
                break;
+       case iro_Builtin:
+               key.u.intVal = get_Builtin_kind(irn);
+               break;
        default:
                break;
        }