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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org
           Keywords|                            |compile-time-hog

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The unroll and ivcanon issues are all from invoking
estimate_numbers_of_iterations which for each loop walks the whole loop body
(including conditionally executed parts) and on the signed IV increment
invokes infer_loop_bounds_from_signedness which performs SCEV analysis.

It's highly unlikely that there's useful info from stmts in inner loop
given we're looking for an evolution in the outer loop.

The code is also calling analyze_scalar_evolution with a loop that's not the
loop the stmt is in which might be a correctness issue.  idx_infer_loop_bounds
seems to do the correct thing here.

Possibly all SCEV analysis could be performed once and instantiated in the
outermost loop we're interested in.  That is, we'd walk the outermost loop
and fill in bounds for the whole subnest with a single IL walk.

While scalar evolutions are cached, the instantiations are not.

Reply via email to