This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: IPA merge: make fixup_cfg to deal with SSA


> Jan Hubicka <jh@suse.cz> writes:
> 
> > Actually I just noticed I amanged to pick wrong version of patch while
> > comitting.  The attached patch (bootstrapped/regtested i686-linux)
> > compensate that and my apologizes for the noise.
> 
> Doesn't bootstrap on ia64.
> 
> /tmp/cvs/gcc-20070105/Build/./prev-gcc/xgcc -B/tmp/cvs/gcc-20070105/Build/./prev-gcc/ -B/tmp/cvs/gcc-20070105/Build/root/ia64-suse-linux/bin/ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"zlib\" -DVERSION=\"1.1.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_MEMCPY=1 -DHAVE_STRERROR=1 -DHAVE_UNISTD_H=1  -I. -I../../zlib     -g -O2 -c -o libz_a-trees.o `test -f 'trees.c' || echo '../../zlib/'`trees.c
>  IMM ERROR : (use_p : tree - 0x2000000000974330:0x20000000007a76f0)2
> for SSA_NAME: tree_11 in statement:

Hi,
there is interesting memory corruption related to inliner's folding not
updating statements that has changed their operands.  I am testing the
attached patch, hopefully it will help for ia-64 too.

	* tree-inline.c (fold_marked_statements): After folding update
	operand caches and EH info.
Index: tree-inline.c
===================================================================
--- tree-inline.c	(revision 120468)
+++ tree-inline.c	(working copy)
@@ -2597,7 +2597,15 @@ fold_marked_statements (int first, struc
 	for (bsi = bsi_start (BASIC_BLOCK (first));
 	     !bsi_end_p (bsi); bsi_next (&bsi))
 	  if (pointer_set_contains (statements, bsi_stmt (bsi)))
-	    fold_stmt (bsi_stmt_ptr (bsi));
+	    {
+	      tree old_stmt = bsi_stmt (bsi);
+	      if (fold_stmt (bsi_stmt_ptr (bsi)))
+		{
+		  update_stmt (bsi_stmt (bsi));
+		  if (maybe_clean_or_replace_eh_stmt (old_stmt, bsi_stmt (bsi)))
+		     tree_purge_dead_eh_edges (BASIC_BLOCK (first));
+		}
+	    }
       }
 }
 


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