public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [lto]: Patch to fix the chaining of local variables.
@ 2007-12-17 14:30 Kenneth Zadeck
  0 siblings, 0 replies; only message in thread
From: Kenneth Zadeck @ 2007-12-17 14:30 UTC (permalink / raw)
  To: gcc-patches, Nathan Froyd, Mark Mitchell

This patch fixes two and a half problems:

1) The unexpanded_vars_list was not being restored properly.  It is now
restored in the same order but there are not duplicates in the chain as
there are on the sending side.

2) I do not output the DECL_CHAIN field for local variables.  This was
causing a deep recursion on reading in the local variables that was
blowing the stack on some large functions.

2.5) We now properly serialize the DECL_CONTEXT for FUNCTION_DECLS. 
This is only marked as a half of a fix because there is something else
(perhaps the asm section name) that must be serialized properly to get
nested functions to work.  But this was part of the problem.

This now leaves only 1 failure when compiling the gcc .i files. 

committed as revision 131009.

Kenny

2007-12-17  Kenneth Zadeck <zadeck@naturalbridge.com>

    * lto-function-out.c (output_block.unexpanded_local_decls_index):
New vector.
    (destroy_output_block): Added missing ifdef.
    (output_decl_index): Added this_index to return added index.
    (output_type_ref): Added parameter to output_decl_index.
    (output_local_decl_ref): Added write parameter and code to initialize
    unexpanded_local_decls_index.
    (output_expr_operand): Added extra operands to output_decl_index and
    output_local_decl_ref.
    (output_local_var): New function split out from output_local_vars.
    (output_local_vars): Added code to string unexpanded_var_list
separately.
    (output_function): Added code to output decl_context for function.
2007-12-17  Kenneth Zadeck <zadeck@naturalbridge.com>

    * lto_read.c (data_in.unexpanded_indexes): New array.
    (input_local_var): Added code to read in unexpanded_var_list
    indexes for variables.  Only read in DECL_CHAIN field for
    parameters.
    (input_local_vars): Added code to rebuild unexpanded_var_list in
    order using unexpanded_indexes.
    (input_function): Added code to set DECL_CONTEXT for functions.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-17 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-17 14:30 [lto]: Patch to fix the chaining of local variables Kenneth Zadeck

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).