38 unsigned NumRegs = TLI.getNumRegisters(F.
getContext(), VT);
40 for (
unsigned I = 0;
I != NumRegs; ++
I)
52 if (Results.
size() > 1 &&
62 for (
auto *Param : Ty->
params())
74 std::unique_ptr<wasm::WasmSignature>
77 auto Sig = std::make_unique<wasm::WasmSignature>();
static MVT getIntegerVT(unsigned BitWidth)
This file defines the interfaces that WebAssembly uses to lower LLVM code into a selection DAG...
A parsed version of the target data layout string in and methods for querying it. ...
void initializeBaseYamlFields(const yaml::WebAssemblyFunctionInfo &YamlMFI)
This class represents lattice values for constants.
void push_back(const T &Elt)
unsigned getPointerSizeInBits(unsigned AS=0) const
Layout pointer size, in bits FIXME: The defaults need to be removed once all of the backends/clients ...
const DataLayout createDataLayout() const
Create a DataLayout.
void computeSignatureVTs(const FunctionType *Ty, const Function &F, const TargetMachine &TM, SmallVectorImpl< MVT > &Params, SmallVectorImpl< MVT > &Results)
std::unique_ptr< wasm::WasmSignature > signatureFromMVTs(const SmallVectorImpl< MVT > &Results, const SmallVectorImpl< MVT > &Params)
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Class to represent function types.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
void ComputeValueVTs(const TargetLowering &TLI, const DataLayout &DL, Type *Ty, SmallVectorImpl< EVT > &ValueVTs, SmallVectorImpl< uint64_t > *Offsets=nullptr, uint64_t StartingOffset=0)
ComputeValueVTs - Given an LLVM IR type, compute a sequence of EVTs that represent all the individual...
wasm::ValType toValType(const MVT &Ty)
The instances of the Type class are immutable: once they are created, they are never changed...
ArrayRef< Type * > params() const
unsigned getNumVirtRegs() const
getNumVirtRegs - Return the number of virtual registers created.
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function. ...
static const unsigned UnusedReg
This file declares the WebAssembly-specific subclass of TargetSubtarget.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Type * getReturnType() const
~WebAssemblyFunctionInfo() override
This class is derived from MachineFunctionInfo and contains private WebAssembly-specific information ...
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
bool isCFGStackified() const
This file declares WebAssembly-specific per-machine-function information.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void valTypesFromMVTs(const ArrayRef< MVT > &In, SmallVectorImpl< wasm::ValType > &Out)
Module * getParent()
Get the module that this global value is contained inside of...
void computeLegalValueVTs(const Function &F, const TargetMachine &TM, Type *Ty, SmallVectorImpl< MVT > &ValueVTs)
void mappingImpl(yaml::IO &YamlIO) override
WebAssemblyFunctionInfo()=default
Primary interface to the complete machine description for the target machine.
const STC & getSubtarget(const Function &F) const
This method returns a pointer to the specified type of TargetSubtargetInfo.