[Openmp-commits] [openmp] 80906ce - [OpenMP] Disable early vectorization of loads/stores in the runtime
Johannes Doerfert via Openmp-commits
openmp-commits at lists.llvm.org
Wed Aug 23 15:14:30 PDT 2023
Author: Johannes Doerfert
Date: 2023-08-23T15:14:14-07:00
New Revision: 80906ce48d5bb28e06d0a113e7d62eb1358c8ecc
URL: https://github.com/llvm/llvm-project/commit/80906ce48d5bb28e06d0a113e7d62eb1358c8ecc
DIFF: https://github.com/llvm/llvm-project/commit/80906ce48d5bb28e06d0a113e7d62eb1358c8ecc.diff
LOG: [OpenMP] Disable early vectorization of loads/stores in the runtime
We are having a hard time optimizing some vectorized loads/stores later
on which causes this optimization to degrade performance.
Differential Revision: https://reviews.llvm.org/D158656
Added:
Modified:
openmp/libomptarget/DeviceRTL/CMakeLists.txt
Removed:
################################################################################
diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
index 9615657a3d2721..47cb2fda077020 100644
--- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
@@ -109,8 +109,14 @@ set(src_files
${source_directory}/Workshare.cpp
)
-set(clang_opt_flags -O3 -mllvm -openmp-opt-disable -DSHARED_SCRATCHPAD_SIZE=512)
-set(link_opt_flags -O3 -openmp-opt-disable -attributor-enable=module)
+# We disable the slp vectorizer during the runtime optimization to avoid
+# vectorized accesses to the shared state. Generally, those are "good" but
+# the optimizer pipeline (esp. Attributor) does not fully support vectorized
+# instructions yet and we end up missing out on way more important constant
+# propagation. That said, we will run the vectorizer again after the runtime
+# has been linked into the user program.
+set(clang_opt_flags -O3 -mllvm -openmp-opt-disable -DSHARED_SCRATCHPAD_SIZE=512 -mllvm -vectorize-slp=false )
+set(link_opt_flags -O3 -openmp-opt-disable -attributor-enable=module -vectorize-slp=false )
set(link_export_flag -passes=internalize -internalize-public-api-file=${source_directory}/exports)
# Prepend -I to each list element
More information about the Openmp-commits
mailing list