[c++] typeinfo for target types

Ramana Radhakrishnan ramana.gcc@googlemail.com
Thu Apr 24 13:44:00 GMT 2014


>> Well some of these scalar types are not really user visible which is
>> where I believe the problem is coming from and prima-facie I don't
>> think we should be inventing mangling for some of these "internal"
>> types.
>
>
> If the types are not user-visible, it is not clear to me why they need to be
> registered with the front-end...

The vector types that are built on this are user visible, so I suspect
that's why the scalar types need to be registered with the front-end.

A lot of this comes from the original support for the intrinsics way
that goes quite some time back so there is some digging needed here.

regards
Ramana

>
>
>>>  We could
>>> get the mangling functions to take a parameter that says whether errors
>>> should be fatal and skip generating the typeinfo when we can't mangle,
>>> but
>>> there is no convenient way to communicate this mangling failure (0 bytes
>>> written?).
>>>
>>> Would mangling the aarch64 builtins be a lot of work? Did other platforms
>>> break as well?
>>
>>
>> It's not a lot of work but I'd like to make sure we're doing the right
>> thing on both AArch32 and AArch64. So, for now can we just revert this
>> till the thing is sorted out.
>
>
> Ok, I'll commit the attached as soon as I've checked it isn't too broken. It
> is not a complete revert: splitting the rtti function is still cleaner, and
> the int128 symbols are still there.
>
> 2014-04-24  Marc Glisse  <marc.glisse@inria.fr>
>
>         PR libstdc++/43622
> gcc/cp/
>         * rtti.c (emit_support_tinfos): Do not iterate on
>         registered_builtin_types (partial revert).
> libstdc++/
>         * config/abi/pre/gnu.ver (CXXABI_1.3.9): Remove __float128 symbols.
>         * config/abi/pre/gnu-versioned-namespace.ver: Likewise.
>         * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
>
> --
> Marc Glisse
> Index: gcc/cp/rtti.c
> ===================================================================
> --- gcc/cp/rtti.c       (revision 209747)
> +++ gcc/cp/rtti.c       (working copy)
> @@ -1539,22 +1539,20 @@ emit_support_tinfos (void)
>                         /*tag_scope=*/ts_current, false);
>    pop_abi_namespace ();
>    if (!COMPLETE_TYPE_P (bltn_type))
>      return;
>    dtor = CLASSTYPE_DESTRUCTORS (bltn_type);
>    if (!dtor || DECL_EXTERNAL (dtor))
>      return;
>    doing_runtime = 1;
>    for (ix = 0; fundamentals[ix]; ix++)
>      emit_support_tinfo_1 (*fundamentals[ix]);
> -  for (tree t = registered_builtin_types; t; t = TREE_CHAIN (t))
> -    emit_support_tinfo_1 (TREE_VALUE (t));
>  }
>
>  /* Finish a type info decl. DECL_PTR is a pointer to an unemitted
>     tinfo decl.  Determine whether it needs emitting, and if so
>     generate the initializer.  */
>
>  bool
>  emit_tinfo_decl (tree decl)
>  {
>    tree type = TREE_TYPE (DECL_NAME (decl));
> Index: libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt
> ===================================================================
> --- libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt
> (revision 209747)
> +++ libstdc++-v3/config/abi/post/x86_64-linux-gnu/baseline_symbols.txt
> (working copy)
> @@ -2618,21 +2618,20 @@ OBJECT:16:_ZTISt16nested_exception@@CXXA
>  OBJECT:16:_ZTISt8ios_base@@GLIBCXX_3.4
>  OBJECT:16:_ZTISt9exception@@GLIBCXX_3.4
>  OBJECT:16:_ZTISt9time_base@@GLIBCXX_3.4
>  OBJECT:16:_ZTISt9type_info@@GLIBCXX_3.4
>  OBJECT:16:_ZTIa@@CXXABI_1.3
>  OBJECT:16:_ZTIb@@CXXABI_1.3
>  OBJECT:16:_ZTIc@@CXXABI_1.3
>  OBJECT:16:_ZTId@@CXXABI_1.3
>  OBJECT:16:_ZTIe@@CXXABI_1.3
>  OBJECT:16:_ZTIf@@CXXABI_1.3
> -OBJECT:16:_ZTIg@@CXXABI_1.3.9
>  OBJECT:16:_ZTIh@@CXXABI_1.3
>  OBJECT:16:_ZTIi@@CXXABI_1.3
>  OBJECT:16:_ZTIj@@CXXABI_1.3
>  OBJECT:16:_ZTIl@@CXXABI_1.3
>  OBJECT:16:_ZTIm@@CXXABI_1.3
>  OBJECT:16:_ZTIn@@CXXABI_1.3.5
>  OBJECT:16:_ZTIo@@CXXABI_1.3.5
>  OBJECT:16:_ZTIs@@CXXABI_1.3
>  OBJECT:16:_ZTIt@@CXXABI_1.3
>  OBJECT:16:_ZTIv@@CXXABI_1.3
> @@ -3119,21 +3118,20 @@ OBJECT:2:_ZNSt10ctype_base5printE@@GLIBC
>  OBJECT:2:_ZNSt10ctype_base5punctE@@GLIBCXX_3.4
>  OBJECT:2:_ZNSt10ctype_base5spaceE@@GLIBCXX_3.4
>  OBJECT:2:_ZNSt10ctype_base5upperE@@GLIBCXX_3.4
>  OBJECT:2:_ZNSt10ctype_base6xdigitE@@GLIBCXX_3.4
>  OBJECT:2:_ZTSa@@CXXABI_1.3
>  OBJECT:2:_ZTSb@@CXXABI_1.3
>  OBJECT:2:_ZTSc@@CXXABI_1.3
>  OBJECT:2:_ZTSd@@CXXABI_1.3
>  OBJECT:2:_ZTSe@@CXXABI_1.3
>  OBJECT:2:_ZTSf@@CXXABI_1.3
> -OBJECT:2:_ZTSg@@CXXABI_1.3.9
>  OBJECT:2:_ZTSh@@CXXABI_1.3
>  OBJECT:2:_ZTSi@@CXXABI_1.3
>  OBJECT:2:_ZTSj@@CXXABI_1.3
>  OBJECT:2:_ZTSl@@CXXABI_1.3
>  OBJECT:2:_ZTSm@@CXXABI_1.3
>  OBJECT:2:_ZTSn@@CXXABI_1.3.9
>  OBJECT:2:_ZTSo@@CXXABI_1.3.9
>  OBJECT:2:_ZTSs@@CXXABI_1.3
>  OBJECT:2:_ZTSt@@CXXABI_1.3
>  OBJECT:2:_ZTSv@@CXXABI_1.3
> @@ -3153,41 +3151,39 @@ OBJECT:32:_ZTIPKDe@@CXXABI_1.3.4
>  OBJECT:32:_ZTIPKDf@@CXXABI_1.3.4
>  OBJECT:32:_ZTIPKDi@@CXXABI_1.3.3
>  OBJECT:32:_ZTIPKDn@@CXXABI_1.3.5
>  OBJECT:32:_ZTIPKDs@@CXXABI_1.3.3
>  OBJECT:32:_ZTIPKa@@CXXABI_1.3
>  OBJECT:32:_ZTIPKb@@CXXABI_1.3
>  OBJECT:32:_ZTIPKc@@CXXABI_1.3
>  OBJECT:32:_ZTIPKd@@CXXABI_1.3
>  OBJECT:32:_ZTIPKe@@CXXABI_1.3
>  OBJECT:32:_ZTIPKf@@CXXABI_1.3
> -OBJECT:32:_ZTIPKg@@CXXABI_1.3.9
>  OBJECT:32:_ZTIPKh@@CXXABI_1.3
>  OBJECT:32:_ZTIPKi@@CXXABI_1.3
>  OBJECT:32:_ZTIPKj@@CXXABI_1.3
>  OBJECT:32:_ZTIPKl@@CXXABI_1.3
>  OBJECT:32:_ZTIPKm@@CXXABI_1.3
>  OBJECT:32:_ZTIPKn@@CXXABI_1.3.5
>  OBJECT:32:_ZTIPKo@@CXXABI_1.3.5
>  OBJECT:32:_ZTIPKs@@CXXABI_1.3
>  OBJECT:32:_ZTIPKt@@CXXABI_1.3
>  OBJECT:32:_ZTIPKv@@CXXABI_1.3
>  OBJECT:32:_ZTIPKw@@CXXABI_1.3
>  OBJECT:32:_ZTIPKx@@CXXABI_1.3
>  OBJECT:32:_ZTIPKy@@CXXABI_1.3
>  OBJECT:32:_ZTIPa@@CXXABI_1.3
>  OBJECT:32:_ZTIPb@@CXXABI_1.3
>  OBJECT:32:_ZTIPc@@CXXABI_1.3
>  OBJECT:32:_ZTIPd@@CXXABI_1.3
>  OBJECT:32:_ZTIPe@@CXXABI_1.3
>  OBJECT:32:_ZTIPf@@CXXABI_1.3
> -OBJECT:32:_ZTIPg@@CXXABI_1.3.9
>  OBJECT:32:_ZTIPh@@CXXABI_1.3
>  OBJECT:32:_ZTIPi@@CXXABI_1.3
>  OBJECT:32:_ZTIPj@@CXXABI_1.3
>  OBJECT:32:_ZTIPl@@CXXABI_1.3
>  OBJECT:32:_ZTIPm@@CXXABI_1.3
>  OBJECT:32:_ZTIPn@@CXXABI_1.3.5
>  OBJECT:32:_ZTIPo@@CXXABI_1.3.5
>  OBJECT:32:_ZTIPs@@CXXABI_1.3
>  OBJECT:32:_ZTIPt@@CXXABI_1.3
>  OBJECT:32:_ZTIPv@@CXXABI_1.3
> @@ -3228,21 +3224,20 @@ OBJECT:39:_ZTSSt13basic_filebufIwSt11cha
>  OBJECT:39:_ZTSSt13basic_fstreamIcSt11char_traitsIcEE@@GLIBCXX_3.4
>  OBJECT:39:_ZTSSt13basic_fstreamIwSt11char_traitsIwEE@@GLIBCXX_3.4
>  OBJECT:39:_ZTSSt13basic_istreamIwSt11char_traitsIwEE@@GLIBCXX_3.4
>  OBJECT:39:_ZTSSt13basic_ostreamIwSt11char_traitsIwEE@@GLIBCXX_3.4
>  OBJECT:3:_ZTSPa@@CXXABI_1.3
>  OBJECT:3:_ZTSPb@@CXXABI_1.3
>  OBJECT:3:_ZTSPc@@CXXABI_1.3
>  OBJECT:3:_ZTSPd@@CXXABI_1.3
>  OBJECT:3:_ZTSPe@@CXXABI_1.3
>  OBJECT:3:_ZTSPf@@CXXABI_1.3
> -OBJECT:3:_ZTSPg@@CXXABI_1.3.9
>  OBJECT:3:_ZTSPh@@CXXABI_1.3
>  OBJECT:3:_ZTSPi@@CXXABI_1.3
>  OBJECT:3:_ZTSPj@@CXXABI_1.3
>  OBJECT:3:_ZTSPl@@CXXABI_1.3
>  OBJECT:3:_ZTSPm@@CXXABI_1.3
>  OBJECT:3:_ZTSPn@@CXXABI_1.3.9
>  OBJECT:3:_ZTSPo@@CXXABI_1.3.9
>  OBJECT:3:_ZTSPs@@CXXABI_1.3
>  OBJECT:3:_ZTSPt@@CXXABI_1.3
>  OBJECT:3:_ZTSPv@@CXXABI_1.3
> @@ -3558,21 +3553,20 @@ OBJECT:4:_ZNSt8ios_base8showbaseE@@GLIBC
>  OBJECT:4:_ZNSt8ios_base9basefieldE@@GLIBCXX_3.4
>  OBJECT:4:_ZNSt8ios_base9boolalphaE@@GLIBCXX_3.4
>  OBJECT:4:_ZNSt8ios_base9showpointE@@GLIBCXX_3.4
>  OBJECT:4:_ZNSt8ios_base9uppercaseE@@GLIBCXX_3.4
>  OBJECT:4:_ZTSPKa@@CXXABI_1.3
>  OBJECT:4:_ZTSPKb@@CXXABI_1.3
>  OBJECT:4:_ZTSPKc@@CXXABI_1.3
>  OBJECT:4:_ZTSPKd@@CXXABI_1.3
>  OBJECT:4:_ZTSPKe@@CXXABI_1.3
>  OBJECT:4:_ZTSPKf@@CXXABI_1.3
> -OBJECT:4:_ZTSPKg@@CXXABI_1.3.9
>  OBJECT:4:_ZTSPKh@@CXXABI_1.3
>  OBJECT:4:_ZTSPKi@@CXXABI_1.3
>  OBJECT:4:_ZTSPKj@@CXXABI_1.3
>  OBJECT:4:_ZTSPKl@@CXXABI_1.3
>  OBJECT:4:_ZTSPKm@@CXXABI_1.3
>  OBJECT:4:_ZTSPKn@@CXXABI_1.3.9
>  OBJECT:4:_ZTSPKo@@CXXABI_1.3.9
>  OBJECT:4:_ZTSPKs@@CXXABI_1.3
>  OBJECT:4:_ZTSPKt@@CXXABI_1.3
>  OBJECT:4:_ZTSPKv@@CXXABI_1.3
> Index: libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
> ===================================================================
> --- libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver     (revision
> 209747)
> +++ libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver     (working
> copy)
> @@ -314,24 +314,24 @@ CXXABI_2.0 {
>      # typeinfo for decimal floating point types
>      _ZTID[fde];
>      _ZTIPD[fde];
>      _ZTIPKD[fde];
>
>      # typeinfo for decltype(nullptr)
>      _ZTIDn;
>      _ZTIPDn;
>      _ZTIPKDn;
>
> -    # typeinfo for __int128, unsigned __int128 and __float128
> -    _ZTI[gno];
> -    _ZTIP[gno];
> -    _ZTIPK[gno];
> +    # typeinfo for __int128 and unsigned __int128
> +    _ZTI[no];
> +    _ZTIP[no];
> +    _ZTIPK[no];
>
>      # virtual table
>      _ZTVN10__cxxabiv117__array_type_infoE;
>      _ZTVN10__cxxabiv117__class_type_infoE;
>      _ZTVN10__cxxabiv116__enum_type_infoE;
>      _ZTVN10__cxxabiv120__function_type_infoE;
>      _ZTVN10__cxxabiv123__fundamental_type_infoE;
>      _ZTVN10__cxxabiv117__pbase_type_infoE;
>      _ZTVN10__cxxabiv129__pointer_to_member_type_infoE;
>      _ZTVN10__cxxabiv119__pointer_type_infoE;
> Index: libstdc++-v3/config/abi/pre/gnu.ver
> ===================================================================
> --- libstdc++-v3/config/abi/pre/gnu.ver (revision 209747)
> +++ libstdc++-v3/config/abi/pre/gnu.ver (working copy)
> @@ -1579,29 +1579,24 @@ CXXABI_1.3.8 {
>      _Z16__VLTRegisterSet*;
>      _Z21__VLTRegisterSetDebug*;
>      _Z24__VLTVerifyVtablePointer*;
>      _Z29__VLTVerifyVtablePointerDebug*;
>      __VLTChangePermission;
>
>  } CXXABI_1.3.7;
>
>  CXXABI_1.3.9 {
>
> -    # typeinfo name for __int128, unsigned __int128 and __float128
> -    _ZTS[gno];
> -    _ZTSP[gno];
> -    _ZTSPK[gno];
> -
> -    # typeinfo for __float128
> -    _ZTIg;
> -    _ZTIPg;
> -    _ZTIPKg;
> +    # typeinfo name for __int128 and unsigned __int128
> +    _ZTS[no];
> +    _ZTSP[no];
> +    _ZTSPK[no];
>
>  } CXXABI_1.3.8;
>
>  # Symbols in the support library (libsupc++) supporting transactional
> memory.
>  CXXABI_TM_1 {
>
>    global:
>      __cxa_tm_cleanup;
>
>  };
>



More information about the Gcc-patches mailing list