-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
Description:
While analysing the Spatter Benchmark for possible optimizations, we came across a conflict with llvm-opt-report. We focus on the loops contained in openmp_kernels.c.
- Compilers Clang 14.0.0 and Clang 13.0.1
- Sources are from https://github.com/hpcgarage/spatter
- Branch: master
- Commit: a9878dc916e77590b99f76c94bdc1606570bd78c.
Issue:
After compiling the original code with the option -fsave-optimization-record
and -march=armv8.4-a+sve
we could visualize the openmp_kernels.opt.yaml
file correctly using the llvm-opt-report
tool.
When the OpenMP #pragma omp simd
is added in the source code (just before each inner loop of the openmp_kernels.c
file), the files generated by clang 13.0.1 and clang 14.0.0, contain empty parameters. It causes the reader llvm-opt-report
to not be able to parse the files:
error: YAML:4830:1: error: Type, Pass, Name or Function missing.
Pass: ''
^
Steps to reproduce:
$ git clone https://github.com/hpcgarage/spatter.git
$ cd spatter
$ git checkout a9878dc916e77590b99f76c94bdc1606570bd78c
copy the configure_omp_clang
file in ./configure/
configure_omp_clang.txt
to change the ./src/openmp/openmp_kernels.c
: put the openmp_kernels.patch
in /spatter
openmp_kernels.patch.txt
$ patch -p1 < openmp_kernels.patch
$ ./configure/configure_omp_clang
$ cd build_omp_clang/
$ make
$ cd ..
$ llvm-opt-report build_omp_clang/CMakeFiles/spatter.dir/src/openmp/openmp_kernels.c.opt.yaml