https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106511

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Macleod from comment #8)
> (In reply to Richard Biener from comment #2)
> > VRP could use max_stmt_executions here (note it doesn't properly handle loop
> > nests so the name is somewhat misleading)
> 
> Do you have to ask for max_stmt_executions on each loop nest for the stmt to
> get the real total?  and multiple them all together?  or can you only count
> on loop_outer()?

max_stmt_executions is for the loop you pass, not including outer loop
(or containing irreducible region) iterations.

The loop you usually pass is gimple_bb (stmt)->loop_father which is the
immediately containing loop.  This will be useful only when the PHI
we want to analyze is in the very same loop, if it is in an outer loop
then things become more complicated (you then could multiply by
max_loop_iterations of the containing loop maybe - but start simple ;))

Reply via email to