------- Comment #4 from jv244 at cam dot ac dot uk  2009-05-16 11:19 -------
(In reply to comment #3)
> Like so:
> 
> Index: trans-expr.c
> ===================================================================
> --- trans-expr.c        (revision 147583)
> +++ trans-expr.c        (working copy)
> @@ -4430,7 +4430,8 @@ gfc_trans_zero_assign (gfc_expr * expr)
> 
>    /* Convert arguments to the correct types.  */
>    if (!POINTER_TYPE_P (TREE_TYPE (dest)))
> -    dest = gfc_build_addr_expr (pvoid_type_node, dest);
> +    return build2 (MODIFY_EXPR, void_type_node,
> +                  dest, build_constructor (TREE_TYPE (dest), NULL));
>    else
>      dest = fold_convert (pvoid_type_node, dest);
>    len = fold_convert (size_type_node, len);

this seems to speedup this case by somewhat, but not quite as much as the
hand-coded version (even with the other unroll parameters).

However, another testcase I run automatically when building gcc is much faster
with a patched trunk than unpatched trunk from a week ago. I will try to see if
this is due to this patch alone.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40168

Reply via email to