Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(854)

Unified Diff: multiversion.h

Issue 5698084: User directed Multiversioning support via Function Overloading Base URL: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/main/gcc/
Patch Set: Created 13 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « doc/tm.texi.in ('k') | multiversion.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: multiversion.h
===================================================================
--- multiversion.h (revision 0)
+++ multiversion.h (revision 0)
@@ -0,0 +1,51 @@
+/* Function Multiversioning.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ Contributed by Sriraman Tallam (tmsriram@google.com)
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+/* This is the header file which provides the functions to keep track
+ of functions that are multi-versioned and to generate the dispatch
+ code to call the right version at run-time. */
+
+#ifndef GCC_MULTIVERSION_H
+#define GCC_MULTIVERION_H
+
+#include "tree.h"
+
+/* Mark DECL1 and DECL2 as function versions. */
+int group_function_versions (const tree decl1, const tree decl2);
+/* Mark DECL as deleted and no longer a version. */
+void mark_delete_decl_version (const tree decl);
+/* Returns true if DECL is the default version to be executed if all
+ other versions are inappropriate at run-time. */
+bool is_default_function (const tree decl);
+/* Gets the IFUNC dispatcher for this multi-versioned function DECL. DECL
+ must be the default function in the multi-versioned group. */
+tree get_ifunc_for_version (const tree decl);
+/* Returns true when only one of DECL1 and DECL2 is marked with "targetv"
+ or if the "targetv" attribute strings of DECL1 and DECL2 dont match. */
+bool has_different_version_attributes (const tree decl1, const tree decl2);
+/* If DECL is a function version and not the default version, the assembler
+ name of DECL is changed to include the attribute string to keep the
+ name unambiguous. */
+void version_assembler_name (const tree decl);
+/* This makes the IFUNC definition for the multi-versioned function DECL.
+ The new IFUNC function when called will dispatch the appropriate function
+ version. */
+tree make_ifunc_selector_for_version (const tree decl);
+#endif
« no previous file with comments | « doc/tm.texi.in ('k') | multiversion.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b