[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / lib / Target / WebAssembly / WebAssembly.h
blobaefca2e6120e4e4d05f0ed0846a67246419f9cd1
1 //===-- WebAssembly.h - Top-level interface for WebAssembly ----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// This file contains the entry points for global functions defined in
11 /// the LLVM WebAssembly back-end.
12 ///
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H
16 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H
18 #include "llvm/PassRegistry.h"
19 #include "llvm/Support/CodeGen.h"
21 namespace llvm {
23 class WebAssemblyTargetMachine;
24 class ModulePass;
25 class FunctionPass;
27 // LLVM IR passes.
28 ModulePass *createWebAssemblyLowerEmscriptenEHSjLj(bool EnableEH,
29 bool EnableSjLj);
30 ModulePass *createWebAssemblyLowerGlobalDtors();
31 ModulePass *createWebAssemblyAddMissingPrototypes();
32 ModulePass *createWebAssemblyFixFunctionBitcasts();
33 FunctionPass *createWebAssemblyOptimizeReturned();
34 FunctionPass *createWebAssemblyLowerRefTypesIntPtrConv();
36 // ISel and immediate followup passes.
37 FunctionPass *createWebAssemblyISelDag(WebAssemblyTargetMachine &TM,
38 CodeGenOpt::Level OptLevel);
39 FunctionPass *createWebAssemblyArgumentMove();
40 FunctionPass *createWebAssemblySetP2AlignOperands();
42 // Late passes.
43 FunctionPass *createWebAssemblyReplacePhysRegs();
44 FunctionPass *createWebAssemblyNullifyDebugValueLists();
45 FunctionPass *createWebAssemblyPrepareForLiveIntervals();
46 FunctionPass *createWebAssemblyOptimizeLiveIntervals();
47 FunctionPass *createWebAssemblyMemIntrinsicResults();
48 FunctionPass *createWebAssemblyRegStackify();
49 FunctionPass *createWebAssemblyRegColoring();
50 FunctionPass *createWebAssemblyFixBrTableDefaults();
51 FunctionPass *createWebAssemblyFixIrreducibleControlFlow();
52 FunctionPass *createWebAssemblyLateEHPrepare();
53 FunctionPass *createWebAssemblyCFGSort();
54 FunctionPass *createWebAssemblyCFGStackify();
55 FunctionPass *createWebAssemblyExplicitLocals();
56 FunctionPass *createWebAssemblyLowerBrUnless();
57 FunctionPass *createWebAssemblyRegNumbering();
58 FunctionPass *createWebAssemblyDebugFixup();
59 FunctionPass *createWebAssemblyPeephole();
60 FunctionPass *createWebAssemblyMCLowerPrePass();
62 // PassRegistry initialization declarations.
63 void initializeWebAssemblyAddMissingPrototypesPass(PassRegistry &);
64 void initializeWebAssemblyLowerEmscriptenEHSjLjPass(PassRegistry &);
65 void initializeLowerGlobalDtorsPass(PassRegistry &);
66 void initializeFixFunctionBitcastsPass(PassRegistry &);
67 void initializeOptimizeReturnedPass(PassRegistry &);
68 void initializeWebAssemblyArgumentMovePass(PassRegistry &);
69 void initializeWebAssemblySetP2AlignOperandsPass(PassRegistry &);
70 void initializeWebAssemblyReplacePhysRegsPass(PassRegistry &);
71 void initializeWebAssemblyNullifyDebugValueListsPass(PassRegistry &);
72 void initializeWebAssemblyPrepareForLiveIntervalsPass(PassRegistry &);
73 void initializeWebAssemblyOptimizeLiveIntervalsPass(PassRegistry &);
74 void initializeWebAssemblyMemIntrinsicResultsPass(PassRegistry &);
75 void initializeWebAssemblyRegStackifyPass(PassRegistry &);
76 void initializeWebAssemblyRegColoringPass(PassRegistry &);
77 void initializeWebAssemblyFixBrTableDefaultsPass(PassRegistry &);
78 void initializeWebAssemblyFixIrreducibleControlFlowPass(PassRegistry &);
79 void initializeWebAssemblyLateEHPreparePass(PassRegistry &);
80 void initializeWebAssemblyExceptionInfoPass(PassRegistry &);
81 void initializeWebAssemblyCFGSortPass(PassRegistry &);
82 void initializeWebAssemblyCFGStackifyPass(PassRegistry &);
83 void initializeWebAssemblyExplicitLocalsPass(PassRegistry &);
84 void initializeWebAssemblyLowerBrUnlessPass(PassRegistry &);
85 void initializeWebAssemblyRegNumberingPass(PassRegistry &);
86 void initializeWebAssemblyDebugFixupPass(PassRegistry &);
87 void initializeWebAssemblyPeepholePass(PassRegistry &);
88 void initializeWebAssemblyMCLowerPrePassPass(PassRegistry &);
89 void initializeWebAssemblyLowerRefTypesIntPtrConvPass(PassRegistry &);
91 namespace WebAssembly {
92 enum TargetIndex {
93 // Followed by a local index (ULEB).
94 TI_LOCAL,
95 // Followed by an absolute global index (ULEB). DEPRECATED.
96 TI_GLOBAL_FIXED,
97 // Followed by the index from the bottom of the Wasm stack.
98 TI_OPERAND_STACK,
99 // Followed by a compilation unit relative global index (uint32_t)
100 // that will have an associated relocation.
101 TI_GLOBAL_RELOC,
102 // Like TI_LOCAL, but indicates an indirect value (e.g. byval arg
103 // passed by pointer).
104 TI_LOCAL_INDIRECT
106 } // end namespace WebAssembly
108 } // end namespace llvm
110 #endif