LLVM: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp File Reference (original) (raw)

This file contains a printer that converts from our internal representation of machine-dependent LLVM code to the WebAssembly assembly language. More...

#include "[WebAssemblyAsmPrinter.h](WebAssemblyAsmPrinter%5F8h%5Fsource.html)"
#include "[MCTargetDesc/WebAssemblyMCTargetDesc.h](WebAssemblyMCTargetDesc%5F8h%5Fsource.html)"
#include "[MCTargetDesc/WebAssemblyTargetStreamer.h](WebAssemblyTargetStreamer%5F8h%5Fsource.html)"
#include "[TargetInfo/WebAssemblyTargetInfo.h](WebAssemblyTargetInfo%5F8h%5Fsource.html)"
#include "[Utils/WebAssemblyTypeUtilities.h](WebAssemblyTypeUtilities%5F8h%5Fsource.html)"
#include "[WebAssemblyMCInstLower.h](WebAssemblyMCInstLower%5F8h%5Fsource.html)"
#include "[WebAssemblyMachineFunctionInfo.h](WebAssemblyMachineFunctionInfo%5F8h%5Fsource.html)"
#include "[WebAssemblyRegisterInfo.h](WebAssemblyRegisterInfo%5F8h%5Fsource.html)"
#include "[WebAssemblyRuntimeLibcallSignatures.h](WebAssemblyRuntimeLibcallSignatures%5F8h%5Fsource.html)"
#include "[WebAssemblyUtilities.h](WebAssemblyUtilities%5F8h%5Fsource.html)"
#include "[llvm/ADT/MapVector.h](MapVector%5F8h%5Fsource.html)"
#include "[llvm/ADT/SmallSet.h](SmallSet%5F8h%5Fsource.html)"
#include "[llvm/ADT/StringExtras.h](StringExtras%5F8h%5Fsource.html)"
#include "[llvm/Analysis/ValueTracking.h](ValueTracking%5F8h%5Fsource.html)"
#include "[llvm/BinaryFormat/Wasm.h](BinaryFormat%5F2Wasm%5F8h%5Fsource.html)"
#include "[llvm/CodeGen/Analysis.h](llvm%5F2CodeGen%5F2Analysis%5F8h%5Fsource.html)"
#include "[llvm/CodeGen/AsmPrinter.h](AsmPrinter%5F8h%5Fsource.html)"
#include "[llvm/CodeGen/MachineConstantPool.h](MachineConstantPool%5F8h%5Fsource.html)"
#include "[llvm/CodeGen/MachineInstr.h](MachineInstr%5F8h%5Fsource.html)"
#include "[llvm/CodeGen/MachineModuleInfoImpls.h](MachineModuleInfoImpls%5F8h%5Fsource.html)"
#include "[llvm/IR/DataLayout.h](DataLayout%5F8h%5Fsource.html)"
#include "[llvm/IR/DebugInfoMetadata.h](DebugInfoMetadata%5F8h%5Fsource.html)"
#include "[llvm/IR/GlobalVariable.h](GlobalVariable%5F8h%5Fsource.html)"
#include "[llvm/IR/Metadata.h](Metadata%5F8h%5Fsource.html)"
#include "[llvm/IR/Module.h](IR%5F2Module%5F8h%5Fsource.html)"
#include "[llvm/MC/MCContext.h](MCContext%5F8h%5Fsource.html)"
#include "[llvm/MC/MCSectionWasm.h](MCSectionWasm%5F8h%5Fsource.html)"
#include "[llvm/MC/MCStreamer.h](MCStreamer%5F8h%5Fsource.html)"
#include "[llvm/MC/MCSymbol.h](MCSymbol%5F8h%5Fsource.html)"
#include "[llvm/MC/MCSymbolWasm.h](MCSymbolWasm%5F8h%5Fsource.html)"
#include "[llvm/MC/TargetRegistry.h](TargetRegistry%5F8h%5Fsource.html)"
#include "[llvm/Support/Debug.h](Debug%5F8h%5Fsource.html)"
#include "[llvm/Support/raw_ostream.h](raw%5F%5Fostream%5F8h%5Fsource.html)"

Go to the source code of this file.

Macros
#define DEBUG_TYPE "asm-printer"
Functions
static bool isEmscriptenInvokeName (StringRef Name)
static char getInvokeSig (wasm::ValType VT)
static std::string getEmscriptenInvokeSymbolName (wasm::WasmSignature *Sig)
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyAsmPrinter ()
Variables
cl::opt< bool > WasmKeepRegisters

Detailed Description

This file contains a printer that converts from our internal representation of machine-dependent LLVM code to the WebAssembly assembly language.

Definition in file WebAssemblyAsmPrinter.cpp.

Macro Definition Documentation

DEBUG_TYPE

#define DEBUG_TYPE "asm-printer"

Definition at line 52 of file WebAssemblyAsmPrinter.cpp.

Function Documentation

getEmscriptenInvokeSymbolName()

static std::string getEmscriptenInvokeSymbolName ( wasm::WasmSignature * Sig) static

Definition at line 136 of file WebAssemblyAsmPrinter.cpp.

References assert(), llvm::SmallVectorBase< Size_T >::empty(), getInvokeSig(), I, llvm::wasm::WasmSignature::Params, llvm::wasm::WasmSignature::Returns, and llvm::SmallVectorBase< Size_T >::size().

Referenced by llvm::WebAssemblyAsmPrinter::getMCSymbolForFunction().

getInvokeSig()

static char getInvokeSig ( wasm::ValType VT) static

Definition at line 111 of file WebAssemblyAsmPrinter.cpp.

References llvm::wasm::EXNREF, llvm::wasm::EXTERNREF, llvm::wasm::F32, llvm::wasm::F64, llvm::wasm::FUNCREF, llvm::wasm::I32, llvm::wasm::I64, llvm_unreachable, and llvm::wasm::V128.

Referenced by getEmscriptenInvokeSymbolName().

isEmscriptenInvokeName()

static bool isEmscriptenInvokeName ( StringRef Name) static

Definition at line 103 of file WebAssemblyAsmPrinter.cpp.

References Name.

Referenced by llvm::WebAssemblyAsmPrinter::getMCSymbolForFunction().

LLVMInitializeWebAssemblyAsmPrinter()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyAsmPrinter ( )

Definition at line 756 of file WebAssemblyAsmPrinter.cpp.

References llvm::getTheWebAssemblyTarget32(), llvm::getTheWebAssemblyTarget64(), X, and Y.

Variable Documentation

WasmKeepRegisters

cl::opt<bool> WasmKeepRegisters extern

Referenced by llvm::WebAssemblyMCInstLower::lower().