WebAssembly.h revision 353358
1//===-- WebAssembly.h - Top-level interface for WebAssembly ----*- C++ -*-===// 2// 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 6// 7//===----------------------------------------------------------------------===// 8/// 9/// \file 10/// This file contains the entry points for global functions defined in 11/// the LLVM WebAssembly back-end. 12/// 13//===----------------------------------------------------------------------===// 14 15#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H 16#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H 17 18#include "llvm/PassRegistry.h" 19#include "llvm/Support/CodeGen.h" 20 21namespace llvm { 22 23class WebAssemblyTargetMachine; 24class ModulePass; 25class FunctionPass; 26 27// LLVM IR passes. 28ModulePass *createWebAssemblyLowerEmscriptenEHSjLj(bool DoEH, bool DoSjLj); 29ModulePass *createWebAssemblyLowerGlobalDtors(); 30ModulePass *createWebAssemblyAddMissingPrototypes(); 31ModulePass *createWebAssemblyFixFunctionBitcasts(); 32FunctionPass *createWebAssemblyOptimizeReturned(); 33 34// ISel and immediate followup passes. 35FunctionPass *createWebAssemblyISelDag(WebAssemblyTargetMachine &TM, 36 CodeGenOpt::Level OptLevel); 37FunctionPass *createWebAssemblyArgumentMove(); 38FunctionPass *createWebAssemblySetP2AlignOperands(); 39 40// Late passes. 41FunctionPass *createWebAssemblyReplacePhysRegs(); 42FunctionPass *createWebAssemblyPrepareForLiveIntervals(); 43FunctionPass *createWebAssemblyOptimizeLiveIntervals(); 44FunctionPass *createWebAssemblyMemIntrinsicResults(); 45FunctionPass *createWebAssemblyRegStackify(); 46FunctionPass *createWebAssemblyRegColoring(); 47FunctionPass *createWebAssemblyFixIrreducibleControlFlow(); 48FunctionPass *createWebAssemblyLateEHPrepare(); 49FunctionPass *createWebAssemblyCFGSort(); 50FunctionPass *createWebAssemblyCFGStackify(); 51FunctionPass *createWebAssemblyExplicitLocals(); 52FunctionPass *createWebAssemblyLowerBrUnless(); 53FunctionPass *createWebAssemblyRegNumbering(); 54FunctionPass *createWebAssemblyPeephole(); 55FunctionPass *createWebAssemblyCallIndirectFixup(); 56 57// PassRegistry initialization declarations. 58void initializeWebAssemblyAddMissingPrototypesPass(PassRegistry &); 59void initializeWebAssemblyLowerEmscriptenEHSjLjPass(PassRegistry &); 60void initializeLowerGlobalDtorsPass(PassRegistry &); 61void initializeFixFunctionBitcastsPass(PassRegistry &); 62void initializeOptimizeReturnedPass(PassRegistry &); 63void initializeWebAssemblyArgumentMovePass(PassRegistry &); 64void initializeWebAssemblySetP2AlignOperandsPass(PassRegistry &); 65void initializeWebAssemblyReplacePhysRegsPass(PassRegistry &); 66void initializeWebAssemblyPrepareForLiveIntervalsPass(PassRegistry &); 67void initializeWebAssemblyOptimizeLiveIntervalsPass(PassRegistry &); 68void initializeWebAssemblyMemIntrinsicResultsPass(PassRegistry &); 69void initializeWebAssemblyRegStackifyPass(PassRegistry &); 70void initializeWebAssemblyRegColoringPass(PassRegistry &); 71void initializeWebAssemblyFixIrreducibleControlFlowPass(PassRegistry &); 72void initializeWebAssemblyLateEHPreparePass(PassRegistry &); 73void initializeWebAssemblyExceptionInfoPass(PassRegistry &); 74void initializeWebAssemblyCFGSortPass(PassRegistry &); 75void initializeWebAssemblyCFGStackifyPass(PassRegistry &); 76void initializeWebAssemblyExplicitLocalsPass(PassRegistry &); 77void initializeWebAssemblyLowerBrUnlessPass(PassRegistry &); 78void initializeWebAssemblyRegNumberingPass(PassRegistry &); 79void initializeWebAssemblyPeepholePass(PassRegistry &); 80void initializeWebAssemblyCallIndirectFixupPass(PassRegistry &); 81 82} // end namespace llvm 83 84#endif 85