Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1198)

Issue 4732043: [pph] Add symbol table - Fix remaining asm differences (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 9 months ago by Diego Novillo
Modified:
12 years, 8 months ago
Reviewers:
CC:
Lawrence Crowl, Gabriel Charette, gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+224 lines, -128 lines) Patch
M gcc/cp/Make-lang.in View 2 chunks +3 lines, -3 lines 0 comments Download
M gcc/cp/call.c View 1 chunk +1 line, -1 line 0 comments Download
M gcc/cp/class.c View 1 chunk +1 line, -1 line 0 comments Download
M gcc/cp/cp-tree.h View 1 chunk +1 line, -0 lines 0 comments Download
M gcc/cp/decl.c View 6 chunks +24 lines, -4 lines 0 comments Download
M gcc/cp/decl2.c View 3 chunks +4 lines, -4 lines 0 comments Download
M gcc/cp/method.c View 1 chunk +1 line, -1 line 0 comments Download
M gcc/cp/pph-streamer.h View 3 chunks +14 lines, -4 lines 0 comments Download
M gcc/cp/pph-streamer-in.c View 10 chunks +85 lines, -70 lines 0 comments Download
M gcc/cp/pph-streamer-out.c View 9 chunks +85 lines, -30 lines 0 comments Download
M gcc/cp/semantics.c View 2 chunks +2 lines, -2 lines 0 comments Download
M gcc/testsuite/g++.dg/pph/c1attr-warn-unused.cc View 1 chunk +0 lines, -1 line 0 comments Download
M gcc/testsuite/g++.dg/pph/c1pr44948-1a.cc View 1 chunk +1 line, -1 line 0 comments Download
M gcc/testsuite/g++.dg/pph/c4meteor-contest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M gcc/testsuite/g++.dg/pph/x0hardlookup.h View 1 chunk +1 line, -0 lines 0 comments Download
M gcc/testsuite/g++.dg/pph/x1globalref.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M gcc/testsuite/g++.dg/pph/x1hardlookup.cc View 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 3
Diego Novillo
This patch fixes the remaining assembly differences between non-pph and pph compiles. The idea is ...
12 years, 9 months ago (2011-07-14 23:04:39 UTC) #1
Gabriel Charette
Nice solution :)! A few things inline below: > + /* Read and process the ...
12 years, 9 months ago (2011-07-15 20:02:24 UTC) #2
Diego Novillo
12 years, 9 months ago (2011-07-15 21:18:26 UTC) #3
On Fri, Jul 15, 2011 at 16:02, Gabriel Charette <gchare@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.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b