This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Loop optimizer]: Add logic to disable certain loop optimizations on pre-/post-loops
Hi,
> >hmmm.... I forgot about this. OK, I withdraw my objection against the patch, although
> >I would suggest the following changes:
> >-- rename BB_PRE_POST_LOOP_HEADER to something like BB_HEADER_OF_NONROLLING_LOOP,
>
> Thanks. I will do this.
>
> >-- in estimate_numbers_of_iterations_loop, for loops with this flags use
> > record_niter_bound (loop, double_int_two, true, false)
> > to make tree-level loop optimizations know that the loop does not roll,
> >-- the check for the flag in loop_prefetch_arrays should not be needed, then.
> >Zdenek
>
> I have a new idea about this. How about, "if the flag is ON, we consider the loop as "optimize for size"")?
> In this way, we will consider the loop as a cold area and turn off related optimizations on it.
yes, modifying optimize_loop_for_size_p is also a good idea,
Zdenek