X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeinfo.c;h=c1a04fa23b4fbec2f266281b40b58f24f842f036;hb=0318dc1a48ce72b311592c28affc31fabc95f026;hp=4ae071e45ec377232fcbce5baa48087dfdf48396;hpb=52abe23f2fa0d4bd16ec0f2d707f99b201dc9fc2;p=libfirm diff --git a/ir/be/beinfo.c b/ir/be/beinfo.c index 4ae071e45..c1a04fa23 100644 --- a/ir/be/beinfo.c +++ b/ir/be/beinfo.c @@ -41,7 +41,6 @@ void be_info_new_node(ir_node *node) { struct obstack *obst; backend_info_t *info; - unsigned opcode; /* Projs need no be info, their tuple holds all information */ if (is_Proj(node)) @@ -53,32 +52,34 @@ void be_info_new_node(ir_node *node) assert(node->backend_info == NULL); node->backend_info = info; - /* Hack! We still have middle end nodes in the backend (which was probably - a bad decision back then), which have no register constraints. - Set some none_requirements here. + /* + * Set backend info for some middleend nodes which still appear in + * backend graphs */ - opcode = get_irn_opcode(node); - if (opcode <= iro_Last) { - ir_mode *mode = get_irn_mode(node); - if (mode != mode_T) { - info->out_infos = NEW_ARR_D(reg_out_info_t, obst, 1); - memset(info->out_infos, 0, 1 * sizeof(info->out_infos[0])); - info->out_infos[0].req = arch_no_register_req; - } - - switch (opcode) { - case iro_Anchor: - case iro_Bad: - case iro_Block: - case iro_Dummy: - case iro_End: - case iro_NoMem: - case iro_Pin: - case iro_Sync: - case iro_Unknown: - info->flags |= arch_irn_flags_not_scheduled; - break; - } + switch (get_irn_opcode(node)) { + case iro_Bad: + case iro_Block: + case iro_Dummy: + case iro_End: + case iro_NoMem: + case iro_Unknown: + info->flags |= arch_irn_flags_not_scheduled; + break; + case iro_Anchor: + case iro_Pin: + case iro_Sync: + info->flags |= arch_irn_flags_not_scheduled; + info->out_infos = NEW_ARR_D(reg_out_info_t, obst, 1); + memset(info->out_infos, 0, 1 * sizeof(info->out_infos[0])); + info->out_infos[0].req = arch_no_register_req; + break; + case iro_Phi: + info->out_infos = NEW_ARR_D(reg_out_info_t, obst, 1); + memset(info->out_infos, 0, 1 * sizeof(info->out_infos[0])); + info->out_infos[0].req = arch_no_register_req; + break; + default: + break; } }