public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC target_clone support
@ 2017-05-05 18:19 Michael Meissner
  2017-05-05 18:45 ` GCC target_clone support (functionality question) Michael Meissner
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michael Meissner @ 2017-05-05 18:19 UTC (permalink / raw)
  To: GCC mailing list, Segher Boessenkool, David Edelsohn,
	Jan Hubicka, Uros Bizjak, Kirill Yukhin, Richard Biener,
	Richard Henderson, Jakub Jelinek, Richard Earnshaw,
	Marcus Shawcroft, Nick Clifton, Ramana Radhakrishnan,
	Bernd Schmidt, Jeff Law, Hartmut Penner, Ulrich Weigand,
	Andreas Krebbel, Evgeny Stupachenko, Michael Meissner

I'm in the middle of adding support for the target_clone attribute to the
PowerPC.  At the moment, the x86_64/i386 port is the only port that supports
target_clone.  I added the arm/s390 port maintainers to this query, because
those ports might also consider supporting target_clones in the future.

In doing the work, I noticed that some of the functions called by the target
hooks that were fairly generic, and we might want to move these functions into
common code?  Would people object if I put out a patch to move these functions
to common code?

I also have a question on the functionality of target_clone that I will address
in a separate message.

So far, the list of generic code that could be moved to common code to allow
other ports to add target_clone support include:

make_resolver_func:

	Make the resolver function decl to dispatch the versions of a
	multi-versioned function, DEFAULT_DECL.  Create an empty basic block in
	the resolver and store the pointer in EMPTY_BB.  Return the decl of the
	resolver function.

make_dispatcher_decl:

	Make a dispatcher declaration for the multi-versioned function DECL.
	Calls to DECL function will be replaced with calls to the dispatcher by
	the front-end.  Return the decl created.

is_function_default_version:

	Returns true if decl is multi-versioned and DECL is the default
	function, that is it is not tagged with target specific optimization.

attr_strcmp:

	Comparator function to be used in qsort routine to sort attribute
	specification strings to "target".

sorted_attr_string:

	ARGLIST is the argument to target attribute.  This function tokenizes
	the comma separated arguments, sorts them and returns a string which is
	a unique identifier for the comma separated arguments.  It also
	replaces non-identifier characters "=,-" with "_".

<xxx>_function_versions:

	This function returns true if FN1 and FN2 are versions of the same
	function, that is, the target strings of the function decls are
	different.  This assumes that FN1 and FN2 have the same signature.
	This is the TARGET_OPTION_FUNCTION_VERSIONS target hook, and it is the
	same between the x86 and ppc.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-08 22:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-05 18:19 GCC target_clone support Michael Meissner
2017-05-05 18:45 ` GCC target_clone support (functionality question) Michael Meissner
     [not found]   ` <CAOvf_xzMMbbQ+adZ+hWYtxACn_6yS50nhhcVYeBuPnUKZNPc2g@mail.gmail.com>
2017-05-05 19:48     ` Michael Meissner
     [not found]       ` <CAOvf_xyeUdFnfXMszOb8ZcEava+pRmzTP2naErd5U8sr2E1xpw@mail.gmail.com>
2017-05-05 20:50         ` Michael Meissner
     [not found]   ` <87tw4y7adg.fsf@linaro.org>
2017-05-08 22:14     ` Jeff Law
2017-05-05 18:52 ` GCC target_clone support Michael Meissner
2017-05-05 20:17 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).