LLVM 20.0.0git
Classes | Public Member Functions | Static Public Attributes | List of all members
llvm::RVVArgDispatcher Class Reference

As per the spec, the rules for passing vector arguments are as follows: More...

#include "Target/RISCV/RISCVISelLowering.h"

Classes

struct  RVVArgInfo
 

Public Member Functions

template<typename Arg >
 RVVArgDispatcher (const MachineFunction *MF, const RISCVTargetLowering *TLI, ArrayRef< Arg > ArgList)
 
 RVVArgDispatcher ()=default
 
MCPhysReg getNextPhysReg ()
 

Static Public Attributes

static constexpr unsigned NumArgVRs = 16
 

Detailed Description

As per the spec, the rules for passing vector arguments are as follows:

  1. For the first vector mask argument, use v0 to pass it.
  2. For vector data arguments or rest vector mask arguments, starting from the v8 register, if a vector register group between v8-v23 that has not been allocated can be found and the first register number is a multiple of LMUL, then allocate this vector register group to the argument and mark these registers as allocated. Otherwise, pass it by reference and are replaced in the argument list with the address.
  3. For tuple vector data arguments, starting from the v8 register, if NFIELDS consecutive vector register groups between v8-v23 that have not been allocated can be found and the first register number is a multiple of LMUL, then allocate these vector register groups to the argument and mark these registers as allocated. Otherwise, pass it by reference and are replaced in the argument list with the address.

Definition at line 1067 of file RISCVISelLowering.h.

Constructor & Destructor Documentation

◆ RVVArgDispatcher() [1/2]

template<typename Arg >
llvm::RVVArgDispatcher::RVVArgDispatcher ( const MachineFunction MF,
const RISCVTargetLowering TLI,
ArrayRef< Arg >  ArgList 
)
inline

Definition at line 1078 of file RISCVISelLowering.h.

◆ RVVArgDispatcher() [2/2]

llvm::RVVArgDispatcher::RVVArgDispatcher ( )
default

Member Function Documentation

◆ getNextPhysReg()

MCPhysReg RVVArgDispatcher::getNextPhysReg ( )

Definition at line 21801 of file RISCVISelLowering.cpp.

References assert().

Referenced by llvm::RISCV::CC_RISCV(), and llvm::RISCV::CC_RISCV_FastCC().

Member Data Documentation

◆ NumArgVRs

constexpr unsigned llvm::RVVArgDispatcher::NumArgVRs = 16
staticconstexpr

Definition at line 1069 of file RISCVISelLowering.h.


The documentation for this class was generated from the following files: