aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJF Bastien <jfb@chromium.org>2013-07-13 13:29:35 -0700
committerJF Bastien <jfb@chromium.org>2013-07-13 13:29:35 -0700
commit4c1316ea42eb48ec8da6753f3e0319b676e50a75 (patch)
tree7ad96b9cafa6c054d79d91b16e89f89b1eaee2c8 /tools
parentc75199c649c739aade160289d93f257edc798cde (diff)
Concurrency support for PNaCl ABI
Add portable support for concurrency in PNaCl's ABI: - Promote volatile to atomic. - Promote all memory ordering to sequential consistency. - Rewrite all atomic operations to frozen NaCl intrinsics for pexe. - Rewrite atomic intrinsics to LLVM instructions for translation. This change also adds documentation to the PNaCl language reference, as well as tests where it makes sense. A future CL could clean up more of our code which mentions atomics, volatiles, memory orderings. Multiple reviewers because this is a big patch: - eliben: LLVM-fu and ResolvePNaClIntrinsics. - dschuff: ABI stability. - mseaborn: ABI stability. - sehr: Tron-duty (fight for the user's programs to work). BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475 R=dschuff@chromium.org, eliben@chromium.org, sehr@google.com TEST= (cd ./pnacl/build/llvm_x86_64; ninja check-all) && ./pnacl/test.sh test-x86-32 && ./pnacl/test.sh test-x86-64 && ./pnacl/test.sh test-arm && ./pnacl/test.sh test-x86-32-sbtc && ./pnacl/test.sh test-x86-64-sbtc && ./pnacl/test.sh test-arm-sbtc Review URL: https://codereview.chromium.org/17777004
Diffstat (limited to 'tools')
-rw-r--r--tools/opt/opt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index c5405de902..7d5a7d3b7e 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -613,8 +613,8 @@ int main(int argc, char **argv) {
initializeExpandGetElementPtrPass(Registry);
initializeExpandSmallArgumentsPass(Registry);
initializeExpandStructRegsPass(Registry);
- initializeExpandTlsPass(Registry);
initializeExpandTlsConstantExprPass(Registry);
+ initializeExpandTlsPass(Registry);
initializeExpandVarArgsPass(Registry);
initializeFlattenGlobalsPass(Registry);
initializeGlobalCleanupPass(Registry);
@@ -626,6 +626,7 @@ int main(int argc, char **argv) {
initializeReplacePtrsWithIntsPass(Registry);
initializeResolveAliasesPass(Registry);
initializeResolvePNaClIntrinsicsPass(Registry);
+ initializeRewriteAtomicsPass(Registry);
initializeRewriteLLVMIntrinsicsPass(Registry);
initializeRewritePNaClLibraryCallsPass(Registry);
initializeStripAttributesPass(Registry);