On Fri, Jul 15, 2011 at 16:02, Gabriel Charette <gch...@google.com> wrote:
>> + /* Read and process the symbol table. */ >> + pph_in_symtab (stream); >> } >> > > Why read the symbol table last? Because the symbol identifiers need to be placed in the global bindings, which are not read until later. This was my initial intent, but this circular dependency made things unpleasant. If the symbol table is placed first, we don't update the bindings properly and lookups fail. There are some improvements that can be done, however: we are not testing for duplicate symbols in the table (I noticed that sometimes rest_of_decl_compilation is called more than once for the same decl, for instance). >> +/* Add DECL to the list of symbols that need to be registered with the >> + middle end when reading current_pph_stream. */ >> + >> +void >> +pph_add_decl_to_register (tree decl) >> +{ >> + if (decl) >> + VEC_safe_push (tree, heap, decls_to_register, decl); >> +} > > should we inline this? It's accessing file-local data (decls_to_register). Besides, this is trivial to inline with LTO/LIPO. Diego.