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][RFC] Conservative alignment extraction & propagation (2nd try)


> Index: trunk/gcc/tree-flow.h
> ===================================================================
> *** trunk.orig/gcc/tree-flow.h	2010-08-05 15:47:11.000000000 +0200
> --- trunk/gcc/tree-flow.h	2010-08-06 14:10:28.000000000 +0200
> *************** struct GTY(()) ptr_info_def
> *** 119,124 ****
> --- 119,129 ----
>   {
>     /* The points-to solution.  */
>     struct pt_solution pt;
> +
> +   /* Alignment and misalignment of the pointer in bytes.
> +      ptr & (align-1) == misalign.  */
> +   unsigned int align;
> +   unsigned int misalign;
>   };

Can you expand on the definition of ALIGN and MISALIGN in the comment?  They 
are apparently not uniquely determined and get_pointer_alignment will still 
return the same answer:

!       align = pi->align;
!       if (pi->misalign)
!       align = MIN (align, (pi->misalign & -pi->misalign));

Is the above MIN really necessary?  Why not

  if (pi->misalign)
    align = pi->misalign & -pi->misalign;
  else
    align = pi->align;

instead?

-- 
Eric Botcazou


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