This is the mail archive of the
mailing list for the GCC project.
Question about Tree_function_versioning
- From: "Iyer, Balaji V" <balaji dot v dot iyer at intel dot com>
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Cc: "ubizjak at gmail dot com" <ubizjak at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, "rth at redhat dot com" <rth at redhat dot com>
- Date: Mon, 26 Mar 2012 01:34:55 +0000
- Subject: Question about Tree_function_versioning
I am currently trying to take certain functions (marked by certain attributes) and create vector version along with the scalar versions of the function. For example, let's say I have a function my_add that is marked with a certain attribute, I am trying to clone it into my_add_vector and still keep the original my_add. For this, I am trying to use tree_function_versioning in cgraphunit.c to clone the cgraph_node into a new function. Does this function actually create a 2nd function (called my_add_vector) and copy the body from my_add function to the my_add_vector function or does it just create a node called my_add_vector and then create a pointer to the body of the my_add?
Is there a better approach for doing this?
Any help is greatly appreciated!
Balaji V. Iyer.