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

Side by Side Diff: include/llvm/Transforms/NaCl.h

Issue 927493002: PNaCl: Impl the other atomicrmw operations: nand, max, min, umax, and umin. Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===-- NaCl.h - NaCl Transformations ---------------------------*- C++ -*-===// 1 //===-- NaCl.h - NaCl Transformations ---------------------------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 9
10 #ifndef LLVM_TRANSFORMS_NACL_H 10 #ifndef LLVM_TRANSFORMS_NACL_H
11 #define LLVM_TRANSFORMS_NACL_H 11 #define LLVM_TRANSFORMS_NACL_H
12 12
13 #include "llvm/CodeGen/Passes.h" 13 #include "llvm/CodeGen/Passes.h"
14 #include "llvm/IR/Instructions.h" 14 #include "llvm/IR/Instructions.h"
15 #include "llvm/IR/LLVMContext.h" 15 #include "llvm/IR/LLVMContext.h"
16 #include "llvm/IR/PassManager.h"
16 17
17 namespace llvm { 18 namespace llvm {
18 19
19 class BasicBlockPass; 20 class BasicBlockPass;
20 class Function; 21 class Function;
21 class FunctionPass; 22 class FunctionPass;
22 class FunctionType; 23 class FunctionType;
23 class Instruction; 24 class Instruction;
24 class ModulePass; 25 class ModulePass;
25 class Triple; 26 class Triple;
26 class Use; 27 class Use;
27 class Value; 28 class Value;
28 29
29 BasicBlockPass *createConstantInsertExtractElementIndexPass(); 30 #define PNACLPASS_LEGACY_ONLY(kind, name) \
30 BasicBlockPass *createExpandGetElementPtrPass(); 31 kind ## Pass *create ## name ## Pass()
31 BasicBlockPass *createExpandShuffleVectorPass();
32 BasicBlockPass *createFixVectorLoadStoreAlignmentPass();
33 BasicBlockPass *createPromoteI1OpsPass();
34 BasicBlockPass *createSimplifyAllocasPass();
35 FunctionPass *createBackendCanonicalizePass();
36 FunctionPass *createExpandConstantExprPass();
37 FunctionPass *createExpandLargeIntegersPass();
38 FunctionPass *createExpandStructRegsPass();
39 FunctionPass *createInsertDivideCheckPass();
40 FunctionPass *createNormalizeAlignmentPass();
41 FunctionPass *createRemoveAsmMemoryPass();
42 FunctionPass *createResolvePNaClIntrinsicsPass();
43 ModulePass *createAddPNaClExternalDeclsPass();
44 ModulePass *createCanonicalizeMemIntrinsicsPass();
45 ModulePass *createCleanupUsedGlobalsMetadataPass();
46 ModulePass *createExpandArithWithOverflowPass();
47 ModulePass *createExpandByValPass();
48 ModulePass *createExpandCtorsPass();
49 ModulePass *createExpandIndirectBrPass();
50 ModulePass *createExpandSmallArgumentsPass();
51 ModulePass *createExpandTlsConstantExprPass();
52 ModulePass *createExpandTlsPass();
53 ModulePass *createExpandVarArgsPass();
54 ModulePass *createFlattenGlobalsPass();
55 ModulePass *createGlobalCleanupPass();
56 ModulePass *createGlobalizeConstantVectorsPass();
57 ModulePass *createInternalizeUsedGlobalsPass();
58 ModulePass *createPNaClSjLjEHPass();
59 ModulePass *createPromoteIntegersPass();
60 ModulePass *createReplacePtrsWithIntsPass();
61 ModulePass *createResolveAliasesPass();
62 ModulePass *createRewriteAtomicsPass();
63 ModulePass *createRewriteLLVMIntrinsicsPass();
64 ModulePass *createRewritePNaClLibraryCallsPass();
65 ModulePass *createSimplifyStructRegSignaturesPass();
66 ModulePass *createStripAttributesPass();
67 ModulePass *createStripMetadataPass();
68 ModulePass *createStripModuleFlagsPass();
69 ModulePass *createStripDanglingDISubprogramsPass();
70 32
71 // Emscripten passes: 33 // name is nested in `pnacl` so uses of `name::something` isn't ambiguous
72 FunctionPass *createExpandInsertExtractElementPass(); 34 #define PNACLPASS(kind, name) \
73 ModulePass *createExpandI64Pass(); 35 namespace pnacl { namespace name { \
74 ModulePass *createLowerEmAsyncifyPass(); 36 void addPass(kind ## PassManager &Mgr); \
75 ModulePass *createLowerEmExceptionsPass(); 37 } } \
76 ModulePass *createLowerEmSetjmpPass(); 38 PNACLPASS_LEGACY_ONLY(kind, name)
77 ModulePass *createNoExitRuntimePass(); 39 #include "PNaClPasses.def"
78 // Emscripten passes end. 40 #undef PNACLPASS
41 #undef PNACLPASS_LEGACY_ONLY
JF 2015/07/23 22:44:38 Could you do this in a separate CL?
Richard Diamond 2015/07/24 19:54:38 Done.
79 42
80 void PNaClABISimplifyAddPreOptPasses(Triple *T, PassManagerBase &PM); 43 void PNaClABISimplifyAddPreOptPasses(Triple *T, PassManagerBase &PM);
81 void PNaClABISimplifyAddPostOptPasses(Triple *T, PassManagerBase &PM); 44 void PNaClABISimplifyAddPostOptPasses(Triple *T, PassManagerBase &PM);
82 45
83 Instruction *PhiSafeInsertPt(Use *U); 46 Instruction *PhiSafeInsertPt(Use *U);
84 void PhiSafeReplaceUses(Use *U, Value *NewVal); 47 void PhiSafeReplaceUses(Use *U, Value *NewVal);
85 48
86 // Copy debug information from Original to New, and return New. 49 // Copy debug information from Original to New, and return New.
87 template <typename T> T *CopyDebug(T *New, Instruction *Original) { 50 template <typename T> T *CopyDebug(T *New, Instruction *Original) {
88 New->setDebugLoc(Original->getDebugLoc()); 51 New->setDebugLoc(Original->getDebugLoc());
(...skipping 11 matching lines...) Expand all
100 // In order to change a function's type, the function must be 63 // In order to change a function's type, the function must be
101 // recreated. RecreateFunction() recreates Func with type NewType. 64 // recreated. RecreateFunction() recreates Func with type NewType.
102 // It copies or moves across everything except the argument values, 65 // It copies or moves across everything except the argument values,
103 // which the caller must update because the argument types might be 66 // which the caller must update because the argument types might be
104 // different. 67 // different.
105 Function *RecreateFunction(Function *Func, FunctionType *NewType); 68 Function *RecreateFunction(Function *Func, FunctionType *NewType);
106 69
107 } 70 }
108 71
109 #endif 72 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698