public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work069)] Add option to assume built-in calls are in a shared library.
@ 2021-09-16 18:14 Michael Meissner
0 siblings, 0 replies; 2+ messages in thread
From: Michael Meissner @ 2021-09-16 18:14 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:bf33d2db3bf4013cbbe01a087a8097d99a3d27dd
commit bf33d2db3bf4013cbbe01a087a8097d99a3d27dd
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Thu Sep 16 14:14:17 2021 -0400
Add option to assume built-in calls are in a shared library.
This patch adds an option (-mbuiltin-shlib) that says all calls to
built-in functions are in a shared library. This avoids having to call
the PLT function which then loads up the function address and jumps to
it.
2021-09-16 Michael Meissner <meissner@linux.ibm.com>
gcc/
* config/rs6000/rs6000-call.c (init_cumulative_args): Set
CALL_LONG for built-in functions if -mbuiltin-shlib.
* config/rs6000/rs6000.opt (mbuiltin-shlib): New option.
Diff:
---
gcc/config/rs6000/rs6000-call.c | 4 ++++
gcc/config/rs6000/rs6000.opt | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index e8625d17d18..c1a44f9137e 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -6661,6 +6661,10 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
&& lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype))
&& !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
cum->call_cookie |= CALL_LONG;
+ /* See if we want to assume all built-in functions are in a shared
+ library. */
+ else if (TARGET_BUILTIN_SHLIB && fndecl && fndecl_built_in_p (fndecl))
+ cum->call_cookie |= CALL_LONG;
else if (DEFAULT_ABI != ABI_DARWIN)
{
bool is_local = (fndecl
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 970988179e9..dadcefdb589 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -647,3 +647,7 @@ Generate (do not generate) XXSPLTIDP instructions.
mlxvkq
Target Undocumented Var(TARGET_LXVKQ) Init(1) Save
Generate (do not generate) LXVKQ instructions.
+
+mbuiltin-shlib
+Target Undocumented Var(TARGET_BUILTIN_SHLIB) Init(0) Save
+Assume (do not assume) built-in functions are within a shared library.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/meissner/heads/work069)] Add option to assume built-in calls are in a shared library.
@ 2021-09-17 5:29 Michael Meissner
0 siblings, 0 replies; 2+ messages in thread
From: Michael Meissner @ 2021-09-17 5:29 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b10afece39bb814248014956b3e8bd6b52feb522
commit b10afece39bb814248014956b3e8bd6b52feb522
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Fri Sep 17 01:29:08 2021 -0400
Add option to assume built-in calls are in a shared library.
This patch adds an option (-mbuiltin-shlib) that says all calls to
built-in functions are in a shared library. This avoids having to call
the PLT function which then loads up the function address and jumps to
it.
2021-09-17 Michael Meissner <meissner@linux.ibm.com>
gcc/
* config/rs6000/rs6000-call.c (init_cumulative_args): Set
CALL_LONG for built-in functions if -mbuiltin-shlib.
* config/rs6000/rs6000.opt (mbuiltin-shlib): New option.
Diff:
---
gcc/config/rs6000/rs6000-call.c | 4 ++++
gcc/config/rs6000/rs6000.opt | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index e8625d17d18..c1a44f9137e 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -6661,6 +6661,10 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
&& lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype))
&& !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
cum->call_cookie |= CALL_LONG;
+ /* See if we want to assume all built-in functions are in a shared
+ library. */
+ else if (TARGET_BUILTIN_SHLIB && fndecl && fndecl_built_in_p (fndecl))
+ cum->call_cookie |= CALL_LONG;
else if (DEFAULT_ABI != ABI_DARWIN)
{
bool is_local = (fndecl
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 817039d0321..3e6dc99febd 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -652,3 +652,7 @@ Generate (do not generate) XXSPLTIW instructions.
mlxvkq
Target Undocumented Var(TARGET_LXVKQ) Init(1) Save
Generate (do not generate) LXVKQ instructions.
+
+mbuiltin-shlib
+Target Undocumented Var(TARGET_BUILTIN_SHLIB) Init(0) Save
+Assume (do not assume) built-in functions are within a shared library.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-17 5:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 18:14 [gcc(refs/users/meissner/heads/work069)] Add option to assume built-in calls are in a shared library Michael Meissner
2021-09-17 5:29 Michael Meissner
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).