This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, AArch64] Restructure arm_neon.h vector types' implementation.
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Tejas Belagod <tbelagod at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Sat, 28 Jun 2014 12:25:49 +0200 (CEST)
- Subject: Re: [Patch, AArch64] Restructure arm_neon.h vector types' implementation.
- Authentication-results: sourceware.org; auth=none
- References: <53A84C27 dot 9050001 at arm dot com>
On Mon, 23 Jun 2014, Tejas Belagod wrote:
Here is a patch that restructures neon builtins to use vector types based on
standard base types. We previously defined arm_neon.h's neon vector
types(int8x8_t) using gcc's front-end vector extensions. We now move away
from that and use types built internally(e.g. __Int8x8_t). These internal
types names are defined by the AAPCS64 and we build arm_neon.h's public
vector types over these internal types. e.g.
typedef __Int8x8_t int8x8_t;
as opposed to
typedef __builtin_aarch64_simd_qi int8x8_t
__attribute__ ((__vector_size__ (8)));
Impact on mangling:
This patch does away with these builtin scalar types that the vector types
were based on. These were previously used to look up mangling names. We now
use the internal vector type names(e.g. __Int8x8_t) to lookup mangling for
the arm_neon.h-exported vector types. There are a few internal scalar
types(__builtin_aarch64_simd_oi etc.) that is needed to efficiently implement
some NEON Intrinsics. These will be declared in the back-end and registered
in the front-end and aarch64-specific builtin types, but are not
user-visible. These, along with a few scalar __builtin types that aren't
user-visible will have implementation-defined mangling. Because we don't have
strong-typing across all builtins yet, we still have to maintain the old
builtin scalar types - they will be removed once we move over to a
strongly-typed builtin system implemented by the qualifier infrastructure.
Marc Glisse's patch in this thread exposed this issue
https://gcc.gnu.org/ml/gcc-patches/2014-04/msg00618.html. I've tested my
patch with the change that his patch introduced, and it seems to work fine -
specifically these two lines:
+ for (tree t = registered_builtin_types; t; t = TREE_CHAIN (t))
+ emit_support_tinfo_1 (TREE_VALUE (t));
If you still have that build somewhere, could you try:
nm -C libsupc++.a | grep typeinfo
and check how much your builtins appear there? With my patch you may have
half-floats in addition to what you get without the patch (I think that's
a good thing), but I hope not too much more...
Thanks for working on this,