[LTO]: patch committed to properly handle VAR_DECLs and FIELD_DECLs

Kenneth Zadeck zadeck@naturalbridge.com
Tue Aug 28 15:11:00 GMT 2007


This code gets the reading of local VAR_DECLs and FIELD_DECLs into shape.

The FIELD_DECL code just integrates Jim Brandy's last commit.

The VAR_DECLS required a lot of work:

1) A new section had to be added so that the VAR_DECLs could be read in
randomly.  This is necessary because the tree for a VAR_DECL may contain
other VAR_DECLs so it is important to be able to reconstruct this bottom
up. 

2) I had to initialize the unexpanded_var_list as i read in the
VAR_DECLs.  Thanks Honza for pointing this out to me.  The failure that
happens when this is not done is not obvious at all.  

Kenny


2007-08-28  Kenneth Zadeck <zadeck@naturalbridge.com>

    * lto-function-out.c (output_block): Added
    local_decl_index_stream, debug_decl_index_stream,
    local_decls_index and local_decls_index_d.
    (output_local_vars): Add code to write a seperate stream
    containing the index of each local var.
    (output_local_vars_index): New function.
    (produce_asm, output_function): Write new streams.
    (lto_static_init): Do not write flags or types for FIELD_DECLS.
    * lto-tags.h (lto_debug_context): Added decl_index_data.
    
2007-08-28  Kenneth Zadeck <zadeck@naturalbridge.com>

    *lto-read.c (fun_in): Added local_decls_index and
    local_decls_index_d. 
    (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
    (input_globals): Enabled code to handle FIELD_DECLs.
    (input_local_vars_index, input_local_vars): New function.
    (input_local_var): Changed to allow locals to be input randomly.
    (lto_read_function_body): Added code to input the
    local_decls_index and to free various structures.
   
committed as revision 127862.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: postmerge6.diff
Type: text/x-patch
Size: 25864 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070828/360ffb1b/attachment.bin>


More information about the Gcc-patches mailing list