[PATCH] Move target independent code to support target_clones attributes from i386 to common code
Jeff Law
law@redhat.com
Thu May 11 17:33:00 GMT 2017
On 05/10/2017 04:40 PM, Michael Meissner wrote:
> As I mentioned in the mail message:
> https://gcc.gnu.org/ml/gcc/2017-05/msg00060.html
>
> I'm working on adding the target_clones attribute support to the PowerPC. I
> have an implementation right now, but I want to iterate on it somewhat.
>
> In doing the patch, I noticed there were several functions that were added to
> the i386 port to enable target_clones that I could use without modification in
> the PowerPC. This patch moves these functions from i386.c to attribs.c.
>
> I made a few changes to the functions to in order to make these common code:
>
> 1) I removed 'static' on the declarations.
>
> 2) I renamed 'ix86_function_versions' to 'common_function_versions' and
> changed TARGET_OPTION_FUNCTION_VERSIONS to point to that.
>
> 3) I renamed make_name to make_unique_name.
>
> 4) I removed a trailing space in one of the functions.
>
> I have done bootstraps and make check tests on both x86_64 and PowerPC and
> there were no regressions. On the PowerPC, I included my initial
> implementation of the target_clones support, but those patches are not part of
> this patch submission.
>
> Can I check this into the trunk?
>
> 2017-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
>
> * attribs.h (sorted_attr_string): Move machine independent
> functions for target clone support from the i386 port to common
> code. Rename ix86_function_versions to common_function_versions.
> Rename make_name to make_unique_name.
> (common_function_versions): Likewise.
> (make_unique_name): Likewise.
> (make_dispatcher_decl): Likewise.
> (is_function_default_version): Likewise.
> * attribs.c (attr_strcmp): Likewise.
> (sorted_attr_string): Likewise.
> (common_function_versions): Likewise.
> (make_unique_name): Likewise.
> (make_dispatcher_decl): Likewise.
> (is_function_default_version): Likewise.
> * config/i386/i386.c (attr_strcmp): Likewise.
> (sorted_attr_string): Likewise.
> (ix86_function_versions): Likewise.
> (make_name): Likewise.
> (make_dispatcher_decl): Likewise.
> (is_function_default_version): Likewise.
> (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
>
OK.
jeff
More information about the Gcc-patches
mailing list