X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fcombo.c;h=e0decd52066a4749e181c57da4746d9ebebd2e96;hb=ee28420630f7e30201de21f35ba03a48e250310c;hp=a2f8ee934e379f86cd8d012d651edeb9cfefd9a6;hpb=7ff74f4ddc0ba59d4384b289b28711f02e2a73d0;p=libfirm diff --git a/ir/opt/combo.c b/ir/opt/combo.c index a2f8ee934..e0decd520 100644 --- a/ir/opt/combo.c +++ b/ir/opt/combo.c @@ -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; }