* Remove an RTL usage in the C++ front end
@ 2007-07-13 3:43 Dan Hipschman
2007-07-13 3:45 ` Laurynas Biveinis
0 siblings, 1 reply; 5+ messages in thread
From: Dan Hipschman @ 2007-07-13 3:43 UTC (permalink / raw)
To: gcc-patches
This patch gets rid of one usage of RTL in the C++ front end.
2007-06-12 Dan Hipschman <dsh@google.com>
* cp/method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
access function name.
Index: cp/method.c
===================================================================
--- cp/method.c (revision 126593)
+++ cp/method.c (working copy)
@@ -430,7 +430,7 @@ use_thunk (tree thunk_fndecl, bool emit_
current_function_decl = thunk_fndecl;
DECL_RESULT (thunk_fndecl)
= build_decl (RESULT_DECL, 0, integer_type_node);
- fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0);
+ fnname = get_name (thunk_fndecl);
/* The back end expects DECL_INITIAL to contain a BLOCK, so we
create one. */
fn_block = make_node (BLOCK);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Remove an RTL usage in the C++ front end
2007-07-13 3:43 Remove an RTL usage in the C++ front end Dan Hipschman
@ 2007-07-13 3:45 ` Laurynas Biveinis
2007-07-13 5:52 ` Dan Hipschman
0 siblings, 1 reply; 5+ messages in thread
From: Laurynas Biveinis @ 2007-07-13 3:45 UTC (permalink / raw)
To: dsh, gcc-patches
The ChangeLog disagrees with the actual patch:
> * cp/method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
> + fnname = get_name (thunk_fndecl);
--
Laurynas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Remove an RTL usage in the C++ front end
2007-07-13 3:45 ` Laurynas Biveinis
@ 2007-07-13 5:52 ` Dan Hipschman
2007-08-06 3:34 ` Mark Mitchell
0 siblings, 1 reply; 5+ messages in thread
From: Dan Hipschman @ 2007-07-13 5:52 UTC (permalink / raw)
To: Laurynas Biveinis; +Cc: gcc-patches
On Thu, Jul 12, 2007 at 08:36:24PM -0700, Laurynas Biveinis wrote:
> The ChangeLog disagrees with the actual patch:
Yea, I was using IDENTIFIER_POINTER (DECL_NAME (thunk_fndecl)) before and then
changed to get_name(). Revised:
2007-06-12 Dan Hipschman <dsh@google.com>
* cp/method.c (use_thunk): Use get_name instead of DECL_RTL to
access function name.
Index: cp/method.c
===================================================================
--- cp/method.c (revision 126593)
+++ cp/method.c (working copy)
@@ -430,7 +430,7 @@ use_thunk (tree thunk_fndecl, bool emit_
current_function_decl = thunk_fndecl;
DECL_RESULT (thunk_fndecl)
= build_decl (RESULT_DECL, 0, integer_type_node);
- fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0);
+ fnname = get_name (thunk_fndecl);
/* The back end expects DECL_INITIAL to contain a BLOCK, so we
create one. */
fn_block = make_node (BLOCK);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Remove an RTL usage in the C++ front end
2007-07-13 5:52 ` Dan Hipschman
@ 2007-08-06 3:34 ` Mark Mitchell
2007-08-06 22:10 ` Dan Hipschman
0 siblings, 1 reply; 5+ messages in thread
From: Mark Mitchell @ 2007-08-06 3:34 UTC (permalink / raw)
To: Laurynas Biveinis, gcc-patches
Dan Hipschman wrote:
> 2007-06-12 Dan Hipschman <dsh@google.com>
>
> * cp/method.c (use_thunk): Use get_name instead of DECL_RTL to
> access function name.
>
> Index: cp/method.c
> ===================================================================
> --- cp/method.c (revision 126593)
> +++ cp/method.c (working copy)
> @@ -430,7 +430,7 @@ use_thunk (tree thunk_fndecl, bool emit_
> current_function_decl = thunk_fndecl;
> DECL_RESULT (thunk_fndecl)
> = build_decl (RESULT_DECL, 0, integer_type_node);
> - fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0);
> + fnname = get_name (thunk_fndecl);
Why use get_name here? I'd actually prefer that we use name
IDENTIFIER_POINTER (DECL_NAME (thunk_fndecl)); we don't want the
recursive ADDR_EXPR behavior in get_name, do we?
OK with that change.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Remove an RTL usage in the C++ front end
2007-08-06 3:34 ` Mark Mitchell
@ 2007-08-06 22:10 ` Dan Hipschman
0 siblings, 0 replies; 5+ messages in thread
From: Dan Hipschman @ 2007-08-06 22:10 UTC (permalink / raw)
To: gcc-patches
On Sun, Aug 05, 2007 at 08:34:40PM -0700, Mark Mitchell wrote:
> Dan Hipschman wrote:
> > Index: cp/method.c
> > ===================================================================
> > --- cp/method.c (revision 126593)
> > +++ cp/method.c (working copy)
> > @@ -430,7 +430,7 @@ use_thunk (tree thunk_fndecl, bool emit_
> > current_function_decl = thunk_fndecl;
> > DECL_RESULT (thunk_fndecl)
> > = build_decl (RESULT_DECL, 0, integer_type_node);
> > - fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0);
> > + fnname = get_name (thunk_fndecl);
>
> Why use get_name here? I'd actually prefer that we use name
> IDENTIFIER_POINTER (DECL_NAME (thunk_fndecl)); we don't want the
> recursive ADDR_EXPR behavior in get_name, do we?
>
> OK with that change.
Thanks. Committed:
cp/
2007-08-06 Dan Hipschman <dsh@google.com>
* method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
access function name.
Index: gcc/cp/method.c
===================================================================
--- gcc/cp/method.c (revision 127254)
+++ gcc/cp/method.c (working copy)
@@ -430,7 +430,7 @@ use_thunk (tree thunk_fndecl, bool emit_
current_function_decl = thunk_fndecl;
DECL_RESULT (thunk_fndecl)
= build_decl (RESULT_DECL, 0, integer_type_node);
- fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0);
+ fnname = IDENTIFIER_POINTER (DECL_NAME (thunk_fndecl));
/* The back end expects DECL_INITIAL to contain a BLOCK, so we
create one. */
fn_block = make_node (BLOCK);
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-08-06 22:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-13 3:43 Remove an RTL usage in the C++ front end Dan Hipschman
2007-07-13 3:45 ` Laurynas Biveinis
2007-07-13 5:52 ` Dan Hipschman
2007-08-06 3:34 ` Mark Mitchell
2007-08-06 22:10 ` Dan Hipschman
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).