blob: 4a3ef59dbc6b45f844f0d3042715648975e5c012 [file] [log] [blame]
Dan Gohman10e730a2015-06-29 23:51:55 +00001//===-- WebAssembly.h - Top-level interface for WebAssembly ----*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9///
10/// \file
11/// \brief This file contains the entry points for global functions defined in
12/// the LLVM WebAssembly back-end.
13///
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H
17#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H
18
Derek Schufff41f67d2016-08-01 21:34:04 +000019#include "llvm/PassRegistry.h"
Dan Gohman10e730a2015-06-29 23:51:55 +000020#include "llvm/Support/CodeGen.h"
21
22namespace llvm {
23
24class WebAssemblyTargetMachine;
Derek Schufff41f67d2016-08-01 21:34:04 +000025class ModulePass;
Dan Gohman10e730a2015-06-29 23:51:55 +000026class FunctionPass;
27
Dan Gohman0cfb5f82016-05-10 04:24:02 +000028// LLVM IR passes.
Derek Schuffccdceda2016-08-18 15:27:25 +000029ModulePass *createWebAssemblyLowerEmscriptenEHSjLj(bool DoEH, bool DoSjLj);
Sam Cleggbafe6902017-12-15 00:17:10 +000030ModulePass *createWebAssemblyLowerGlobalDtors();
Dan Gohman1b637452017-01-07 00:34:54 +000031ModulePass *createWebAssemblyFixFunctionBitcasts();
Dan Gohman81719f82015-11-25 16:55:01 +000032FunctionPass *createWebAssemblyOptimizeReturned();
33
Dan Gohman0cfb5f82016-05-10 04:24:02 +000034// ISel and immediate followup passes.
Dan Gohman10e730a2015-06-29 23:51:55 +000035FunctionPass *createWebAssemblyISelDag(WebAssemblyTargetMachine &TM,
36 CodeGenOpt::Level OptLevel);
Dan Gohman1cf96c02015-12-09 16:23:59 +000037FunctionPass *createWebAssemblyArgumentMove();
Dan Gohmanbb372242016-01-26 03:39:31 +000038FunctionPass *createWebAssemblySetP2AlignOperands();
Dan Gohman10e730a2015-06-29 23:51:55 +000039
Dan Gohman0cfb5f82016-05-10 04:24:02 +000040// Late passes.
41FunctionPass *createWebAssemblyReplacePhysRegs();
42FunctionPass *createWebAssemblyPrepareForLiveIntervals();
43FunctionPass *createWebAssemblyOptimizeLiveIntervals();
Dan Gohman81719f82015-11-25 16:55:01 +000044FunctionPass *createWebAssemblyStoreResults();
Dan Gohman1462faa2015-11-16 16:18:28 +000045FunctionPass *createWebAssemblyRegStackify();
46FunctionPass *createWebAssemblyRegColoring();
Dan Gohman4fc4e422016-10-24 19:49:43 +000047FunctionPass *createWebAssemblyExplicitLocals();
Dan Gohmand7a2eea2016-03-09 02:01:14 +000048FunctionPass *createWebAssemblyFixIrreducibleControlFlow();
Dan Gohmanf52ee172017-02-27 22:38:58 +000049FunctionPass *createWebAssemblyCFGSort();
Dan Gohman950a13c2015-09-16 16:51:30 +000050FunctionPass *createWebAssemblyCFGStackify();
Dan Gohmanf0b165a2015-12-05 03:03:35 +000051FunctionPass *createWebAssemblyLowerBrUnless();
Dan Gohmancf4748f2015-11-12 17:04:33 +000052FunctionPass *createWebAssemblyRegNumbering();
Dan Gohman81719f82015-11-25 16:55:01 +000053FunctionPass *createWebAssemblyPeephole();
Derek Schuff6f697832016-10-21 16:38:07 +000054FunctionPass *createWebAssemblyCallIndirectFixup();
Dan Gohman950a13c2015-09-16 16:51:30 +000055
Jacob Gravelle40926452018-03-30 20:36:58 +000056// PassRegistry initialization declarations.
57void initializeWebAssemblyLowerEmscriptenEHSjLjPass(PassRegistry &);
58void initializeLowerGlobalDtorsPass(PassRegistry &);
59void initializeFixFunctionBitcastsPass(PassRegistry &);
60void initializeOptimizeReturnedPass(PassRegistry &);
61void initializeWebAssemblyArgumentMovePass(PassRegistry &);
62void initializeWebAssemblySetP2AlignOperandsPass(PassRegistry &);
63void initializeWebAssemblyReplacePhysRegsPass(PassRegistry &);
64void initializeWebAssemblyPrepareForLiveIntervalsPass(PassRegistry &);
65void initializeWebAssemblyOptimizeLiveIntervalsPass(PassRegistry &);
66void initializeWebAssemblyStoreResultsPass(PassRegistry &);
67void initializeWebAssemblyRegStackifyPass(PassRegistry &);
68void initializeWebAssemblyRegColoringPass(PassRegistry &);
69void initializeWebAssemblyExplicitLocalsPass(PassRegistry &);
70void initializeWebAssemblyFixIrreducibleControlFlowPass(PassRegistry &);
71void initializeWebAssemblyCFGSortPass(PassRegistry &);
72void initializeWebAssemblyCFGStackifyPass(PassRegistry &);
73void initializeWebAssemblyLowerBrUnlessPass(PassRegistry &);
74void initializeWebAssemblyRegNumberingPass(PassRegistry &);
75void initializeWebAssemblyPeepholePass(PassRegistry &);
76void initializeWebAssemblyCallIndirectFixupPass(PassRegistry &);
77
Dan Gohman10e730a2015-06-29 23:51:55 +000078} // end namespace llvm
79
80#endif