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: [cxx-mem-model] use alignment when available to determine lock-free ness


On 11/02/2011 07:59 AM, Andrew MacLeod wrote:
> +       /* Parameters at this point are usually cast to void *, so check for that
> + 	 and look past the cast.  */
> +       if (TREE_CODE (arg1) == NOP_EXPR && POINTER_TYPE_P (ttype)
> + 	  && VOID_TYPE_P (TREE_TYPE (ttype)))
> +         arg1 = TREE_OPERAND (arg1, 0);
> + 
> +       ttype = TREE_TYPE (arg1);
> +       gcc_assert (POINTER_TYPE_P (ttype));
> + 
> +       /* Get the underlying type of the object.  */
> +       ttype = TREE_TYPE (ttype);
> +       type_align = TYPE_ALIGN (ttype);

I take that back.  Does this really work?  It certainly doesn't seem like
it would work in SSA mode.  You'd need to look back to the def.


r~


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