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: [RFC][IPA-VRP] Check for POINTER_TYPE_P before accessing SSA_NAME_PTR_INFO in tree-inline


On Thu, Jul 14, 2016 at 09:47:03PM -0700, Andrew Pinski wrote:
> On Thu, Jul 14, 2016 at 9:43 PM, kugan
> <kugan.vivekanandarajah@linaro.org> wrote:
> > This patch adds check for POINTER_TYPE_P before accessing SSA_NAME_PTR_INFO
> > in remap_ssa_name in gcc/tree-inline.c. This is not related to IPA_VRP but
> > was exposed by that.
> 
> SSA_NAME_PTR_INFO should be NULL for non POINTER_TYPE ssa names?  Why
> is it not null in your case?

??
  /* Value range information.  */
  union ssa_name_info_type {
    /* Pointer attributes used for alias analysis.  */
    struct GTY ((tag ("0"))) ptr_info_def *ptr_info;
    /* Value range attributes used for zero/sign extension elimination.  */
    struct GTY ((tag ("1"))) range_info_def *range_info;
  } GTY ((desc ("%1.typed.type ?" \
                "!POINTER_TYPE_P (TREE_TYPE ((tree)&%1)) : 2"))) info;

SSA_NAME_PTR_INFO and SSA_NAME_RANGE_INFO share space, so all uses of
SSA_NAME_PTR_INFO should be only used for pointer types and
SSA_NAME_RANGE_INFO only for integral types.

	Jakub


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