[OpenMP] Merge barrier elimination into AAExecutionDomain
authorJohannes Doerfert <johannes@jdoerfert.de>
Wed, 14 Dec 2022 23:08:35 +0000 (15:08 -0800)
committerJohannes Doerfert <johannes@jdoerfert.de>
Mon, 23 Jan 2023 00:34:59 +0000 (16:34 -0800)
commit43c1c59f7388da6cc0687095aa93497f3d1d510d
treea6a77eaea47137c873692a5fdc909a88d94c19e2
parente5f746e9bb61f06d273c629a06eb598abfbcedc3
[OpenMP] Merge barrier elimination into AAExecutionDomain

With this patch we track aligned barriers in AAExecutionDomain and also
delete unnecessary barriers there. This allows us to eliminate barriers
across blocks, across functions, and in the presence of complex accesses
that do not force a barrier. Further, we can use the collected
information to enable store-load forwarding in a threaded environment
(follow up patch).

Differential Revision: https://reviews.llvm.org/D140463
16 files changed:
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
llvm/test/Transforms/Attributor/reduced/openmp_opt_dont_follow_gep_without_value.ll
llvm/test/Transforms/OpenMP/barrier_removal.ll
llvm/test/Transforms/OpenMP/deduplication_target.ll
llvm/test/Transforms/OpenMP/heap-to-shared-missing-declarations.ll
llvm/test/Transforms/OpenMP/internals_cgscc.ll
llvm/test/Transforms/OpenMP/reduced_pointer_info_assertion.ll
llvm/test/Transforms/OpenMP/remove_globalization.ll
llvm/test/Transforms/OpenMP/replace_globalization.ll
llvm/test/Transforms/OpenMP/spmdization.ll
llvm/test/Transforms/OpenMP/spmdization_guarding_two_reaching_kernels.ll
llvm/test/Transforms/OpenMP/spmdization_no_guarding_two_reaching_kernels.ll
llvm/test/Transforms/OpenMP/value-simplify-openmp-opt.ll