1 //===-- WebAssembly.h - Top-level interface for WebAssembly ----*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
10 /// This file contains the entry points for global functions defined in
11 /// the LLVM WebAssembly back-end.
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"
23 class WebAssemblyTargetMachine
;
28 ModulePass
*createWebAssemblyLowerEmscriptenEHSjLj(bool DoEH
, bool DoSjLj
);
29 ModulePass
*createWebAssemblyLowerGlobalDtors();
30 ModulePass
*createWebAssemblyAddMissingPrototypes();
31 ModulePass
*createWebAssemblyFixFunctionBitcasts();
32 FunctionPass
*createWebAssemblyOptimizeReturned();
34 // ISel and immediate followup passes.
35 FunctionPass
*createWebAssemblyISelDag(WebAssemblyTargetMachine
&TM
,
36 CodeGenOpt::Level OptLevel
);
37 FunctionPass
*createWebAssemblyArgumentMove();
38 FunctionPass
*createWebAssemblySetP2AlignOperands();
41 FunctionPass
*createWebAssemblyReplacePhysRegs();
42 FunctionPass
*createWebAssemblyPrepareForLiveIntervals();
43 FunctionPass
*createWebAssemblyOptimizeLiveIntervals();
44 FunctionPass
*createWebAssemblyMemIntrinsicResults();
45 FunctionPass
*createWebAssemblyRegStackify();
46 FunctionPass
*createWebAssemblyRegColoring();
47 FunctionPass
*createWebAssemblyFixIrreducibleControlFlow();
48 FunctionPass
*createWebAssemblyLateEHPrepare();
49 FunctionPass
*createWebAssemblyCFGSort();
50 FunctionPass
*createWebAssemblyCFGStackify();
51 FunctionPass
*createWebAssemblyExplicitLocals();
52 FunctionPass
*createWebAssemblyLowerBrUnless();
53 FunctionPass
*createWebAssemblyRegNumbering();
54 FunctionPass
*createWebAssemblyPeephole();
55 FunctionPass
*createWebAssemblyCallIndirectFixup();
57 // PassRegistry initialization declarations.
58 void initializeWebAssemblyAddMissingPrototypesPass(PassRegistry
&);
59 void initializeWebAssemblyLowerEmscriptenEHSjLjPass(PassRegistry
&);
60 void initializeLowerGlobalDtorsPass(PassRegistry
&);
61 void initializeFixFunctionBitcastsPass(PassRegistry
&);
62 void initializeOptimizeReturnedPass(PassRegistry
&);
63 void initializeWebAssemblyArgumentMovePass(PassRegistry
&);
64 void initializeWebAssemblySetP2AlignOperandsPass(PassRegistry
&);
65 void initializeWebAssemblyReplacePhysRegsPass(PassRegistry
&);
66 void initializeWebAssemblyPrepareForLiveIntervalsPass(PassRegistry
&);
67 void initializeWebAssemblyOptimizeLiveIntervalsPass(PassRegistry
&);
68 void initializeWebAssemblyMemIntrinsicResultsPass(PassRegistry
&);
69 void initializeWebAssemblyRegStackifyPass(PassRegistry
&);
70 void initializeWebAssemblyRegColoringPass(PassRegistry
&);
71 void initializeWebAssemblyFixIrreducibleControlFlowPass(PassRegistry
&);
72 void initializeWebAssemblyLateEHPreparePass(PassRegistry
&);
73 void initializeWebAssemblyExceptionInfoPass(PassRegistry
&);
74 void initializeWebAssemblyCFGSortPass(PassRegistry
&);
75 void initializeWebAssemblyCFGStackifyPass(PassRegistry
&);
76 void initializeWebAssemblyExplicitLocalsPass(PassRegistry
&);
77 void initializeWebAssemblyLowerBrUnlessPass(PassRegistry
&);
78 void initializeWebAssemblyRegNumberingPass(PassRegistry
&);
79 void initializeWebAssemblyPeepholePass(PassRegistry
&);
80 void initializeWebAssemblyCallIndirectFixupPass(PassRegistry
&);
82 } // end namespace llvm