[LLVMdev] How to make Polly ignore some non-affine memory accesses

Tobias Grosser
Fri, 07 Oct 2011 14:28:40 -0000

On 10/07/2011 03:25 PM, Marcello Maggioni wrote:
> Hi, I'd like to ask another thing about Polly and SCoP discarding.
>
> I've noticed that Polly discards quite simple loops like:
>
> for (int i = 1; i<  1000; i++) {}
>
> or
>
> for (int i= 0; i<  1000; i+=2) {}
>
> is this an intended behavior or there is some way to make it accept
> these kind of loops?

Hi Marcello,

can you provide complete test cases and explain how you run Polly. These
loop constructs contain nothing Polly cannot handle, but other parts of
your programs may block a detailed analysis. Furthermore, Polly relies
on LLVM preparing passes to canonicalize the code. If they
are not run beforehand than Polly will hardly detect any loops.

In your case I propose you attach the complete C and LLVM-IR files and
explain how you run Polly. I am sure I can help you with this.

Tobi