LLVM  8.0.0svn
Functions | Variables
WebAssemblyMCInstLower.cpp File Reference

This file contains code to lower WebAssembly MachineInstrs to their corresponding MCInst records. More...

#include "WebAssemblyMCInstLower.h"
#include "WebAssemblyAsmPrinter.h"
#include "WebAssemblyMachineFunctionInfo.h"
#include "WebAssemblyRuntimeLibcallSignatures.h"
#include "WebAssemblyUtilities.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/IR/Constants.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCSymbolWasm.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "WebAssemblyGenStackifier.inc"
Include dependency graph for WebAssemblyMCInstLower.cpp:

Go to the source code of this file.

Functions

static unsigned regInstructionToStackInstruction (unsigned OpCode)
 
static void removeRegisterOperands (const MachineInstr *MI, MCInst &OutMI)
 
static wasm::ValType getType (const TargetRegisterClass *RC)
 

Variables

static cl::opt< boolWasmKeepRegisters ("wasm-keep-registers", cl::Hidden, cl::desc("WebAssembly: output stack registers in" " instruction output for test purposes only."), cl::init(false))
 

Detailed Description

This file contains code to lower WebAssembly MachineInstrs to their corresponding MCInst records.

Definition in file WebAssemblyMCInstLower.cpp.

Function Documentation

◆ getType()

static wasm::ValType getType ( const TargetRegisterClass RC)
static

Definition at line 143 of file WebAssemblyMCInstLower.cpp.

References llvm::wasm::F32, llvm::wasm::F64, llvm::wasm::I32, llvm::wasm::I64, and llvm_unreachable.

Referenced by allSameType(), llvm::Record::appendLoc(), llvm::object::BaseRelocRef::BaseRelocRef(), branchMaxOffsets(), llvm::MachineIRBuilderBase::buildBlockAddress(), llvm::MachineIRBuilderBase::buildBrCond(), llvm::MachineIRBuilderBase::buildBrIndirect(), llvm::MachineIRBuilderBase::buildConstant(), llvm::MachineIRBuilderBase::buildCopy(), llvm::MachineIRBuilderBase::buildExtOrTrunc(), llvm::MachineIRBuilderBase::buildExtract(), llvm::MachineIRBuilderBase::buildFCmp(), llvm::MachineIRBuilderBase::buildFConstant(), llvm::MachineIRBuilderBase::buildFrameIndex(), llvm::MachineIRBuilderBase::buildGEP(), llvm::MachineIRBuilderBase::buildGlobalValue(), llvm::MachineIRBuilderBase::buildICmp(), llvm::MachineIRBuilderBase::buildInsert(), llvm::MachineIRBuilderBase::buildLoadInstr(), llvm::MachineIRBuilderBase::buildMerge(), llvm::MachineIRBuilderBase::buildPtrMask(), llvm::MachineIRBuilderBase::buildSelect(), llvm::MachineIRBuilderBase::buildSequence(), llvm::MachineIRBuilderBase::buildStore(), llvm::MachineIRBuilderBase::buildUAdde(), llvm::MachineIRBuilderBase::buildUnmerge(), llvm::canConstantFoldCallTo(), llvm::UnOpInit::clone(), llvm::BinOpInit::clone(), llvm::TernOpInit::clone(), cloneConstantExprWithNewAddressSpace(), concatSubVector(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldLoadFromConstPtr(), llvm::TypedInit::convertInitializerBitRange(), llvm::TypedInit::convertInitializerTo(), llvm::ListInit::convertInitializerTo(), llvm::DefInit::convertInitializerTo(), llvm::TypedInit::convertInitListSlice(), createCallInst(), llvm::createSeparateConstOffsetFromGEPPass(), DoInitialMatch(), llvm::GVNExpression::Expression::dump(), encodeBase64StringEntry(), llvm::GVNExpression::BasicExpression::equals(), llvm::UnOpInit::Fold(), llvm::TernOpInit::Fold(), FunctionNumber(), llvm::InlineAsm::get(), GetAEABIUnwindPersonalityName(), llvm::UnOpInit::getAsString(), llvm::object::COFFSymbolRef::getBaseType(), llvm::OpInit::getBit(), llvm::VarInit::getBit(), llvm::VarListElementInit::getBit(), llvm::FieldInit::getBit(), llvm::TypedInit::getCastTo(), getChainID(), llvm::object::COFFSymbolRef::getComplexType(), llvm::getCopyDeclaration(), llvm::ListInit::getElementType(), llvm::TypedInit::getFieldType(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), getMemSetPatternValue(), llvm::MachineConstantPoolEntry::getSectionKind(), llvm::DIVariable::getSignedness(), llvm::ConstantPoolSDNode::getTargetFlags(), group2Shuffle(), llvm::DbgVariable::hasComplexAddress(), hasValueBeenRAUWed(), instrumentMaskedLoadOrStore(), llvm::object::MachOObjectFile::is64Bit(), llvm::DbgVariable::isArtificial(), llvm::object::Elf_Sym_Impl< ELFT >::isCommon(), llvm::HexagonMCInstrInfo::isCompound(), llvm::rdf::RefNode::isDef(), llvm::HexagonMCInstrInfo::isHVX(), llvm::DbgVariable::isObjectPointer(), llvm::MachineInstr::isOperandSubregIdx(), isReInterleaveMask(), llvm::rdf::RefNode::isUse(), llvm::HexagonMCInstrInfo::isVector(), LLVMTypeOf(), llvm::WebAssemblyMCInstLower::Lower(), llvm::fuzzerop::matchFirstType(), matchScalarInAggregate(), llvm::fuzzerop::matchScalarOfFirstType(), llvm::MachineIRBuilderBase::materializeGEP(), PerformHeapAllocSRoA(), llvm::ListInit::Profile(), llvm::UnOpInit::Profile(), llvm::BinOpInit::Profile(), llvm::TernOpInit::Profile(), readWideAPInt(), llvm::UnOpInit::resolveReferences(), llvm::BinOpInit::resolveReferences(), llvm::TernOpInit::resolveReferences(), llvm::object::Elf_Sym_Impl< ELFT >::setBinding(), llvm::ELF::Elf32_Sym::setBinding(), llvm::ELF::Elf64_Sym::setBinding(), llvm::object::Elf_Rel_Impl< ELFType< TargetEndianness, false >, false >::setSymbol(), llvm::object::Elf_Rel_Impl< ELFType< TargetEndianness, true >, false >::setSymbol(), llvm::ELF::Elf32_Rel::setSymbol(), llvm::ELF::Elf32_Rela::setSymbol(), llvm::ELF::Elf64_Rel::setSymbol(), llvm::ELF::Elf64_Rela::setSymbol(), llvm::ARMAsmBackend::shouldForceRelocation(), SimplifyGEPInst(), speculatePHIs(), splitGlobal(), tryUnmergingGEPsAcrossIndirectBr(), llvm::UpgradeIntrinsicCall(), llvm::MachineIRBuilderBase::validateBinaryOp(), validExtractValueIndex(), validInsertValueIndex(), llvm::InstCombiner::visitLandingPadInst(), llvm::InstCombiner::visitLShr(), and llvm::MetadataAsValue::~MetadataAsValue().

◆ regInstructionToStackInstruction()

static unsigned regInstructionToStackInstruction ( unsigned  OpCode)
static

Definition at line 285 of file WebAssemblyMCInstLower.cpp.

References llvm_unreachable.

Referenced by removeRegisterOperands().

◆ removeRegisterOperands()

static void removeRegisterOperands ( const MachineInstr MI,
MCInst OutMI 
)
static

Variable Documentation

◆ WasmKeepRegisters

cl::opt<bool> WasmKeepRegisters("wasm-keep-registers", cl::Hidden, cl::desc("WebAssembly: output stack registers in" " instruction output for test purposes only."), cl::init(false))
static