This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lto] set alias info, poorly

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.


2007-12-06  Nathan Froyd  <>

	* 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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]