[PATCH] Fix PR34334, make sure to add virtual operands for the fallback SMT itself

Richard Guenther rguenther@suse.de
Tue Dec 4 16:07:00 GMT 2007


On Tue, 4 Dec 2007, Richard Guenther wrote:

> On Tue, 4 Dec 2007, Richard Guenther wrote:
> 
> > Bootstrap and regtest on x86_64-unknown-linux-gnu in progress, I'll
> > apply this to mainline later.
> 
> It turns out that with the patch after the cfg_cleanup of the 
> array-prefetch pass an SSA update is required, else we hit
> 
> static void
> execute_todo (unsigned int flags)
> {
> #if defined ENABLE_CHECKING
>   if (need_ssa_update_p ())
>     gcc_assert (flags & TODO_update_ssa_any);
> #endif
> 
> on gcc.dg/prefetch-loop-arrays-1.c.
> 
> So I'll add the following hunk to the patch.

Whoops, instead we need to check whether opf_no_vops is set like so:

Index: tree-ssa-operands.c
===================================================================
*** tree-ssa-operands.c (revision 130600)
--- tree-ssa-operands.c (working copy)
*************** get_addr_dereference_operands (tree stmt
*** 1665,1672 ****
             to make sure to not prune virtual operands based on offset
             and size.  */
          if (v_ann->symbol_mem_tag)
!           add_virtual_operand (v_ann->symbol_mem_tag, s_ann, flags,
!                                full_ref, 0, -1, false);

          /* Aliasing information is missing; mark statement as  
             volatile so we won't optimize it out too actively.  */
--- 1665,1682 ----
             to make sure to not prune virtual operands based on offset
             and size.  */
          if (v_ann->symbol_mem_tag)
!           {
!             add_virtual_operand (v_ann->symbol_mem_tag, s_ann, flags,
!                                  full_ref, 0, -1, false);
!             /* Make sure we add the SMT itself.  */
!             if (!(flags & opf_no_vops))
!               {
!                 if (flags & opf_def)
!                   append_vdef (v_ann->symbol_mem_tag);
!                 else
!                   append_vuse (v_ann->symbol_mem_tag);
!               }
!           }

          /* Aliasing information is missing; mark statement as
             volatile so we won't optimize it out too actively.  */



More information about the Gcc-patches mailing list