[LLVMdev] Nested Loop Unrolling

Andrew Trick atrick at apple.com
Thu Jul 18 11:28:01 PDT 2013


On Jul 17, 2013, at 5:11 PM, Ali Javadi <aj14889 at yahoo.com> wrote:

> Hi,
> 
> In LLVM (using the opt tool), is it possible to force a nested loop be unrolled entirely? Something like a pass option?
> I have a nested loop with depth of 4, and all trip counts are known at compile time, but so far I've only been able to do this by 4 invocations of the -loop-simplify, -loop-rotate, -loop-unroll passes.

This has to do with the order that the LoopUnrollPass is applied to the loops. The unroll pass itself wouldn’t be able to control it.

The loop tree should be processed bottom-up, so nested loops should be fully unrolled. If you’re not seeing that for an obvious case, please file a bug.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130718/b9fc2a30/attachment.html>


More information about the llvm-dev mailing list