public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [lto] set alias info, poorly
@ 2007-12-06 22:29 Nathan Froyd
  2007-12-07 10:47 ` Richard Guenther
  0 siblings, 1 reply; 9+ messages in thread
From: Nathan Froyd @ 2007-12-06 22:29 UTC (permalink / raw)
  To: gcc-patches; +Cc: zadeck

First, the good news about this patch: it fixes a few failing testcases.

The bad news is that it does it with a very heavy hammer.  We say that
every type can alias every other type.  Obviously this wreaks havoc with
all the clever alias analysis that has gone into GCC over the years.

There are better, cleverer, more involved ways that you could fix this.
But this demonstrably works right now.  Ideas on what to do in the
future welcome.

Committed to the LTO branch.

-Nathan

2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.

Index: lto.c
===================================================================
--- lto.c	(revision 130663)
+++ lto.c	(working copy)
@@ -3253,7 +3253,13 @@ lto_read_DIE (lto_info_fd *fd, lto_conte
 	  /* If this DIE refers to a type, cache the value so that future
 	     references to the type can be processed quickly.  */
 	  if (val && TYPE_P (val))
-	    lto_cache_store_DIE (fd, die, val);
+	    {
+	      /* In the absence of a better solution, say that we alias
+		 everything FIXME.  */
+	      TYPE_ALIAS_SET (val) = 0;
+
+	      lto_cache_store_DIE (fd, die, val);
+	    }
 
           context->skip_non_parameters = saved_skip_non_parameters;
 	}

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

end of thread, other threads:[~2007-12-10 21:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-06 22:29 [lto] set alias info, poorly Nathan Froyd
2007-12-07 10:47 ` Richard Guenther
2007-12-07 10:59   ` Jakub Jelinek
2007-12-10 13:55     ` Kenneth Zadeck
2007-12-10 19:55       ` Toon Moene
2007-12-10 20:02         ` Kenneth Zadeck
2007-12-10 20:09           ` Richard Guenther
2007-12-10 20:49             ` Kenneth Zadeck
2007-12-10 21:00               ` Richard Guenther

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