[gomp] walk_tree and OMP_CLAUSE_*

Richard Henderson rth@redhat.com
Sat Nov 5 23:10:00 GMT 2005


On Sat, Nov 05, 2005 at 03:36:12PM -0500, Jakub Jelinek wrote:
>        if (len)
>  	{
> -	  /* The common case is that we may tail recurse here.  */
> -	  if (code != BIND_EXPR
> -	      && !TREE_CHAIN (*tp))
> -	    WALK_SUBTREE_TAIL (TREE_OPERAND (*tp, len - 1));
> +	  if (code >= OMP_CLAUSE_PRIVATE && code <= OMP_CLAUSE_DEFAULT)
> +	    {
> +	      WALK_SUBTREE (TREE_OPERAND (*tp, len - 1));
> +	      WALK_SUBTREE_TAIL (OMP_CLAUSE_CHAIN (*tp));
> +	    }
>  	  else
> -	    WALK_SUBTREE (TREE_OPERAND (*tp, len - 1));
> +	    WALK_SUBTREE_TAIL (TREE_OPERAND (*tp, len - 1));
>  	}
>  #endif
>      }

This one's wrong, afaics, since it doesn't run the chain
of the zero length clauses like nowait.


r~



More information about the Gcc-patches mailing list