X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fscalar_replace.c;h=1c30f9af41039258199b61aea829c339e6289a8f;hb=bb5c6d5ce2e35c4074900017f8c8e1a4935054d0;hp=fbe05fff89a0e8d8ec3085c1a5faef9e13f8cc85;hpb=671cd390b0a19c752f5e2421ca1ad2764a0ac413;p=libfirm diff --git a/ir/opt/scalar_replace.c b/ir/opt/scalar_replace.c index fbe05fff8..1c30f9af4 100644 --- a/ir/opt/scalar_replace.c +++ b/ir/opt/scalar_replace.c @@ -230,6 +230,13 @@ int is_address_taken(ir_node *sel) */ return 1; + case iro_Id: { + int res = is_address_taken(succ); + if (res) + return 1; + break; + } + case iro_Tuple: /* Non-optimized Tuple, happens in inlining */ for (input_nr = get_Tuple_n_preds(succ) - 1; input_nr >= 0; --input_nr) { @@ -399,8 +406,7 @@ static path_t *find_path(ir_node *sel, unsigned len) { if (! is_Sel(pred)) { /* we found the root */ - - res = xmalloc(sizeof(*res) + (len - 1) * sizeof(res->path)); + res = XMALLOCF(path_t, path, len); res->path_len = len; } else res = find_path(pred, len);