[OpenMPOpt][FIX] Avoid removing barriers in callees
authorJohannes Doerfert <johannes@jdoerfert.de>
Mon, 20 Mar 2023 23:01:39 +0000 (16:01 -0700)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 21 Mar 2023 00:44:24 +0000 (17:44 -0700)
commit8f47fd05d53f60be40a52d09df9dedc970bbafc5
treec9aba0d847428afe833d71a89ad07d8ebe1c7435
parentb89558a2ae4b5b20a6f3e8ba0295439f947fd38c
[OpenMPOpt][FIX] Avoid removing barriers in callees

We could be smarter about this, e.g., if the callee has a single call
site, but for now we first avoid the miscompile.
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
llvm/test/Transforms/OpenMP/barrier_removal.ll