diff options
author | JF Bastien <jfb@chromium.org> | 2013-07-13 13:29:35 -0700 |
---|---|---|
committer | JF Bastien <jfb@chromium.org> | 2013-07-13 13:29:35 -0700 |
commit | 4c1316ea42eb48ec8da6753f3e0319b676e50a75 (patch) | |
tree | 7ad96b9cafa6c054d79d91b16e89f89b1eaee2c8 /include/llvm/Transforms | |
parent | c75199c649c739aade160289d93f257edc798cde (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 'include/llvm/Transforms')
-rw-r--r-- | include/llvm/Transforms/NaCl.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/llvm/Transforms/NaCl.h b/include/llvm/Transforms/NaCl.h index 43adb237dd..ec1a54aaa8 100644 --- a/include/llvm/Transforms/NaCl.h +++ b/include/llvm/Transforms/NaCl.h @@ -22,30 +22,31 @@ class PassManager; class Use; class Value; +BasicBlockPass *createExpandGetElementPtrPass(); +BasicBlockPass *createPromoteI1OpsPass(); +FunctionPass *createExpandConstantExprPass(); +FunctionPass *createExpandStructRegsPass(); +FunctionPass *createInsertDivideCheckPass(); +FunctionPass *createPromoteIntegersPass(); +FunctionPass *createResolvePNaClIntrinsicsPass(); ModulePass *createAddPNaClExternalDeclsPass(); ModulePass *createCanonicalizeMemIntrinsicsPass(); ModulePass *createExpandArithWithOverflowPass(); ModulePass *createExpandByValPass(); -FunctionPass *createExpandConstantExprPass(); ModulePass *createExpandCtorsPass(); -BasicBlockPass *createExpandGetElementPtrPass(); ModulePass *createExpandSmallArgumentsPass(); -FunctionPass *createExpandStructRegsPass(); -ModulePass *createExpandTlsPass(); ModulePass *createExpandTlsConstantExprPass(); +ModulePass *createExpandTlsPass(); ModulePass *createExpandVarArgsPass(); ModulePass *createFlattenGlobalsPass(); ModulePass *createGlobalCleanupPass(); -BasicBlockPass *createPromoteI1OpsPass(); -FunctionPass *createPromoteIntegersPass(); ModulePass *createReplacePtrsWithIntsPass(); ModulePass *createResolveAliasesPass(); -FunctionPass *createResolvePNaClIntrinsicsPass(); +ModulePass *createRewriteAtomicsPass(); ModulePass *createRewriteLLVMIntrinsicsPass(); ModulePass *createRewritePNaClLibraryCallsPass(); ModulePass *createStripAttributesPass(); ModulePass *createStripMetadataPass(); -FunctionPass *createInsertDivideCheckPass(); void PNaClABISimplifyAddPreOptPasses(PassManager &PM); void PNaClABISimplifyAddPostOptPasses(PassManager &PM); |