Problems with a patch to improve dependence analysis

Zdenek Dvorak rakdver@kam.mff.cuni.cz
Sun Jul 15 21:03:00 GMT 2007


Hello,


> This worked for the most part (non-bootstrap, make check), but there are
> errors during bootstrap:
> 
> -----------------------------------------------------------------------
>  _r4.c: In function 'matmul_r4':
>  /home/jsjodin/Work/Project/GCC/Latest/trunk/libgfortran/generated/matm
>  ul
>  _r4.c:87: error: expected an SSA_NAME object
> /home/jsjodin/Work/Project/GCC/Latest/trunk/libgfortran/generated/matm
>  ul
>  _r4.c:87: error: in statement
>  # VUSE <SMT.37> { SMT.37 }
>  D.5431_402 = retarray_45(D)->data;
> ----------------------------------------------------------------------

the problem is that you have virtual operands outside of ssa form
(SMT.37) here.  You do not give enough information to tell why this
happens; my guess is that

> Index: trunk/gcc/tree-data-ref.c
> ===================================================================
> --- trunk/gcc/tree-data-ref.c	(revision 126419)
> +++ trunk/gcc/tree-data-ref.c	(working copy)
> @@ -566,6 +566,25 @@ split_constant_offset (tree exp, tree *v
>  	return;
>        }
>  
> +    case SSA_NAME:
> +      {
> +         tree def_stmt = SSA_NAME_DEF_STMT (exp);
> +	    if (TREE_CODE (def_stmt) == GIMPLE_MODIFY_STMT)
> +           {
> +             tree def_stmt_rhs = GIMPLE_STMT_OPERAND (def_stmt, 1);
> +             if (!TREE_SIDE_EFFECTS (def_stmt_rhs) 
> +                 && EXPR_P (def_stmt_rhs))

this condition is not restrictive enough; try using

(EXPR_P (def_stmt_rhs) && !REFERENCE_CLASS_P (def_stmt_rhs))

Zdenek



More information about the Gcc-patches mailing list