Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Issue 22294002: Treat __sync_synchronize and asm("":::"memory") as stronger fences. (Closed)

Created:
7 years, 4 months ago by JF
Modified:
7 years, 4 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
http://git.chromium.org/native_client/pnacl-clang.git@master
Visibility:
Public.

Description

Treat __sync_synchronize and asm("":::"memory") as stronger fences. This is a companion patch to: https://codereview.chromium.org/22240002/ https://codereview.chromium.org/22474008/ and deals with the Clang-side of things. The above patch will handle the fallouts of this Clang patch, including some changes to un-duplicate work that RewriteAsmDirectives.cpp does. The goal of this patch is to force some extra ordering on non-atomics for le32 which LLVM doesn't necessarily provide. R=eliben@chromium.org TEST= ninja check-all BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475 BUG= https://code.google.com/p/nativeclient/issues/detail?id=3611 Committed: 3b1ef29

Patch Set 1 #

Total comments: 4

Patch Set 2 : Use TargetInfo/getTargetHooks as suggested by eliben. #

Total comments: 4

Patch Set 3 : Make isAsmMemory a member of InlineAsm as suggested by eliben. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -1 line) Patch
M lib/CodeGen/CGBuiltin.cpp View 1 2 chunks +24 lines, -1 line 0 comments Download
M lib/CodeGen/CGStmt.cpp View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M lib/CodeGen/TargetInfo.h View 1 1 chunk +22 lines, -0 lines 0 comments Download
M lib/CodeGen/TargetInfo.cpp View 1 1 chunk +2 lines, -0 lines 0 comments Download
A test/CodeGen/NaCl/atomics.c View 1 chunk +64 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
JF
7 years, 4 months ago (2013-08-05 21:35:38 UTC) #1
jvoung (off chromium)
https://codereview.chromium.org/22294002/diff/1/test/CodeGen/NaCl/atomics.c File test/CodeGen/NaCl/atomics.c (right): https://codereview.chromium.org/22294002/diff/1/test/CodeGen/NaCl/atomics.c#newcode11 test/CodeGen/NaCl/atomics.c:11: // CHECK-NEXT: call void asm sideeffect "", "~{memory}"() Downstream ...
7 years, 4 months ago (2013-08-05 23:17:07 UTC) #2
JF
https://codereview.chromium.org/22294002/diff/1/test/CodeGen/NaCl/atomics.c File test/CodeGen/NaCl/atomics.c (right): https://codereview.chromium.org/22294002/diff/1/test/CodeGen/NaCl/atomics.c#newcode11 test/CodeGen/NaCl/atomics.c:11: // CHECK-NEXT: call void asm sideeffect "", "~{memory}"() On ...
7 years, 4 months ago (2013-08-05 23:18:48 UTC) #3
eliben
Generally, we try hard to avoid Clang LOCALMODs. This needs to be upstreamed. There's also ...
7 years, 4 months ago (2013-08-06 16:26:56 UTC) #4
JF
Updated, PTAL. As asked, here's the issue (added to the CL description too): https://code.google.com/p/nativeclient/issues/detail?id=3611 https://codereview.chromium.org/22294002/diff/1/lib/CodeGen/CGBuiltin.cpp ...
7 years, 4 months ago (2013-08-07 17:58:28 UTC) #5
eliben
https://codereview.chromium.org/22294002/diff/9001/lib/CodeGen/CGStmt.cpp File lib/CodeGen/CGStmt.cpp (right): https://codereview.chromium.org/22294002/diff/9001/lib/CodeGen/CGStmt.cpp#newcode25 lib/CodeGen/CGStmt.cpp:25: #include "llvm/IR/NaClAsm.h" // @LOCALMOD This is a problem for ...
7 years, 4 months ago (2013-08-07 18:06:25 UTC) #6
JF
I made isAsmMemory a member of InlineAsm as suggested. https://codereview.chromium.org/22294002/diff/9001/lib/CodeGen/CGStmt.cpp File lib/CodeGen/CGStmt.cpp (right): https://codereview.chromium.org/22294002/diff/9001/lib/CodeGen/CGStmt.cpp#newcode25 lib/CodeGen/CGStmt.cpp:25: ...
7 years, 4 months ago (2013-08-07 19:48:12 UTC) #7
eliben
lgtm
7 years, 4 months ago (2013-08-07 20:36:34 UTC) #8
JF
7 years, 4 months ago (2013-08-07 22:50:48 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 manually as r3b1ef29 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698