[LLVMdev] Unnatural loops with O0
Marc de Kruijf
dekruijf at cs.wisc.edu
Thu Feb 12 06:58:52 PST 2009
Hi Chris,
Is there a compelling reason why llvm-gcc does not always produce natural
loops. Is it a code size issue, or are there performance implications as
well? I am seeing a simple 'while' loop compiled to an unnatural loop,
without any gotos, breaks, or continues. What is the reason for this?
Marc
On Wed, Feb 11, 2009 at 6:51 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Feb 11, 2009, at 1:13 PM, Marc de Kruijf wrote:
>
> > I am reviving this thread because I am seeing the same thing
> > (unnatural loops produced by llvm-gcc), but it is not limited to -O0
> > -- I am seeing it for -O2 and -O3 as well.
> > Some of my research work is relying on LoopInfo to provide loop
> > information for all loops, but it is missing these loops. Is there
> > any work in the pipeline that aims to fix this?
>
> Not that I know of. There has been a project on the open projects
> list to write a pass that converts all loops to natural loops (through
> code duplication). That would be a nice and self-contained project if
> anyone is interested.
>
> -Chris
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090212/6364bba2/attachment.html>
More information about the llvm-dev
mailing list