Number of statements in a scop

Skip to first unread message

Jul 13, 2021, 1:26:56 PMJul 13
to Polly Development

I am using Polly with LLVM-11.0 version. I am observing that in my C programs when the number of statements in a for-loop is higher (20 and above), either the jscop files are not getting generated or the following error message is printed. However, everything works fine when the number of statements is lesser than 20. Is there any restriction on the number of statements in a scop?

Error message:
opt: /stor/shilpa/llvm_git/llvm-11.0/tools/polly/lib/Analysis/DependenceInfo.cpp:778: isl::noexceptions::union_map polly::Dependences::getDependences(int) const: Assertion `hasValidDependences() && "No valid dependences available"' failed.
PLEASE submit a bug report to and include the crash backtrace.
Stack dump:
0.    Program arguments: /stor/shilpa/llvm_git/build/bin/opt -basic-aa -polly-opt-isl -polly-import-jscop -polly-optimized-scops -polly-ast -polly-parallel -polly-parallel-force -analyze -mattr=+avx512f -mcpu=knl -polly-process-unprofitable mypgm.ll
1.    Running pass 'Function Pass Manager' on module 'mypgm.ll'.
2.    Running pass 'Region Pass Manager' on function '@kernel_function'
3.    Running pass 'Polly - Import Scops from JSON (Reads a .jscop file for each Scop)' on basic block '%for.body342'


Shilpa B

Jul 14, 2021, 2:48:28 PMJul 14
to, Polly Development
Hi Michael,

Thanks for the reply.
I am exporting and importing the same jscop file. I am attaching my C source file and the list of commands I am using to compile my program.
The source file has two functions, one to initialize the arrays and the kernel function. The statements in the kernel function may not represent any meaningful computation.
I observe that if I increase the number of statements in these two functions (by uncommenting the lines), the jscops do not get generated anymore.

Also, I want to know whether loop fission in Polly can be disabled?


On Wed, Jul 14, 2021 at 1:06 AM Michael Kruse <> wrote:
Do you have a reproducer?

Importing a jscop is fragile and would not recommend it. It is
intended for regression testing. However, exporting and importing the
same jscop should work, there is no artificial restriction on the
number of statements.


Am Di., 13. Juli 2021 um 12:26 Uhr schrieb
> --
> You received this message because you are subscribed to the Google Groups "Polly Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> To view this discussion on the web, visit

Tardyzentrismus verboten!

Shilpa B

Jul 15, 2021, 10:27:15 AMJul 15
to, Polly Development
Hi Michael,

Thank you so much for your help. I will try out the options you suggested and if required I will come back to you for more information. In any case, I will keep you posted.
And sorry about the reproducer. Setting the paths while shipping the file, must have slipped my mind.


On Thu, Jul 15, 2021 at 2:03 AM Michael Kruse <> wrote:
You hit a complexity limit (see -debug-only=polly-scops output):
NOTE: Run time checks for %for.cond1.preheader---%for.end333 could not
be created as the number of parameters involved is too high. The SCoP
will be dismissed.
to adjust the maximal number of parameters but be advised that the
compile time might increase exponentially.

Bailing-out because could not build alias checks

However, the message is misleading, there are a number of reasons why
this can happen. In your case, the option -polly-ignore-aliasing=1
will make it work, but produce incorrect code if any of the arrays are
indeed aliasing.

As a courtesy to someone who offers help for free, it would have been
nice if your reproducer was minimal (it contains two opt invocations
that import the jscop?) and does not refer to paths on your local

Fission can be partially disabled with -polly-stmt-granularity=bb
and/or -polly-opt-fusion=max

> To view this discussion on the web, visit

Tardyzentrismus verboten!
Reply all
Reply to author
0 new messages