This is the mail archive of the
mailing list for the GCC project.
Re: OMP4/cilkplus: simd clone function mangling
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Jan Hubicka <jh at suse dot cz>, Richard Henderson <rth at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, "Iyer, Balaji V" <balaji dot v dot iyer at intel dot com>
- Date: Mon, 07 Oct 2013 10:16:06 -0500
- Subject: Re: OMP4/cilkplus: simd clone function mangling
- Authentication-results: sourceware.org; auth=none
- References: <52448B95 dot 9020901 at redhat dot com> <20130927142317 dot GM30970 at tucnak dot zalov dot cz>
On 09/27/13 09:23, Jakub Jelinek wrote:
On Thu, Sep 26, 2013 at 02:31:33PM -0500, Aldy Hernandez wrote:
+/* Create a simd clone of OLD_NODE and return it. */
+static struct cgraph_node *
+simd_clone_create (struct cgraph_node *old_node)
+ struct cgraph_node *new_node;
+ new_node = cgraph_function_versioning (old_node, vNULL, NULL, NULL, false,
+ NULL, NULL, "simdclone");
My understanding of how IPA cloning etc. works is that you first
set up various data structures describing how you change the arguments
and only then actually do cgraph_function_versioning which already during
the copying will do some of the transformations of the IL.
But perhaps those transformations are too complicated to describe for
tree-inline.c to make them for you.
For the record, the way this works (at least for tree-sra) is that you
do the cgraph cloning first, and then call
ipa_modify_formal_parameters() with an adjustments vector. This
function, in ipa-prop.c, seems to be only used for SRA.
ipa_modify_formal_parameters() doesn't handle adding new arguments out
of the blue, only changing parameter types, removing them altogether, or
leaving them as is. My plan is to enhance this to handle adding new
parameters (for the masked argument for simd-enabled functions /
But anyways... ipa_modify_formal_parameters() seems like the more
elegant solution for modifying argument types after cloning.