This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Remove loop notes (5/8) -- sh.c


Hello,

> >>>I have also attached a complete replacement for the heuristics.
> >>>     
> >>>
> >
> >to the mail in that I submitted the patch.
> > 
> >
> Sorry, I missed that because there was exactly one ChangeLog entry, 
> which did
> not describe the replacement.
> 
> I wouldn't call it a complete replacement, although the infrastructure 
> appears useful
> to implement one.
>  
> If I understand your comment correctly, the function will
> return 1 for any loop with any control flow inside.

that comment is a bit missleading.  It will return 1 for loops with more
than 4 labels, and for loops with shared header (in this case it is not
possible to determine whether this corresponds to a subloop or just
conditional code inside loop).  I.e. it basically precisely does what it
did before, except for some corner cases.

> I think my approach using bb->frequency comes closer to 
> implementing
> the intended heuristics.

Use whatever you like, I do not really care.

> If I understand correctly, the get_blocks_between function will get all 
> the nodes of the
> outermost loop if an outer and an inner loop / inner loops share headers?

get_blocks_between function will return the body of the loop with the
given header and latch blocks.  So loops with shared header need to be
handled separately.

Zdenek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]