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]

ping Re: [PATCH] PR/23048


ping

On Aug 10, 2005, at 11:39 AM, Devang Patel wrote:

While collapsing all basic blocks inside one loop, tree-if- conversion accidently removes latch. This happens when it is handed over following CFG for the example test case.

[0]---->[2]---->[3]---->[4]
       /\ |      |
        | |      |
        | \/     |
        [1]<-----+

There is not any easy way to collapse this into a loop with 2 blocks where [2] is loop-header. This patch updates tree-if- conversion to screen and avoid such loops.

PR tree-optimization/23048
* tree-if-conv.c (if_convertible_bb_p): Supply basic_block as third parameter.
Check whether latch is dominated by exit block or not.
(if_convertible_loop_p): Supply exit block itself to if_convertible_bb_p.


* gcc.dg/tree-ssa/pr23048.c: New.

:ADDPATCH SSA:
Bootstrapped and tested on powerpc-apple-darwin.

OK?
-
Devang


<pr23048.diff>



- Devang


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