This is the mail archive of the gcc@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: a question regarding ifcvt.c


Tehila Meyzels <TEHILA@il.ibm.com> writes:

> I'd like to get an explanation why ifcvt.c checks whether 1 of the 2
> successors of the IF-header block has a stmt that exits from the loop?
> Why does it prevent the if-conversion?
> I'm referring to the following code:
> 
> /* Nor exit the loop.  */
>   if ((then_edge->flags & EDGE_LOOP_EXIT)
>       || (else_edge->flags & EDGE_LOOP_EXIT))
>     return NULL;

I think it's just a heuristic.  If one of the edges exits the loop,
then it is probably a loop-exit test, and it is quite unlikely that we
can do any useful if-conversion.

Ian


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