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); |
| 30 | void initializeWebAssemblyLowerEmscriptenEHSjLjPass(PassRegistry &); |
Dan Gohman | 81719f8 | 2015-11-25 16:55:01 +0000 | [diff] [blame] | 31 | FunctionPass *createWebAssemblyOptimizeReturned(); |
| 32 | |
Dan Gohman | 0cfb5f8 | 2016-05-10 04:24:02 +0000 | [diff] [blame] | 33 | // ISel and immediate followup passes. |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 34 | FunctionPass *createWebAssemblyISelDag(WebAssemblyTargetMachine &TM, |
| 35 | CodeGenOpt::Level OptLevel); |
Dan Gohman | 1cf96c0 | 2015-12-09 16:23:59 +0000 | [diff] [blame] | 36 | FunctionPass *createWebAssemblyArgumentMove(); |
Dan Gohman | bb37224 | 2016-01-26 03:39:31 +0000 | [diff] [blame] | 37 | FunctionPass *createWebAssemblySetP2AlignOperands(); |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 38 | |
Dan Gohman | 0cfb5f8 | 2016-05-10 04:24:02 +0000 | [diff] [blame] | 39 | // Late passes. |
| 40 | FunctionPass *createWebAssemblyReplacePhysRegs(); |
| 41 | FunctionPass *createWebAssemblyPrepareForLiveIntervals(); |
| 42 | FunctionPass *createWebAssemblyOptimizeLiveIntervals(); |
Dan Gohman | 81719f8 | 2015-11-25 16:55:01 +0000 | [diff] [blame] | 43 | FunctionPass *createWebAssemblyStoreResults(); |
Dan Gohman | 1462faa | 2015-11-16 16:18:28 +0000 | [diff] [blame] | 44 | FunctionPass *createWebAssemblyRegStackify(); |
| 45 | FunctionPass *createWebAssemblyRegColoring(); |
Dan Gohman | 4fc4e42 | 2016-10-24 19:49:43 +0000 | [diff] [blame^] | 46 | FunctionPass *createWebAssemblyExplicitLocals(); |
Dan Gohman | d7a2eea | 2016-03-09 02:01:14 +0000 | [diff] [blame] | 47 | FunctionPass *createWebAssemblyFixIrreducibleControlFlow(); |
Dan Gohman | 950a13c | 2015-09-16 16:51:30 +0000 | [diff] [blame] | 48 | FunctionPass *createWebAssemblyCFGStackify(); |
Dan Gohman | f0b165a | 2015-12-05 03:03:35 +0000 | [diff] [blame] | 49 | FunctionPass *createWebAssemblyLowerBrUnless(); |
Dan Gohman | cf4748f | 2015-11-12 17:04:33 +0000 | [diff] [blame] | 50 | FunctionPass *createWebAssemblyRegNumbering(); |
Dan Gohman | 81719f8 | 2015-11-25 16:55:01 +0000 | [diff] [blame] | 51 | FunctionPass *createWebAssemblyPeephole(); |
Derek Schuff | 6f69783 | 2016-10-21 16:38:07 +0000 | [diff] [blame] | 52 | FunctionPass *createWebAssemblyCallIndirectFixup(); |
Dan Gohman | 950a13c | 2015-09-16 16:51:30 +0000 | [diff] [blame] | 53 | |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 54 | } // end namespace llvm |
| 55 | |
| 56 | #endif |