RFA: matmul/transpose optimisation

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Dec 13 00:34:00 GMT 2005


On Tue, Dec 06, 2005 at 06:18:37PM +0000, Richard Sandiford wrote:
> 
> The optimisation itself is implemented as part of the resolve pass.
> This was Paul Brooks's suggestion (thanks), and means that we can
> take advantage of the existing expression-walking code.

Paul, do you have comments before I OK this patch?

> + 
> + gfc_expr *
> + gfc_get_noncopying_intrinsic_argument (gfc_expr * expr)
> + {
> +   if (expr->expr_type != EXPR_FUNCTION || !expr->value.function.isym)
> +     return 0;

return NULL;

> + 
> +   switch (expr->value.function.isym->generic_id)
> +     {
> +     case GFC_ISYM_TRANSPOSE:
> +       return expr->value.function.actual->expr;
> + 
> +     default:
> +       return 0;

return NULL;

Richard,

I've bootstrapped and regression tested your patch on amd64-*-freebsd.
Everything tested ok.  My only question is with -fbounds-check option.
Did you check the there are no strange side-effect?  I don't have
any codes that use matmul, so I could not easily check this.

Once we hear from Paul Brook, I think the patch is ok.

-- 
Steve



More information about the Gcc-patches mailing list