With the "wasm32-unknown-unknown-wasm" triple, this allows writing out simple wasm object files, and is another step in a larger series toward migrating from ELF to general wasm object support. Note that this code and the binary format itself is still experimental. llvm-svn: 296190
36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
//===-- WebAssemblyUtilities - WebAssembly Utility Functions ---*- C++ -*-====//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
/// \brief This file contains the declaration of the WebAssembly-specific
|
|
/// utility functions.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYUTILITIES_H
|
|
#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYUTILITIES_H
|
|
|
|
namespace llvm {
|
|
|
|
class MachineInstr;
|
|
class WebAssemblyFunctionInfo;
|
|
|
|
namespace WebAssembly {
|
|
|
|
bool isArgument(const MachineInstr &MI);
|
|
bool isCopy(const MachineInstr &MI);
|
|
bool isTee(const MachineInstr &MI);
|
|
bool isChild(const MachineInstr &MI, const WebAssemblyFunctionInfo &MFI);
|
|
bool isCallIndirect(const MachineInstr &MI);
|
|
|
|
} // end namespace WebAssembly
|
|
} // end namespace llvm
|
|
|
|
#endif
|