This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Disable early vectorization of loads/stores in the runtime
ClosedPublic

Authored by jdoerfert on Aug 23 2023, 11:49 AM.

Details

Summary

We are having a hard time optimizing some vectorized loads/stores later
on which causes this optimization to degrade performance.

Diff Detail

Event Timeline

jdoerfert created this revision.Aug 23 2023, 11:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 11:49 AM
jdoerfert requested review of this revision.Aug 23 2023, 11:49 AM
jhuber6 accepted this revision.Aug 23 2023, 11:54 AM

This pass will get run eventually when it's linked into the user code, so this should be fine.

openmp/libomptarget/DeviceRTL/CMakeLists.txt
112–119

This new flag's presence is a little esoteric, maybe add a comment saying why it's there.

This revision is now accepted and ready to land.Aug 23 2023, 11:54 AM
jdoerfert added inline comments.Aug 23 2023, 11:56 AM
openmp/libomptarget/DeviceRTL/CMakeLists.txt
112–119

Will add:

# 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 during LTO.
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 3:14 PM