* [PATCH] Remove inline keyword from rs6000 legitimate_indirect_address_p (PR target/54308)
@ 2012-11-08 17:42 Jakub Jelinek
2012-11-08 19:32 ` David Edelsohn
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2012-11-08 17:42 UTC (permalink / raw)
To: David Edelsohn; +Cc: gcc-patches
Hi!
We have in rs6000-protos.h
extern bool legitimate_indirect_address_p (rtx, int);
and in rs6000.c
inline bool
legitimate_indirect_address_p (rtx x, int strict) { ... }
and in predicates.md call this function. That works fine in C
(both -fgnu89-inline mode and C99), the function is inlined within rs6000.c
but an out of line copy is still emitted and predicates.md can thus
reference it. But in C++, if compiled with optimizations, without
-fkeep-inline-functions and the compiler inlines all calls to that function,
it doesn't have to emit anything. Thus, either we have the option to
move the definition of legitimate_indirect_address_p into a header (but
rs6000-protos.h doesn't look like a correct spot to define inline
functions), or we need to drop inline keyword and force that way
an out of line copy. Ok for trunk?
2012-11-08 Jakub Jelinek <jakub@redhat.com>
PR target/54308
* config/rs6000/rs6000.c (legitimate_indirect_address_p): Remove
inline keyword.
--- gcc/config/rs6000/rs6000.c.jj 2012-10-31 09:20:44.000000000 +0100
+++ gcc/config/rs6000/rs6000.c 2012-11-08 18:33:34.950408593 +0100
@@ -5465,7 +5465,7 @@ avoiding_indexed_address_p (enum machine
return (TARGET_AVOID_XFORM && VECTOR_MEM_NONE_P (mode));
}
-inline bool
+bool
legitimate_indirect_address_p (rtx x, int strict)
{
return GET_CODE (x) == REG && INT_REG_OK_FOR_BASE_P (x, strict);
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Remove inline keyword from rs6000 legitimate_indirect_address_p (PR target/54308)
2012-11-08 17:42 [PATCH] Remove inline keyword from rs6000 legitimate_indirect_address_p (PR target/54308) Jakub Jelinek
@ 2012-11-08 19:32 ` David Edelsohn
0 siblings, 0 replies; 2+ messages in thread
From: David Edelsohn @ 2012-11-08 19:32 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: gcc-patches
On Thu, Nov 8, 2012 at 12:42 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> We have in rs6000-protos.h
> extern bool legitimate_indirect_address_p (rtx, int);
> and in rs6000.c
> inline bool
> legitimate_indirect_address_p (rtx x, int strict) { ... }
> and in predicates.md call this function. That works fine in C
> (both -fgnu89-inline mode and C99), the function is inlined within rs6000.c
> but an out of line copy is still emitted and predicates.md can thus
> reference it. But in C++, if compiled with optimizations, without
> -fkeep-inline-functions and the compiler inlines all calls to that function,
> it doesn't have to emit anything. Thus, either we have the option to
> move the definition of legitimate_indirect_address_p into a header (but
> rs6000-protos.h doesn't look like a correct spot to define inline
> functions), or we need to drop inline keyword and force that way
> an out of line copy. Ok for trunk?
>
> 2012-11-08 Jakub Jelinek <jakub@redhat.com>
>
> PR target/54308
> * config/rs6000/rs6000.c (legitimate_indirect_address_p): Remove
> inline keyword.
Okay.
Thanks, David
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-08 19:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-08 17:42 [PATCH] Remove inline keyword from rs6000 legitimate_indirect_address_p (PR target/54308) Jakub Jelinek
2012-11-08 19:32 ` David Edelsohn
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).