From: Kenneth Zadeck <zadeck@naturalbridge.com>
To: Mark Mitchell <mark@codesourcery.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, "Hubicha, Jan" <jh@suse.cz>
Subject: [lto] PATCH COMMITTED Re: potiential problems with parm decls.
Date: Wed, 01 Aug 2007 20:44:00 -0000 [thread overview]
Message-ID: <46B0F0B2.80207@naturalbridge.com> (raw)
In-Reply-To: <46B0C17D.1020908@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]
Mark Mitchell wrote:
> Kenneth Zadeck wrote:
>
>
>> How are you (we) handling PARM_DECLS?
>> Honza has informed my that the PARM_DECLS in the function's
>> DECL_ARGUMENTS needs to be "==" to the set of PARM_DECLS accessed in the
>> function.
>>
>
> The code I wrote doesn't set DECL_ARGUMENTS, on the theory that
> parameters are essentially local variables. I think it would be best if
> you set these up because the only information I have is types, and that
> may not be enough. But, if that's impractical, then I will see what I
> can do.
>
> Also as for:
>
>
As Honsa predicted, the problem was not setting DECL_ARGUMENTS. This
patch serializes and reconstitutes this tree. Also, some useless
debugging was removed.
2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-function-out.c (produce_asm): Remove old debugging code.
(output_function): Serialize DECL_ARGUMENTS.
2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-read.c (input_globals): Remove debugging.
(input_function): Set DECL_ARGUMENTS.
Committed as revision 127138.
Kenny
[-- Attachment #2: decl_arguments1.diff --]
[-- Type: text/x-patch, Size: 2266 bytes --]
Index: lto-function-out.c
===================================================================
--- lto-function-out.c (revision 127125)
+++ lto-function-out.c (working copy)
@@ -1773,12 +1773,6 @@ produce_asm (struct output_block *ob, tr
/* Write the global type references. */
for (index = 0; VEC_iterate(tree, ob->types, index, type); index++)
{
- fprintf (stderr, "type %d = ", index);
- print_generic_expr (stderr, type, TDF_VOPS|TDF_UID);
- fprintf (stderr, "\n");
- print_node (stderr, "", type, 0);
- fprintf (stderr, "\n\n");
-
lto_type_ref (type, &out_ref);
dw2_asm_output_data (8, out_ref.section, " ");
dw2_asm_output_delta (8, out_ref.label,
@@ -1965,6 +1959,13 @@ output_function (tree function)
/* Output any exception-handling regions. */
output_eh_regions (ob, fn);
+ /* Output the argument array. */
+ LTO_DEBUG_INDENT_TOKEN ("decl_arguments")
+ if (DECL_ARGUMENTS (function))
+ output_expr_operand (ob, DECL_ARGUMENTS (function));
+ else
+ output_zero (ob);
+
/* Output the code for the function. */
FOR_ALL_BB_FN (bb, fn)
output_bb (ob, bb, fn);
Index: lto/lto-read.c
===================================================================
--- lto/lto-read.c (revision 127125)
+++ lto/lto-read.c (working copy)
@@ -919,16 +919,7 @@ input_globals (struct lto_function_heade
= lto_resolve_var_ref (fd, context, &in_var_decls[i]);
for (i=0; i<header->num_types; i++)
- {
- fun_in->types[i]
- = lto_resolve_type_ref (fd, context, &in_types[i]);
-
- fprintf (stderr, "type %d = ", i);
- print_generic_expr (stderr, fun_in->types[i], TDF_VOPS|TDF_UID);
- fprintf (stderr, "\n");
- print_node (stderr, "", fun_in->types[i], 0);
- fprintf (stderr, "\n\n");
- }
+ fun_in->types[i] = lto_resolve_type_ref (fd, context, &in_types[i]);
}
@@ -1307,6 +1298,13 @@ input_function (tree fn_decl, struct fun
input_eh_regions (ib, fn, fun_in);
+ LTO_DEBUG_INDENT_TOKEN ("decl_arguments")
+ tag = input_record_start (ib);
+ if (tag)
+ DECL_ARGUMENTS (fn_decl) = input_expr_operand (ib, fun_in, fn, tag);
+ else
+ DECL_ARGUMENTS (fn_decl) = NULL;
+
tag = input_record_start (ib);
while (tag)
{
next prev parent reply other threads:[~2007-08-01 20:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-01 14:16 Kenneth Zadeck
2007-08-01 17:23 ` Mark Mitchell
2007-08-01 17:34 ` Kenneth Zadeck
2007-08-02 0:43 ` Mark Mitchell
2007-08-02 1:10 ` Kenneth Zadeck
2007-08-02 2:50 ` Mark Mitchell
2007-08-01 20:44 ` Kenneth Zadeck [this message]
2007-08-01 22:12 ` [lto] PATCH COMMITTED " Tom Tromey
2007-08-01 22:36 ` Kenneth Zadeck
2007-08-02 1:06 ` [lto] PATCH COMMITTED to fix missing semicolons Kenneth Zadeck
2007-08-02 1:16 ` David Daney
2007-08-02 1:49 ` Andrew Pinski
2007-08-02 16:42 ` Kenneth Zadeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46B0F0B2.80207@naturalbridge.com \
--to=zadeck@naturalbridge.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jh@suse.cz \
--cc=mark@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).