[LLVMdev] LoopInfo are not able to identify some natural loops?
bwu at cs.wm.edu
Sat Apr 30 06:52:25 PDT 2011
In C code, if a loop is not a natural loop, that means its loop body should
at least have one label, right? In that case, some BB out of the loop can
jump to the loop body, so the loop has more than on entry.
Does LoopInfo guarantee to identify all natural loops? This property is very
important for my pass.
On Fri, Apr 29, 2011 at 11:50 PM, Cameron Zwarich <zwarich at apple.com> wrote:
> A natural loop is one whose header dominates all of the nodes in the loop.
> There is probably some block outside of the loop jumping to a block in the
> loop body.
> On Apr 29, 2011, at 7:43 PM, Bo Wu <bwu at cs.wm.edu> wrote:
> I found that some loops can not be identified by LoopInfo pass. For
> example, the loop at line 3094 of rdopt.c of benchmark 464.h264ref from spec
> cpu2006 is not a loop or a child (pr grandchild) of any loop in the loop
> list generated by LoopInfo pass. The documentation of LoopInfo says that it
> identifies natural loops, who have exactly one entry point. But the IR of
> this loops shows that it's header only has one BB in preds. Does that mean
> LoopInfo can not identify some natural loops?
> Bo Wu
> Ph.D. student
> CAPS group
> Computer Science Department
> The College of William & Mary
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu <http://llvm.cs.uiuc.edu>
Computer Science Department
The College of William & Mary
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev