[PATCH] Re-install not setting has_volatile_ops for loads pre-aliasing

Richard Guenther rguenther@suse.de
Sun Sep 9 16:42:00 GMT 2007


As I fixed the tailcall fallout on the other day (fixing my bootstrap
problems on i686).  The testcase is for the tail-recursion ICE
fixed by the tailcall patch.

Bootstrapped and tested on x86_64-unknown-linux-gnu and 
i686-pc-linux-gnu, applied to mainline.

Richard.


2007-09-09  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.c (add_virtual_operand): Only mark
	stores as has_volatile_ops if alias information is not available.

	* gcc.c-torture/compile/20070906-1.c: New testcase.

Index: gcc/tree-ssa-operands.c
===================================================================
*** gcc/tree-ssa-operands.c	(revision 128037)
--- gcc/tree-ssa-operands.c	(working copy)
*************** add_virtual_operand (tree var, stmt_ann_
*** 1494,1500 ****
  
    if (aliases == NULL)
      {
!       if (!gimple_aliases_computed_p (cfun))
          s_ann->has_volatile_ops = true;
  
        /* The variable is not aliased or it is an alias tag.  */
--- 1494,1501 ----
  
    if (aliases == NULL)
      {
!       if (!gimple_aliases_computed_p (cfun)
! 	  && (flags & opf_def))
          s_ann->has_volatile_ops = true;
  
        /* The variable is not aliased or it is an alias tag.  */
Index: gcc/testsuite/gcc.c-torture/compile/20070906-1.c
===================================================================
*** gcc/testsuite/gcc.c-torture/compile/20070906-1.c	(revision 0)
--- gcc/testsuite/gcc.c-torture/compile/20070906-1.c	(revision 0)
***************
*** 0 ****
--- 1,8 ----
+ struct Bar {
+   int i[8];
+ };
+ struct Bar foo(struct Bar **p)
+ {
+   return foo((struct Bar**)*p);
+ }
+ 



More information about the Gcc-patches mailing list