error running Polly example

62 views
Skip to first unread message

Rohan Rayan

unread,
May 3, 2022, 2:58:33 AM5/3/22
to Polly Development
Hello All


I am not able to show the scops detected by polly.

Command: opt -polly-ast -analyze -q matmul.preopt.ll -polly-process-unprofitable
Error:  opt: Unknown command line argument '-analyze'.  Try: 'opt --help'

I looked at opt --help and there is no flag -analyze

Thanks in advance

Michael Kruse

unread,
May 3, 2022, 12:35:54 PM5/3/22
to Rohan Rayan, Polly Development
The `-analyze` flag has been removed in
https://github.com/llvm/llvm-project/commit/df0b893d94e69856754a4247a44fd97d4a69b001.
You can get the same output with `-polly-print-ast -disable-output`
instead of `-analyze -polly-ast`.

Michael
> --
> 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/04501ce5-496b-4e1c-917a-e1b02e3fc2ban%40googlegroups.com.



--
Tardyzentrismus verboten!

Rohan Rayan

unread,
May 4, 2022, 1:30:03 AM5/4/22
to Polly Development
Hello Michael 

Thanks again for the reply.

I ran the following command. It didnt give any errors this time but it didnt give any output either.

Command: ./llvm-project/build/bin/opt -polly-ast -polly-print-ast -disable-output matmul.preopt.ll -polly-process-unprofitable

I also get errors when trying to get the graphical representation of scops using the following command

Command: ./llvm-project/build/bin/opt -view-scops -disable-output matmul.preopt.ll
Error: ./llvm-project/build/bin/opt: unknown pass name 'view-scops'

 The version of opt I am using is:

LLVM (http://llvm.org/):
  LLVM version 15.0.0git
  Optimized build with assertions.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: skylake

Again (like for the GPU code generation), is it better for me to revert to a previous commit so that I can get the examples to work? Or is there updated documentation somewhere on how to get started for the latest version?

Thanks

Michael Kruse

unread,
May 9, 2022, 6:45:23 PM5/9/22
to Rohan Rayan, Polly Development
The documentation is unfortunately out of date. I still hope to find a
beginner volunteer who knows best what they need to understand and can
update it. At the moment a lot is changing because of the transition
to the new pass manager.

If there is no output it means that no Scops have been optimized. For
instance a common problem is that clang without optimization level
emits "noopt" into the .ll file skipping all optimizations.
For instance, what I get:
```
$ ./opt -polly-ast -polly-print-ast -disable-output matmul.preopt.ll
-polly-process-unprofitable
Printing analysis 'Polly - Generate an AST from the SCoP (isl)' for
region: 'for.cond1.preheader => for.end28' in function 'kernel_gemm':
Printing analysis 'Polly - Generate an AST of the SCoP
(isl)'for.cond1.preheader => for.end28' in function 'kernel_gemm':
:: isl ast :: kernel_gemm :: %for.cond1.preheader---%for.end28

if (p_0 <= 1024 && p_1 <= 1024 && (&MemRef4[p_1 - 1][p_0] <=
&MemRef0[0][0] || &MemRef0[p_2 - 1][p_0] <= &MemRef4[0][0]) &&
(&MemRef2[p_2 - 1][p_1] <= &MemRef0[0][0] || &MemRef0[p_2 - 1][p_0] <=
&MemRef2[0][0]))

// Loop with Metadata
for (int c0 = 0; c0 < p_2; c0 += 1) {
// Loop with Metadata
for (int c1 = 0; c1 < p_0; c1 += 1) {
Stmt2(c0, c1);
// Loop with Metadata
for (int c2 = 0; c2 < p_1; c2 += 1)
Stmt4(c0, c1, c2);
}
}

else
{ /* original code */ }
```

Options to print what is going on include `-debug`,
`-polly-print-detect`, `-polly-print-scops`, `-polly-report` and `O3
-polly -polly-show`.

Michael
> To view this discussion on the web, visit https://groups.google.com/d/msgid/polly-dev/1859f2ae-6120-417e-aecf-2b88e3df0d61n%40googlegroups.com.



--
Tardyzentrismus verboten!

Divya Rathore

unread,
Jun 4, 2023, 5:44:02 AM6/4/23
to Polly Development
Hi All

Is there any follow-up with the new changes?

Regards
Divya

Reply all
Reply to author
Forward
0 new messages