2015-06-30 07:51:55 +08:00
|
|
|
//===-- WebAssembly.h - Top-level interface for WebAssembly ----*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2015-06-30 07:51:55 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
///
|
|
|
|
/// \file
|
2018-05-01 23:54:18 +08:00
|
|
|
/// This file contains the entry points for global functions defined in
|
2015-06-30 07:51:55 +08:00
|
|
|
/// the LLVM WebAssembly back-end.
|
|
|
|
///
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H
|
|
|
|
#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H
|
|
|
|
|
2016-08-02 05:34:04 +08:00
|
|
|
#include "llvm/PassRegistry.h"
|
2015-06-30 07:51:55 +08:00
|
|
|
#include "llvm/Support/CodeGen.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class WebAssemblyTargetMachine;
|
2016-08-02 05:34:04 +08:00
|
|
|
class ModulePass;
|
2015-06-30 07:51:55 +08:00
|
|
|
class FunctionPass;
|
|
|
|
|
2016-05-10 12:24:02 +08:00
|
|
|
// LLVM IR passes.
|
2016-08-18 23:27:25 +08:00
|
|
|
ModulePass *createWebAssemblyLowerEmscriptenEHSjLj(bool DoEH, bool DoSjLj);
|
2017-12-15 08:17:10 +08:00
|
|
|
ModulePass *createWebAssemblyLowerGlobalDtors();
|
2018-07-11 12:29:36 +08:00
|
|
|
ModulePass *createWebAssemblyAddMissingPrototypes();
|
2017-01-07 08:34:54 +08:00
|
|
|
ModulePass *createWebAssemblyFixFunctionBitcasts();
|
2015-11-26 00:55:01 +08:00
|
|
|
FunctionPass *createWebAssemblyOptimizeReturned();
|
|
|
|
|
2016-05-10 12:24:02 +08:00
|
|
|
// ISel and immediate followup passes.
|
2015-06-30 07:51:55 +08:00
|
|
|
FunctionPass *createWebAssemblyISelDag(WebAssemblyTargetMachine &TM,
|
|
|
|
CodeGenOpt::Level OptLevel);
|
2015-12-10 00:23:59 +08:00
|
|
|
FunctionPass *createWebAssemblyArgumentMove();
|
2016-01-26 11:39:31 +08:00
|
|
|
FunctionPass *createWebAssemblySetP2AlignOperands();
|
2015-06-30 07:51:55 +08:00
|
|
|
|
2016-05-10 12:24:02 +08:00
|
|
|
// Late passes.
|
|
|
|
FunctionPass *createWebAssemblyReplacePhysRegs();
|
|
|
|
FunctionPass *createWebAssemblyPrepareForLiveIntervals();
|
|
|
|
FunctionPass *createWebAssemblyOptimizeLiveIntervals();
|
2019-01-09 06:35:18 +08:00
|
|
|
FunctionPass *createWebAssemblyMemIntrinsicResults();
|
2015-11-17 00:18:28 +08:00
|
|
|
FunctionPass *createWebAssemblyRegStackify();
|
|
|
|
FunctionPass *createWebAssemblyRegColoring();
|
2016-03-09 10:01:14 +08:00
|
|
|
FunctionPass *createWebAssemblyFixIrreducibleControlFlow();
|
2018-06-25 09:07:11 +08:00
|
|
|
FunctionPass *createWebAssemblyLateEHPrepare();
|
2017-02-28 06:38:58 +08:00
|
|
|
FunctionPass *createWebAssemblyCFGSort();
|
2015-09-17 00:51:30 +08:00
|
|
|
FunctionPass *createWebAssemblyCFGStackify();
|
2019-03-30 17:29:57 +08:00
|
|
|
FunctionPass *createWebAssemblyExplicitLocals();
|
2015-12-05 11:03:35 +08:00
|
|
|
FunctionPass *createWebAssemblyLowerBrUnless();
|
2015-11-13 01:04:33 +08:00
|
|
|
FunctionPass *createWebAssemblyRegNumbering();
|
2015-11-26 00:55:01 +08:00
|
|
|
FunctionPass *createWebAssemblyPeephole();
|
2016-10-22 00:38:07 +08:00
|
|
|
FunctionPass *createWebAssemblyCallIndirectFixup();
|
2015-09-17 00:51:30 +08:00
|
|
|
|
2018-03-31 04:36:58 +08:00
|
|
|
// PassRegistry initialization declarations.
|
2018-07-11 12:29:36 +08:00
|
|
|
void initializeWebAssemblyAddMissingPrototypesPass(PassRegistry &);
|
2018-03-31 04:36:58 +08:00
|
|
|
void initializeWebAssemblyLowerEmscriptenEHSjLjPass(PassRegistry &);
|
|
|
|
void initializeLowerGlobalDtorsPass(PassRegistry &);
|
|
|
|
void initializeFixFunctionBitcastsPass(PassRegistry &);
|
|
|
|
void initializeOptimizeReturnedPass(PassRegistry &);
|
|
|
|
void initializeWebAssemblyArgumentMovePass(PassRegistry &);
|
|
|
|
void initializeWebAssemblySetP2AlignOperandsPass(PassRegistry &);
|
|
|
|
void initializeWebAssemblyReplacePhysRegsPass(PassRegistry &);
|
|
|
|
void initializeWebAssemblyPrepareForLiveIntervalsPass(PassRegistry &);
|
|
|
|
void initializeWebAssemblyOptimizeLiveIntervalsPass(PassRegistry &);
|
2019-01-09 06:35:18 +08:00
|
|
|
void initializeWebAssemblyMemIntrinsicResultsPass(PassRegistry &);
|
2018-03-31 04:36:58 +08:00
|
|
|
void initializeWebAssemblyRegStackifyPass(PassRegistry &);
|
|
|
|
void initializeWebAssemblyRegColoringPass(PassRegistry &);
|
|
|
|
void initializeWebAssemblyFixIrreducibleControlFlowPass(PassRegistry &);
|
2018-06-25 09:07:11 +08:00
|
|
|
void initializeWebAssemblyLateEHPreparePass(PassRegistry &);
|
2018-06-25 09:20:21 +08:00
|
|
|
void initializeWebAssemblyExceptionInfoPass(PassRegistry &);
|
2018-03-31 04:36:58 +08:00
|
|
|
void initializeWebAssemblyCFGSortPass(PassRegistry &);
|
|
|
|
void initializeWebAssemblyCFGStackifyPass(PassRegistry &);
|
2019-03-30 17:29:57 +08:00
|
|
|
void initializeWebAssemblyExplicitLocalsPass(PassRegistry &);
|
2018-03-31 04:36:58 +08:00
|
|
|
void initializeWebAssemblyLowerBrUnlessPass(PassRegistry &);
|
|
|
|
void initializeWebAssemblyRegNumberingPass(PassRegistry &);
|
|
|
|
void initializeWebAssemblyPeepholePass(PassRegistry &);
|
|
|
|
void initializeWebAssemblyCallIndirectFixupPass(PassRegistry &);
|
|
|
|
|
2015-06-30 07:51:55 +08:00
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|