This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Restore vectorization for testcase in PR34011


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]