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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
FRE adjusts nb_iterations:

      /* Keep fields in sync with substitute_in_loop_info.  */
      if (bb->loop_father->nb_iterations)
        bb->loop_father->nb_iterations
          = simplify_replace_tree (bb->loop_father->nb_iterations,
                                   NULL_TREE, NULL_TREE, &vn_valueize_for_srt);

iff we'd free all of the info we no longer would need to do that.  Note that
FRE in the fast mode is also used region-based where the consumer should
be responsible for clearing caches to keep that O(region-size).  In that mode
the above might still be useful/required.

Keeping the SCEV cache / the number of iterations computed is a compile-time
optimization.

Reply via email to