16 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYMACHINEFUNCTIONINFO_H 17 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYMACHINEFUNCTIONINFO_H 29 std::vector<MVT> Params;
30 std::vector<MVT> Results;
31 std::vector<MVT> Locals;
34 std::vector<unsigned> WARegs;
47 unsigned VarargVreg = -1U;
51 unsigned BasePtrVreg = -1U;
58 const std::vector<MVT> &
getParams()
const {
return Params; }
61 const std::vector<MVT> &
getResults()
const {
return Results; }
68 const std::vector<MVT> &
getLocals()
const {
return Locals; }
71 assert(VarargVreg != -1U &&
"Vararg vreg hasn't been set");
77 assert(BasePtrVreg != -1U &&
"Base ptr vreg hasn't been set");
85 assert(MF.getRegInfo().getUniqueVRegDef(VReg));
87 if (I >= VRegStackified.
size())
88 VRegStackified.
resize(I + 1);
89 VRegStackified.
set(I);
93 if (
I >= VRegStackified.
size())
95 return VRegStackified.
test(
I);
100 assert(WAReg != UnusedReg);
114 return Reg & INT32_MAX;
void resize(unsigned N, bool t=false)
resize - Grow or shrink the bitvector.
unsigned getVarargBufferVreg() const
static unsigned virtReg2Index(unsigned Reg)
Convert a virtual register number to a 0-based index.
Compute iterated dominance frontiers using a linear time algorithm.
const std::vector< MVT > & getLocals() const
bool test(unsigned Idx) const
void setWAReg(unsigned VReg, unsigned WAReg)
unsigned getBasePointerVreg() const
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
void ComputeLegalValueVTs(const Function &F, const TargetMachine &TM, Type *Ty, SmallVectorImpl< MVT > &ValueVTs)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
bool isVRegStackified(unsigned VReg) const
void setBasePointerVreg(unsigned Reg)
The instances of the Type class are immutable: once they are created, they are never changed...
void ComputeSignatureVTs(const Function &F, const TargetMachine &TM, SmallVectorImpl< MVT > &Params, SmallVectorImpl< MVT > &Results)
This file provides WebAssembly-specific target descriptions.
void setNumLocals(size_t NumLocals)
WebAssemblyFunctionInfo(MachineFunction &MF)
void setVarargBufferVreg(unsigned Reg)
void stackifyVReg(unsigned VReg)
static const unsigned UnusedReg
void setLocal(size_t i, MVT VT)
void clearParamsAndResults()
~WebAssemblyFunctionInfo() override
This class is derived from MachineFunctionInfo and contains private WebAssembly-specific information ...
size_type size() const
size - Returns the number of bits in this bitvector.
const std::vector< MVT > & getResults() const
unsigned getWAReg(unsigned VReg) const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Primary interface to the complete machine description for the target machine.
const std::vector< MVT > & getParams() const
static unsigned getWARegStackId(unsigned Reg)