Closed Quuxplusone closed 4 years ago
Bugzilla Link | PR43164 |
Status | RESOLVED FIXED |
Importance | P release blocker |
Reported by | Sylvestre Ledru (sylvestre@debian.org) |
Reported on | 2019-08-29 06:59:45 -0700 |
Last modified on | 2019-12-02 12:00:42 -0800 |
Version | unspecified |
Hardware | PC Linux |
CC | hans@chromium.org, llvm-bugs@lists.llvm.org, llvm@meinersbur.de, lukebenes@hotmail.com, tobias@grosser.es, tstellar@redhat.com |
Fixed by commit(s) | rL372188, rG1c4b5a8 |
Attachments | |
Blocks | PR43360 |
Blocked by | |
See also |
I think this is showing up too late to block the release on.
It might be a good candidate for 9.0.1.
I bisected this regression to
http://llvm.org/viewvc/llvm-project?view=revision&revision=362257
[ScheduleOptimizer] Hoist extension nodes after schedule optimization.
Michael Kruse,
Could you please take a look at this?
The change "causes" that SCoPs with extension nodes (in particular introduced by the matrix-matrix multiplication detection) can now be parallelized. The parallel outlining does not handle "copy statements" that have been added using those extension nodes.
I already have patch in the works. I am currently on a conference so not the fastest atm.
Should be fixed in r372188.
Reopening to track merging to 9.0.1.
Michael, Is this safe to merge:
(In reply to Tom Stellard from comment #6)
> Michael, Is this safe to merge:
>
> https://reviews.llvm.org/rL372188
Yes
Merged: 1c4b5a8
Michael,
After your fix r372188, the crash has been fixed, but the reproducer still
fails to build with the following error:
$ clang -O3 -mllvm -polly foo.c
$ clang -O3 -mllvm -polly -mllvm -polly-parallel foo.c
/tmp/foo-5793f3.o: In function `main':
foo.c:(.text+0xe4): undefined reference to `GOMP_parallel_loop_runtime_start'
foo.c:(.text+0xf1): undefined reference to `GOMP_parallel_end'
...
foo.c:(.text+0x2ae): undefined reference to `GOMP_parallel_loop_runtime_start'
foo.c:(.text+0x2bb): undefined reference to `GOMP_parallel_end'
/tmp/foo-5793f3.o: In function `main_polly_subfn':
foo.c:(.text+0x2e7): undefined reference to `GOMP_loop_runtime_next'
foo.c:(.text+0x3f3): undefined reference to `GOMP_loop_runtime_next'
foo.c:(.text+0x408): undefined reference to `GOMP_loop_end_nowait'
/tmp/foo-5793f3.o: In function `main_polly_subfn_1':
...
/tmp/foo-5793f3.o: In function `main_polly_subfn_4':
foo.c:(.text+0x739): undefined reference to `GOMP_loop_runtime_next'
foo.c:(.text+0xa61): undefined reference to `GOMP_loop_runtime_next'
foo.c:(.text+0xa6e): undefined reference to `GOMP_loop_end_nowait'
clang-10: error: linker command failed with exit code 1 (use -v to see
invocation)
$ clang --version
clang version 10.0.0 (https://github.com/llvm/llvm-project.git
241b02e762872173dcb5bd27ff9fe3eb7dce1db2)
This issue persists in current master: 19fd8925a4afe6efd248688cce06aceff50efe0c
Could you please look into this?
Polly uses the OpenMP library for parallelism, hence it must added to the linker: either -lgomp or -lomp.
Michael,
Yes,-lgomp fixes the linker error in Clang 10. The last working commit,
r362256, neither -lgomp nor -lomp were required for a successful build. Is this
change in behavior expected?
This is because Polly could not parallelize this before r362257. Without parallelization, no OpenMP needed.