Number of statements in a scop

5 views
Skip to first unread message

shil...@gmail.com

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

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 https://bugs.llvm.org/ 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'

Thanks,
Shilpa

Shilpa B

unread,
Jul 14, 2021, 2:48:28 PMJul 14
to re...@meinersbur.de, 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?

Thanks,
Shilpa


On Wed, Jul 14, 2021 at 1:06 AM Michael Kruse <Michae...@meinersbur.de> 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.

Michael



Am Di., 13. Juli 2021 um 12:26 Uhr schrieb shil...@gmail.com
<shil...@gmail.com>:
> --
> 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 polly-dev+...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/polly-dev/acb593a3-4229-46d4-ba44-6ba59ceef680n%40googlegroups.com.



--
Tardyzentrismus verboten!
myprog.c
script.sh

Shilpa B

unread,
Jul 15, 2021, 10:27:15 AMJul 15
to re...@meinersbur.de, 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.

Thanks,
Shilpa

On Thu, Jul 15, 2021 at 2:03 AM Michael Kruse <Michae...@meinersbur.de> 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.
Use:
        --polly-rtc-max-parameters=X
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
system.

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

Michael
> To view this discussion on the web, visit https://groups.google.com/d/msgid/polly-dev/CANj4kUdXMp0K3Q24U%2BEqU4j0q9easVJuozSLHmZ6CHMRQGnb2A%40mail.gmail.com.



--
Tardyzentrismus verboten!
Reply all
Reply to author
Forward
0 new messages