public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pph] Add cp_global_trees to cache in preload (issue4635077)
@ 2011-06-28 20:38 Gabriel Charette
  2011-06-28 20:45 ` Diego Novillo
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Charette @ 2011-06-28 20:38 UTC (permalink / raw)
  To: reply, crowl, dnovillo, gcc-patches

Add the cp_global_trees to the cache during the preload.

Those are preconstructed trees which we only need the pointers to (i.e. they should be identical in both the .cc and .h)

One exception to this is the keyed_classes tree which is generated during parsing.

We will need to merge the keyed_classes tree eventually when working with multiple pph's.

2011-06-28  Gabriel Charette  <gchare@google.com>

	* pph-streamer.c (pph_preload_common_nodes):
	Add cp_global_trees[] to cache.

	* g++.dg/pph/x1typerefs.cc: Remove xfail.

diff --git a/gcc/cp/pph-streamer.c b/gcc/cp/pph-streamer.c
index e919baf..c62864a 100644
--- a/gcc/cp/pph-streamer.c
+++ b/gcc/cp/pph-streamer.c
@@ -79,6 +79,17 @@ pph_preload_common_nodes (struct lto_streamer_cache_d *cache)
     if (c_global_trees[i])
       lto_streamer_cache_append (cache, c_global_trees[i]);
 
+  /* cp_global_trees[] can have NULL entries in it.  Skip them.  */
+  for (i = 0; i < CPTI_MAX; i++)
+    {
+      /* Also skip trees which are generated while parsing.  */
+      if (i == CPTI_KEYED_CLASSES)
+	continue;
+
+      if (cp_global_trees[i])
+	lto_streamer_cache_append (cache, cp_global_trees[i]);
+    }
+
   lto_streamer_cache_append (cache, global_namespace);
 }
 
diff --git a/gcc/testsuite/g++.dg/pph/x1typerefs.cc b/gcc/testsuite/g++.dg/pph/x1typerefs.cc
index ba7580f..6aa0e96 100644
--- a/gcc/testsuite/g++.dg/pph/x1typerefs.cc
+++ b/gcc/testsuite/g++.dg/pph/x1typerefs.cc
@@ -1,6 +1,3 @@
-// { dg-xfail-if "BOGUS" { "*-*-*" } { "-fpph-map=pph.map" } }
-// { dg-bogus "c1typerefs.h:11:18: error: cannot convert 'const std::type_info.' to 'const std::type_info.' in initialization" "" { xfail *-*-* } 0 }
-
 #include "x1typerefs.h"
 
 int derived::method() {

--
This patch is available for review at http://codereview.appspot.com/4635077

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pph] Add cp_global_trees to cache in preload (issue4635077)
  2011-06-28 20:38 [pph] Add cp_global_trees to cache in preload (issue4635077) Gabriel Charette
@ 2011-06-28 20:45 ` Diego Novillo
  0 siblings, 0 replies; 3+ messages in thread
From: Diego Novillo @ 2011-06-28 20:45 UTC (permalink / raw)
  To: Gabriel Charette; +Cc: reply, crowl, gcc-patches

On Tue, Jun 28, 2011 at 15:23, Gabriel Charette <gchare@google.com> wrote:

> 2011-06-28  Gabriel Charette  <gchare@google.com>
>
>        * pph-streamer.c (pph_preload_common_nodes):
>        Add cp_global_trees[] to cache.
>
>        * g++.dg/pph/x1typerefs.cc: Remove xfail.

OK.


Diego.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pph] Add cp_global_trees to cache in preload (issue4635077)
@ 2011-06-28 21:12 gchare
  0 siblings, 0 replies; 3+ messages in thread
From: gchare @ 2011-06-28 21:12 UTC (permalink / raw)
  To: crowl, dnovillo; +Cc: gcc-patches, reply

Commited as r175595.

http://codereview.appspot.com/4635077/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-28 19:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-28 20:38 [pph] Add cp_global_trees to cache in preload (issue4635077) Gabriel Charette
2011-06-28 20:45 ` Diego Novillo
2011-06-28 21:12 gchare

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