48 for (
unsigned I = 0;
I != NumRegs; ++
I)
81 for (
auto *Param : Ty->params())
94 bool HasSwiftErrorArg =
false;
95 bool HasSwiftSelfArg =
false;
96 bool HasSwiftAsyncArg =
false;
97 for (
const auto &Arg : TargetFunc->
args()) {
98 HasSwiftErrorArg |= Arg.hasAttribute(Attribute::SwiftError);
99 HasSwiftSelfArg |= Arg.hasAttribute(Attribute::SwiftSelf);
100 HasSwiftAsyncArg |= Arg.hasAttribute(Attribute::SwiftAsync);
102 if (!HasSwiftSelfArg)
104 if (!HasSwiftErrorArg)
121 auto Sig = Ctx.createWasmSignature();
131 Params.push_back(
EVT(VT).getEVTString());
143 for (
auto VT : YamlMFI.
Params)
145 for (
auto VT : YamlMFI.
Results)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Function Alias Analysis Results
This file defines the interfaces that WebAssembly uses to lower LLVM code into a selection DAG.
This file declares WebAssembly-specific per-machine-function information.
This file declares the WebAssembly-specific subclass of TargetSubtarget.
This file contains the declaration of the WebAssembly-specific type parsing utility functions.
This file contains the declaration of the WebAssembly-specific utility functions.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
A parsed version of the target data layout string in and methods for querying it.
unsigned getPointerSizeInBits(unsigned AS=0) const
The size in bits of the pointer representation in a given address space.
Class to represent function types.
iterator_range< arg_iterator > args()
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
This is an important class for using LLVM in a threaded context.
Context object for machine code objects.
static MVT getIntegerVT(unsigned BitWidth)
Ty * cloneInfo(const Ty &Old)
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
unsigned getNumVirtRegs() const
getNumVirtRegs - Return the number of virtual registers created.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
MVT getRegisterType(LLVMContext &Context, EVT VT) const
Return the type of registers that this ValueType will eventually require.
virtual unsigned getNumRegisters(LLVMContext &Context, EVT VT, std::optional< MVT > RegisterVT=std::nullopt) const
Return the number of registers that this ValueType will eventually require.
Primary interface to the complete machine description for the target machine.
const DataLayout createDataLayout() const
Create a DataLayout.
const STC & getSubtarget(const Function &F) const
This method returns a pointer to the specified type of TargetSubtargetInfo.
The instances of the Type class are immutable: once they are created, they are never changed.
This class is derived from MachineFunctionInfo and contains private WebAssembly-specific information ...
WebAssemblyFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
~WebAssemblyFunctionInfo() override
const std::vector< MVT > & getResults() const
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
void initWARegs(MachineRegisterInfo &MRI)
void initializeBaseYamlFields(MachineFunction &MF, const yaml::WebAssemblyFunctionInfo &YamlMFI)
const std::vector< MVT > & getParams() const
@ Swift
Calling convention for Swift.
@ SwiftTail
This follows the Swift calling convention in how arguments are passed but guarantees tail calls will ...
wasm::ValType toValType(MVT Type)
static const unsigned UnusedReg
bool canLowerReturn(size_t ResultSize, const WebAssemblySubtarget *Subtarget)
Returns true if the function's return value(s) can be lowered directly, i.e., not indirectly via a po...
MVT parseMVT(StringRef Type)
This is an optimization pass for GlobalISel generic memory operations.
void computeSignatureVTs(const FunctionType *Ty, const Function *TargetFunc, const Function &ContextFunc, const TargetMachine &TM, SmallVectorImpl< MVT > &Params, SmallVectorImpl< MVT > &Results)
LLVM_ABI void ComputeValueVTs(const TargetLowering &TLI, const DataLayout &DL, Type *Ty, SmallVectorImpl< EVT > &ValueVTs, SmallVectorImpl< EVT > *MemVTs=nullptr, SmallVectorImpl< TypeSize > *Offsets=nullptr, TypeSize StartingOffset=TypeSize::getZero())
ComputeValueVTs - Given an LLVM IR type, compute a sequence of EVTs that represent all the individual...
void valTypesFromMVTs(ArrayRef< MVT > In, SmallVectorImpl< wasm::ValType > &Out)
wasm::WasmSignature * signatureFromMVTs(MCContext &Ctx, const SmallVectorImpl< MVT > &Results, const SmallVectorImpl< MVT > &Params)
void computeLegalValueVTs(const WebAssemblyTargetLowering &TLI, LLVMContext &Ctx, const DataLayout &DL, Type *Ty, SmallVectorImpl< MVT > &ValueVTs)
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
This class should be specialized by any type that needs to be converted to/from a YAML mapping.
WebAssemblyFunctionInfo()=default
void mappingImpl(yaml::IO &YamlIO) override
std::vector< FlowStringValue > Results
std::vector< FlowStringValue > Params