Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 1 | //===-- 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 Schuff | f41f67d | 2016-08-01 21:34:04 +0000 | [diff] [blame] | 19 | #include "llvm/PassRegistry.h" |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 20 | #include "llvm/Support/CodeGen.h" |
| 21 | |
| 22 | namespace llvm { |
| 23 | |
| 24 | class WebAssemblyTargetMachine; |
Derek Schuff | f41f67d | 2016-08-01 21:34:04 +0000 | [diff] [blame] | 25 | class ModulePass; |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 26 | class FunctionPass; |
| 27 | |
Dan Gohman | 0cfb5f8 | 2016-05-10 04:24:02 +0000 | [diff] [blame] | 28 | // LLVM IR passes. |
Derek Schuff | ccdceda | 2016-08-18 15:27:25 +0000 | [diff] [blame] | 29 | ModulePass *createWebAssemblyLowerEmscriptenEHSjLj(bool DoEH, bool DoSjLj); |
Sam Clegg | bafe690 | 2017-12-15 00:17:10 +0000 | [diff] [blame] | 30 | ModulePass *createWebAssemblyLowerGlobalDtors(); |
Dan Gohman | 1b63745 | 2017-01-07 00:34:54 +0000 | [diff] [blame] | 31 | ModulePass *createWebAssemblyFixFunctionBitcasts(); |
Dan Gohman | 81719f8 | 2015-11-25 16:55:01 +0000 | [diff] [blame] | 32 | FunctionPass *createWebAssemblyOptimizeReturned(); |
| 33 | |
Dan Gohman | 0cfb5f8 | 2016-05-10 04:24:02 +0000 | [diff] [blame] | 34 | // ISel and immediate followup passes. |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 35 | FunctionPass *createWebAssemblyISelDag(WebAssemblyTargetMachine &TM, |
| 36 | CodeGenOpt::Level OptLevel); |
Dan Gohman | 1cf96c0 | 2015-12-09 16:23:59 +0000 | [diff] [blame] | 37 | FunctionPass *createWebAssemblyArgumentMove(); |
Dan Gohman | bb37224 | 2016-01-26 03:39:31 +0000 | [diff] [blame] | 38 | FunctionPass *createWebAssemblySetP2AlignOperands(); |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 39 | |
Dan Gohman | 0cfb5f8 | 2016-05-10 04:24:02 +0000 | [diff] [blame] | 40 | // Late passes. |
| 41 | FunctionPass *createWebAssemblyReplacePhysRegs(); |
| 42 | FunctionPass *createWebAssemblyPrepareForLiveIntervals(); |
| 43 | FunctionPass *createWebAssemblyOptimizeLiveIntervals(); |
Dan Gohman | 81719f8 | 2015-11-25 16:55:01 +0000 | [diff] [blame] | 44 | FunctionPass *createWebAssemblyStoreResults(); |
Dan Gohman | 1462faa | 2015-11-16 16:18:28 +0000 | [diff] [blame] | 45 | FunctionPass *createWebAssemblyRegStackify(); |
| 46 | FunctionPass *createWebAssemblyRegColoring(); |
Dan Gohman | 4fc4e42 | 2016-10-24 19:49:43 +0000 | [diff] [blame] | 47 | FunctionPass *createWebAssemblyExplicitLocals(); |
Dan Gohman | d7a2eea | 2016-03-09 02:01:14 +0000 | [diff] [blame] | 48 | FunctionPass *createWebAssemblyFixIrreducibleControlFlow(); |
Dan Gohman | f52ee17 | 2017-02-27 22:38:58 +0000 | [diff] [blame] | 49 | FunctionPass *createWebAssemblyCFGSort(); |
Dan Gohman | 950a13c | 2015-09-16 16:51:30 +0000 | [diff] [blame] | 50 | FunctionPass *createWebAssemblyCFGStackify(); |
Dan Gohman | f0b165a | 2015-12-05 03:03:35 +0000 | [diff] [blame] | 51 | FunctionPass *createWebAssemblyLowerBrUnless(); |
Dan Gohman | cf4748f | 2015-11-12 17:04:33 +0000 | [diff] [blame] | 52 | FunctionPass *createWebAssemblyRegNumbering(); |
Dan Gohman | 81719f8 | 2015-11-25 16:55:01 +0000 | [diff] [blame] | 53 | FunctionPass *createWebAssemblyPeephole(); |
Derek Schuff | 6f69783 | 2016-10-21 16:38:07 +0000 | [diff] [blame] | 54 | FunctionPass *createWebAssemblyCallIndirectFixup(); |
Dan Gohman | 950a13c | 2015-09-16 16:51:30 +0000 | [diff] [blame] | 55 | |
Jacob Gravelle | 4092645 | 2018-03-30 20:36:58 +0000 | [diff] [blame] | 56 | // PassRegistry initialization declarations. |
| 57 | void initializeWebAssemblyLowerEmscriptenEHSjLjPass(PassRegistry &); |
| 58 | void initializeLowerGlobalDtorsPass(PassRegistry &); |
| 59 | void initializeFixFunctionBitcastsPass(PassRegistry &); |
| 60 | void initializeOptimizeReturnedPass(PassRegistry &); |
| 61 | void initializeWebAssemblyArgumentMovePass(PassRegistry &); |
| 62 | void initializeWebAssemblySetP2AlignOperandsPass(PassRegistry &); |
| 63 | void initializeWebAssemblyReplacePhysRegsPass(PassRegistry &); |
| 64 | void initializeWebAssemblyPrepareForLiveIntervalsPass(PassRegistry &); |
| 65 | void initializeWebAssemblyOptimizeLiveIntervalsPass(PassRegistry &); |
| 66 | void initializeWebAssemblyStoreResultsPass(PassRegistry &); |
| 67 | void initializeWebAssemblyRegStackifyPass(PassRegistry &); |
| 68 | void initializeWebAssemblyRegColoringPass(PassRegistry &); |
| 69 | void initializeWebAssemblyExplicitLocalsPass(PassRegistry &); |
| 70 | void initializeWebAssemblyFixIrreducibleControlFlowPass(PassRegistry &); |
| 71 | void initializeWebAssemblyCFGSortPass(PassRegistry &); |
| 72 | void initializeWebAssemblyCFGStackifyPass(PassRegistry &); |
| 73 | void initializeWebAssemblyLowerBrUnlessPass(PassRegistry &); |
| 74 | void initializeWebAssemblyRegNumberingPass(PassRegistry &); |
| 75 | void initializeWebAssemblyPeepholePass(PassRegistry &); |
| 76 | void initializeWebAssemblyCallIndirectFixupPass(PassRegistry &); |
| 77 | |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 78 | } // end namespace llvm |
| 79 | |
| 80 | #endif |