This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Restore vectorization for testcase in PR34011
- From: Michael Matz <matz at suse dot de>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 16 Sep 2009 19:18:13 +0200 (CEST)
- Subject: Re: [PATCH] Restore vectorization for testcase in PR34011
- References: <alpine.LNX.2.00.0909161046570.4520@zhemvz.fhfr.qr>
Hi,
On Wed, 16 Sep 2009, Richard Guenther wrote:
> --- 616,633 ----
>
> /* Return true if VAR may be aliased. A variable is considered as
> maybe aliased if it has its address taken by the local TU
> ! or possibly by another TU and might be modified through a pointer. */
>
> static inline bool
> may_be_aliased (const_tree var)
> {
> ! return (TREE_CODE (var) != CONST_DECL
> ! && !((TREE_STATIC (var) || TREE_PUBLIC (var) || DECL_EXTERNAL (var))
> ! && TREE_READONLY (var)
> ! && !TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (var)))
> ! && (TREE_PUBLIC (var)
> ! || DECL_EXTERNAL (var)
> ! || TREE_ADDRESSABLE (var)));
Now my head hurts. Please split into something grokable like
if (TREE_CODE (var) == CONST_DECL)
return false;
if (TREE_READONLY (var)
&& !TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (var)))
return false;
return TREE_PUBLIC (var) || DECL_EXTERNAL (var) || .... ;
(I know the above actually isn't equivalent to your condition, one more
reason to split it :) )
Ciao,
Michael.