LLVM 19.0.0git
Namespaces | Macros | Enumerations | Functions | Variables
RISCVRegisterBankInfo.cpp File Reference

This file implements the targeting of the RegisterBankInfo class for RISC-V. More...

#include "RISCVRegisterBankInfo.h"
#include "MCTargetDesc/RISCVMCTargetDesc.h"
#include "RISCVSubtarget.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RegisterBank.h"
#include "llvm/CodeGen/RegisterBankInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "RISCVGenRegisterBank.inc"

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::RISCV
 

Macros

#define GET_TARGET_REGBANK_IMPL
 

Enumerations

enum  llvm::RISCV::PartialMappingIdx {
  llvm::RISCV::PMI_GPRB32 = 0 , llvm::RISCV::PMI_GPRB64 = 1 , llvm::RISCV::PMI_FPRB32 = 2 , llvm::RISCV::PMI_FPRB64 = 3 ,
  llvm::RISCV::PMI_VRB64 = 4 , llvm::RISCV::PMI_VRB128 = 5 , llvm::RISCV::PMI_VRB256 = 6 , llvm::RISCV::PMI_VRB512 = 7
}
 
enum  llvm::RISCV::ValueMappingIdx {
  llvm::RISCV::InvalidIdx = 0 , llvm::RISCV::GPRB32Idx = 1 , llvm::RISCV::GPRB64Idx = 4 , llvm::RISCV::FPRB32Idx = 7 ,
  llvm::RISCV::FPRB64Idx = 10 , llvm::RISCV::VRB64Idx = 13 , llvm::RISCV::VRB128Idx = 16 , llvm::RISCV::VRB256Idx = 19 ,
  llvm::RISCV::VRB512Idx = 22
}
 

Functions

static const RegisterBankInfo::ValueMappinggetFPValueMapping (unsigned Size)
 
static bool isPreISelGenericFloatingPointOpcode (unsigned Opc)
 Returns whether opcode Opc is a pre-isel generic floating-point opcode, having only floating-point operands.
 
static const RegisterBankInfo::ValueMappinggetVRBValueMapping (unsigned Size)
 

Variables

const RegisterBankInfo::PartialMapping llvm::RISCV::PartMappings []
 
const RegisterBankInfo::ValueMapping llvm::RISCV::ValueMappings []
 

Detailed Description

This file implements the targeting of the RegisterBankInfo class for RISC-V.

Todo:
This should be generated by TableGen.

Definition in file RISCVRegisterBankInfo.cpp.

Macro Definition Documentation

◆ GET_TARGET_REGBANK_IMPL

#define GET_TARGET_REGBANK_IMPL

Definition at line 21 of file RISCVRegisterBankInfo.cpp.

Function Documentation

◆ getFPValueMapping()

static const RegisterBankInfo::ValueMapping * getFPValueMapping ( unsigned  Size)
static

◆ getVRBValueMapping()

static const RegisterBankInfo::ValueMapping * getVRBValueMapping ( unsigned  Size)
static

◆ isPreISelGenericFloatingPointOpcode()

static bool isPreISelGenericFloatingPointOpcode ( unsigned  Opc)
static

Returns whether opcode Opc is a pre-isel generic floating-point opcode, having only floating-point operands.

FIXME: this is copied from target AArch64. Needs some code refactor here to put this function in GlobalISel/Utils.cpp.

Definition at line 160 of file RISCVRegisterBankInfo.cpp.