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 /// 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 19 #include "llvm/PassRegistry.h" 20 #include "llvm/Support/CodeGen.h" 21 22 namespace llvm { 23 24 class WebAssemblyTargetMachine; 25 class ModulePass; 26 class FunctionPass; 27 28 // LLVM IR passes. 29 ModulePass *createWebAssemblyLowerEmscriptenEHSjLj(bool DoEH, bool DoSjLj); 30 ModulePass *createWebAssemblyLowerGlobalDtors(); 31 ModulePass *createWebAssemblyAddMissingPrototypes(); 32 ModulePass *createWebAssemblyFixFunctionBitcasts(); 33 FunctionPass *createWebAssemblyOptimizeReturned(); 34 35 // ISel and immediate followup passes. 36 FunctionPass *createWebAssemblyISelDag(WebAssemblyTargetMachine &TM, 37 CodeGenOpt::Level OptLevel); 38 FunctionPass *createWebAssemblyArgumentMove(); 39 FunctionPass *createWebAssemblySetP2AlignOperands(); 40 41 // Late passes. 42 FunctionPass *createWebAssemblyReplacePhysRegs(); 43 FunctionPass *createWebAssemblyPrepareForLiveIntervals(); 44 FunctionPass *createWebAssemblyOptimizeLiveIntervals(); 45 FunctionPass *createWebAssemblyStoreResults(); 46 FunctionPass *createWebAssemblyRegStackify(); 47 FunctionPass *createWebAssemblyRegColoring(); 48 FunctionPass *createWebAssemblyExplicitLocals(); 49 FunctionPass *createWebAssemblyFixIrreducibleControlFlow(); 50 FunctionPass *createWebAssemblyLateEHPrepare(); 51 FunctionPass *createWebAssemblyCFGSort(); 52 FunctionPass *createWebAssemblyCFGStackify(); 53 FunctionPass *createWebAssemblyLowerBrUnless(); 54 FunctionPass *createWebAssemblyRegNumbering(); 55 FunctionPass *createWebAssemblyPeephole(); 56 FunctionPass *createWebAssemblyCallIndirectFixup(); 57 58 // PassRegistry initialization declarations. 59 void initializeWebAssemblyAddMissingPrototypesPass(PassRegistry &); 60 void initializeWebAssemblyLowerEmscriptenEHSjLjPass(PassRegistry &); 61 void initializeLowerGlobalDtorsPass(PassRegistry &); 62 void initializeFixFunctionBitcastsPass(PassRegistry &); 63 void initializeOptimizeReturnedPass(PassRegistry &); 64 void initializeWebAssemblyArgumentMovePass(PassRegistry &); 65 void initializeWebAssemblySetP2AlignOperandsPass(PassRegistry &); 66 void initializeWebAssemblyReplacePhysRegsPass(PassRegistry &); 67 void initializeWebAssemblyPrepareForLiveIntervalsPass(PassRegistry &); 68 void initializeWebAssemblyOptimizeLiveIntervalsPass(PassRegistry &); 69 void initializeWebAssemblyStoreResultsPass(PassRegistry &); 70 void initializeWebAssemblyRegStackifyPass(PassRegistry &); 71 void initializeWebAssemblyRegColoringPass(PassRegistry &); 72 void initializeWebAssemblyExplicitLocalsPass(PassRegistry &); 73 void initializeWebAssemblyFixIrreducibleControlFlowPass(PassRegistry &); 74 void initializeWebAssemblyLateEHPreparePass(PassRegistry &); 75 void initializeWebAssemblyExceptionInfoPass(PassRegistry &); 76 void initializeWebAssemblyCFGSortPass(PassRegistry &); 77 void initializeWebAssemblyCFGStackifyPass(PassRegistry &); 78 void initializeWebAssemblyLowerBrUnlessPass(PassRegistry &); 79 void initializeWebAssemblyRegNumberingPass(PassRegistry &); 80 void initializeWebAssemblyPeepholePass(PassRegistry &); 81 void initializeWebAssemblyCallIndirectFixupPass(PassRegistry &); 82 83 } // end namespace llvm 84 85 #endif 86