LLVM  14.0.0git
WebAssembly.h
Go to the documentation of this file.
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 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H
16 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H
17 
18 #include "llvm/PassRegistry.h"
19 #include "llvm/Support/CodeGen.h"
20 
21 namespace llvm {
22 
23 class WebAssemblyTargetMachine;
24 class ModulePass;
25 class FunctionPass;
26 
27 // LLVM IR passes.
32 FunctionPass *createWebAssemblyOptimizeReturned();
34 
35 // ISel and immediate followup passes.
36 FunctionPass *createWebAssemblyISelDag(WebAssemblyTargetMachine &TM,
37  CodeGenOpt::Level OptLevel);
38 FunctionPass *createWebAssemblyArgumentMove();
40 
41 // Late passes.
42 FunctionPass *createWebAssemblyReplacePhysRegs();
47 FunctionPass *createWebAssemblyRegStackify();
48 FunctionPass *createWebAssemblyRegColoring();
51 FunctionPass *createWebAssemblyLateEHPrepare();
52 FunctionPass *createWebAssemblyCFGSort();
53 FunctionPass *createWebAssemblyCFGStackify();
54 FunctionPass *createWebAssemblyExplicitLocals();
55 FunctionPass *createWebAssemblyLowerBrUnless();
56 FunctionPass *createWebAssemblyRegNumbering();
57 FunctionPass *createWebAssemblyDebugFixup();
58 FunctionPass *createWebAssemblyPeephole();
60 
61 // PassRegistry initialization declarations.
64 void initializeLowerGlobalDtorsPass(PassRegistry &);
65 void initializeFixFunctionBitcastsPass(PassRegistry &);
66 void initializeOptimizeReturnedPass(PassRegistry &);
67 void initializeWebAssemblyArgumentMovePass(PassRegistry &);
69 void initializeWebAssemblyReplacePhysRegsPass(PassRegistry &);
74 void initializeWebAssemblyRegStackifyPass(PassRegistry &);
75 void initializeWebAssemblyRegColoringPass(PassRegistry &);
78 void initializeWebAssemblyLateEHPreparePass(PassRegistry &);
79 void initializeWebAssemblyExceptionInfoPass(PassRegistry &);
80 void initializeWebAssemblyCFGSortPass(PassRegistry &);
81 void initializeWebAssemblyCFGStackifyPass(PassRegistry &);
82 void initializeWebAssemblyExplicitLocalsPass(PassRegistry &);
83 void initializeWebAssemblyLowerBrUnlessPass(PassRegistry &);
84 void initializeWebAssemblyRegNumberingPass(PassRegistry &);
85 void initializeWebAssemblyDebugFixupPass(PassRegistry &);
86 void initializeWebAssemblyPeepholePass(PassRegistry &);
87 void initializeWebAssemblyMCLowerPrePassPass(PassRegistry &);
89 
90 namespace WebAssembly {
92  // Followed by a local index (ULEB).
94  // Followed by an absolute global index (ULEB). DEPRECATED.
96  // Followed by the index from the bottom of the Wasm stack.
98  // Followed by a compilation unit relative global index (uint32_t)
99  // that will have an associated relocation.
101  // Like TI_LOCAL, but indicates an indirect value (e.g. byval arg
102  // passed by pointer).
104 };
105 } // end namespace WebAssembly
106 
107 } // end namespace llvm
108 
109 #endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::initializeWebAssemblyCFGStackifyPass
void initializeWebAssemblyCFGStackifyPass(PassRegistry &)
llvm::createWebAssemblyLowerGlobalDtors
ModulePass * createWebAssemblyLowerGlobalDtors()
llvm::createWebAssemblyReplacePhysRegs
FunctionPass * createWebAssemblyReplacePhysRegs()
llvm::createWebAssemblyExplicitLocals
FunctionPass * createWebAssemblyExplicitLocals()
llvm::initializeLowerGlobalDtorsPass
void initializeLowerGlobalDtorsPass(PassRegistry &)
llvm::createWebAssemblyISelDag
FunctionPass * createWebAssemblyISelDag(WebAssemblyTargetMachine &TM, CodeGenOpt::Level OptLevel)
This pass converts a legalized DAG into a WebAssembly-specific DAG, ready for instruction scheduling.
Definition: WebAssemblyISelDAGToDAG.cpp:286
llvm::createWebAssemblyRegColoring
FunctionPass * createWebAssemblyRegColoring()
llvm::createWebAssemblyCFGStackify
FunctionPass * createWebAssemblyCFGStackify()
llvm::initializeWebAssemblySetP2AlignOperandsPass
void initializeWebAssemblySetP2AlignOperandsPass(PassRegistry &)
llvm::initializeWebAssemblyLowerEmscriptenEHSjLjPass
void initializeWebAssemblyLowerEmscriptenEHSjLjPass(PassRegistry &)
PassRegistry.h
llvm::initializeWebAssemblyRegStackifyPass
void initializeWebAssemblyRegStackifyPass(PassRegistry &)
llvm::initializeWebAssemblyCFGSortPass
void initializeWebAssemblyCFGSortPass(PassRegistry &)
llvm::createWebAssemblyFixIrreducibleControlFlow
FunctionPass * createWebAssemblyFixIrreducibleControlFlow()
llvm::createWebAssemblyFixBrTableDefaults
FunctionPass * createWebAssemblyFixBrTableDefaults()
llvm::initializeWebAssemblyFixBrTableDefaultsPass
void initializeWebAssemblyFixBrTableDefaultsPass(PassRegistry &)
llvm::createWebAssemblyRegStackify
FunctionPass * createWebAssemblyRegStackify()
llvm::initializeWebAssemblyAddMissingPrototypesPass
void initializeWebAssemblyAddMissingPrototypesPass(PassRegistry &)
llvm::initializeWebAssemblyOptimizeLiveIntervalsPass
void initializeWebAssemblyOptimizeLiveIntervalsPass(PassRegistry &)
llvm::createWebAssemblyLowerEmscriptenEHSjLj
ModulePass * createWebAssemblyLowerEmscriptenEHSjLj()
llvm::createWebAssemblyOptimizeLiveIntervals
FunctionPass * createWebAssemblyOptimizeLiveIntervals()
llvm::initializeWebAssemblyExceptionInfoPass
void initializeWebAssemblyExceptionInfoPass(PassRegistry &)
llvm::WebAssembly::TI_OPERAND_STACK
@ TI_OPERAND_STACK
Definition: WebAssembly.h:97
llvm::WebAssembly::TI_GLOBAL_RELOC
@ TI_GLOBAL_RELOC
Definition: WebAssembly.h:100
llvm::createWebAssemblyMCLowerPrePass
ModulePass * createWebAssemblyMCLowerPrePass()
llvm::initializeWebAssemblyFixIrreducibleControlFlowPass
void initializeWebAssemblyFixIrreducibleControlFlowPass(PassRegistry &)
llvm::createWebAssemblyDebugFixup
FunctionPass * createWebAssemblyDebugFixup()
llvm::initializeWebAssemblyMCLowerPrePassPass
void initializeWebAssemblyMCLowerPrePassPass(PassRegistry &)
llvm::initializeWebAssemblyRegNumberingPass
void initializeWebAssemblyRegNumberingPass(PassRegistry &)
llvm::initializeWebAssemblyLowerBrUnlessPass
void initializeWebAssemblyLowerBrUnlessPass(PassRegistry &)
llvm::createWebAssemblyNullifyDebugValueLists
FunctionPass * createWebAssemblyNullifyDebugValueLists()
llvm::createWebAssemblyMemIntrinsicResults
FunctionPass * createWebAssemblyMemIntrinsicResults()
llvm::createWebAssemblyOptimizeReturned
FunctionPass * createWebAssemblyOptimizeReturned()
llvm::initializeWebAssemblyLowerRefTypesIntPtrConvPass
void initializeWebAssemblyLowerRefTypesIntPtrConvPass(PassRegistry &)
llvm::initializeWebAssemblyPrepareForLiveIntervalsPass
void initializeWebAssemblyPrepareForLiveIntervalsPass(PassRegistry &)
llvm::createWebAssemblyAddMissingPrototypes
ModulePass * createWebAssemblyAddMissingPrototypes()
llvm::createWebAssemblyPrepareForLiveIntervals
FunctionPass * createWebAssemblyPrepareForLiveIntervals()
llvm::initializeWebAssemblyExplicitLocalsPass
void initializeWebAssemblyExplicitLocalsPass(PassRegistry &)
llvm::createWebAssemblyLowerRefTypesIntPtrConv
FunctionPass * createWebAssemblyLowerRefTypesIntPtrConv()
llvm::CodeGenOpt::Level
Level
Definition: CodeGen.h:52
llvm::WebAssembly::TI_GLOBAL_FIXED
@ TI_GLOBAL_FIXED
Definition: WebAssembly.h:95
llvm::createWebAssemblyCFGSort
FunctionPass * createWebAssemblyCFGSort()
llvm::initializeWebAssemblyRegColoringPass
void initializeWebAssemblyRegColoringPass(PassRegistry &)
llvm::WebAssembly::TI_LOCAL
@ TI_LOCAL
Definition: WebAssembly.h:93
llvm::WebAssembly::TI_LOCAL_INDIRECT
@ TI_LOCAL_INDIRECT
Definition: WebAssembly.h:103
llvm::initializeWebAssemblyDebugFixupPass
void initializeWebAssemblyDebugFixupPass(PassRegistry &)
llvm::initializeWebAssemblyArgumentMovePass
void initializeWebAssemblyArgumentMovePass(PassRegistry &)
llvm::initializeWebAssemblyLateEHPreparePass
void initializeWebAssemblyLateEHPreparePass(PassRegistry &)
CodeGen.h
llvm::createWebAssemblyArgumentMove
FunctionPass * createWebAssemblyArgumentMove()
llvm::createWebAssemblyFixFunctionBitcasts
ModulePass * createWebAssemblyFixFunctionBitcasts()
llvm::initializeWebAssemblyNullifyDebugValueListsPass
void initializeWebAssemblyNullifyDebugValueListsPass(PassRegistry &)
llvm::createWebAssemblySetP2AlignOperands
FunctionPass * createWebAssemblySetP2AlignOperands()
llvm::initializeWebAssemblyPeepholePass
void initializeWebAssemblyPeepholePass(PassRegistry &)
llvm::createWebAssemblyLowerBrUnless
FunctionPass * createWebAssemblyLowerBrUnless()
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47
llvm::createWebAssemblyRegNumbering
FunctionPass * createWebAssemblyRegNumbering()
llvm::createWebAssemblyLateEHPrepare
FunctionPass * createWebAssemblyLateEHPrepare()
llvm::WebAssembly::TargetIndex
TargetIndex
Definition: WebAssembly.h:91
llvm::initializeOptimizeReturnedPass
void initializeOptimizeReturnedPass(PassRegistry &)
llvm::initializeWebAssemblyReplacePhysRegsPass
void initializeWebAssemblyReplacePhysRegsPass(PassRegistry &)
llvm::initializeWebAssemblyMemIntrinsicResultsPass
void initializeWebAssemblyMemIntrinsicResultsPass(PassRegistry &)
llvm::createWebAssemblyPeephole
FunctionPass * createWebAssemblyPeephole()
llvm::initializeFixFunctionBitcastsPass
void initializeFixFunctionBitcastsPass(PassRegistry &)