Unbreak bootstrap

Richard Guenther rguenther@suse.de
Wed Sep 5 09:22:00 GMT 2007

On Tue, 4 Sep 2007, Jan Hubicka wrote:

> > On 9/4/07, Jan Hubicka <jh@suse.cz> wrote:
> > > Hi,
> > > Richard's patch to remove volatile flag from loads broke tailcall code
> > > to update SSA form.  The following patch bootstrapped for me on
> > > x86_64-linux and I went ahead and comitted it as it is pretty obvious to
> > > unbreak testing...
> > 
> > Actually this patch does not make sense as what is failing is using
> > stage2's compiler so we must be miscompiling stage2 already.
> > Compiling stage2 is ok.  I might be better if we revert Richard's
> > patch until he figures out what is going wrong.
> Actually I think I know what is going wrong - the tailcall is checking
> for zero virtual operands to verify that it is safe to do the
> conversion.  Without alias info represented the statements might
> actually read from memory that is affected by the conversion.
> I agree that reverting both patches is way to go for now.

Obviously, if the 

2007-09-04  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.

change caused any problems then the following is necessary.  Which
disables DCE of loads completely of course. I'm now trying to reproduce
the failure.


Index: tree-ssa-operands.c
--- tree-ssa-operands.c	(revision 128123)
+++ tree-ssa-operands.c	(working copy)
@@ -1672,8 +1672,7 @@ get_indirect_ref_operands (tree stmt, tr
 	  /* Aliasing information is missing; mark statement as
 	     volatile so we won't optimize it out too actively.  */
-          else if (!gimple_aliases_computed_p (cfun)
-                   && (flags & opf_def))
+          else if (!gimple_aliases_computed_p (cfun))
             s_ann->has_volatile_ops = true;

More information about the Gcc-patches mailing list