On Tue, 29 Oct 2019, Bernhard Reutner-Fischer wrote:

> On 29 October 2019 10:36:47 CET, Richard Biener <rguent...@suse.de> wrote:
> >On Tue, 29 Oct 2019, Bernhard Reutner-Fischer wrote:
> >
> 
> 
> >Unfortunately it's not semantically equivalent ;)  I could indeed
> >break once cnt reaches 2 but not sure if it's worth the ugliness ;)
> 
> I managed to read cnt == 1 ;) So yep, not worth it.
> 
> >> btw, it seems there are two typos in the docs.
> >BREAK_FROM_SAFE_IMM_USE
> >> was removed 2006-04-27, and "iter" should be "iterator":
> >> 
> >> diff --git a/gcc/doc/tree-ssa.texi b/gcc/doc/tree-ssa.texi
> >> index 9baabf99440..97a7b8e0263 100644
> >> --- a/gcc/doc/tree-ssa.texi
> >> +++ b/gcc/doc/tree-ssa.texi
> >> @@ -392,7 +392,7 @@ to do this :
> >>    FOR_EACH_IMM_USE_STMT (stmt, iterator, ssa_var)
> >>      @{
> >>        if (stmt == last_stmt)
> >> -        BREAK_FROM_SAFE_IMM_USE (iter);
> >> +        BREAK_FROM_IMM_USE_STMT (iterator);
> >>  
> >>        FOR_EACH_IMM_USE_ON_STMT (imm_use_p, iterator)
> >>          SET_USE (imm_use_p, ssa_var_2);
> >> 
> >
> >That change is OK as obvious if you want to fix it ;)
> 
> My tree is way old ATM so if one of you folks could do the honours I'd be 
> grateful.

Looks like the macro was already fixed.  Fixed the iterator.

Committed.

Richard.

2019-10-29  Richard Biener  <rguent...@suse.de>

        * doc/tree-ssa.texi (Immediate Uses): Fix FOR_EACH_IMM_USE_STMT
        example.

Index: gcc/doc/tree-ssa.texi
===================================================================
--- gcc/doc/tree-ssa.texi       (revision 277567)
+++ gcc/doc/tree-ssa.texi       (working copy)
@@ -392,7 +392,7 @@ to do this :
   FOR_EACH_IMM_USE_STMT (stmt, iterator, ssa_var)
     @{
       if (stmt == last_stmt)
-        BREAK_FROM_IMM_USE_STMT (iter);
+        BREAK_FROM_IMM_USE_STMT (iterator);
 
       FOR_EACH_IMM_USE_ON_STMT (imm_use_p, iterator)
         SET_USE (imm_use_p, ssa_var_2);

Reply via email to