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: [GOOGLE] Handle missing BINFO for LIPO


Ok (please also guard it with L_IPO_COMP_MODE).

David

On Tue, Oct 7, 2014 at 11:27 AM, Teresa Johnson <tejohnson@google.com> wrote:
> We may have missing BINFO on a type if that type is a builtin, since
> in LIPO mode we will reset builtin types to their original tree nodes
> before parsing subsequent modules. Handle incomplete information by
> returning false so we won't put an entry in the type inheritance graph
> for optimization.
>
> Passes regression tests. Ok for google branches?
>
> Teresa
>
> 2014-10-07  Teresa Johnson  <tejohnson@google.com>
>
>         Google ref b/16511102.
>         * ipa-devirt.c (polymorphic_type_binfo_p): Handle missing BINFO.
>
> Index: ipa-devirt.c
> ===================================================================
> --- ipa-devirt.c        (revision 215830)
> +++ ipa-devirt.c        (working copy)
> @@ -177,7 +177,10 @@ static inline bool
>  polymorphic_type_binfo_p (tree binfo)
>  {
>    /* See if BINFO's type has an virtual table associtated with it.  */
> -  return BINFO_VTABLE (TYPE_BINFO (BINFO_TYPE (binfo)));
> +  tree type_binfo = TYPE_BINFO (BINFO_TYPE (binfo));
> +  if (!type_binfo)
> +    return false;
> +  return BINFO_VTABLE (type_binfo);
>  }
>
>  /* One Definition Rule hashtable helpers.  */
>
>
> --
> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413


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