[PATCH] D123531: [GlobalsModRef][FIX] Ensure we honor synchronizing effects of intrinsics

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 11:38:50 PDT 2022


jdoerfert updated this revision to Diff 421988.
jdoerfert added a comment.

Clang format


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123531/new/

https://reviews.llvm.org/D123531

Files:
  llvm/lib/Analysis/GlobalsModRef.cpp


Index: llvm/lib/Analysis/GlobalsModRef.cpp
===================================================================
--- llvm/lib/Analysis/GlobalsModRef.cpp
+++ llvm/lib/Analysis/GlobalsModRef.cpp
@@ -533,7 +533,8 @@
           FI.addModRefInfo(ModRefInfo::ModRef);
           if (!F->onlyAccessesArgMemory())
             FI.setMayReadAnyGlobal();
-          if (!F->isIntrinsic()) {
+          // Intrinsics, like any other synchronizing function, can make effects of other threads visible. Without nosync we know nothing really.
+          if (!F->hasNoSync()) {
             KnowNothing = true;
             break;
           }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123531.421988.patch
Type: text/x-patch
Size: 626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220411/337bb165/attachment.bin>


More information about the llvm-commits mailing list