LLVM 22.0.0git
RegisterBankInfo.cpp File Reference

This file implements the RegisterBankInfo class. More...

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "registerbankinfo"

Functions

 STATISTIC (NumPartialMappingsCreated, "Number of partial mappings dynamically created")
 STATISTIC (NumPartialMappingsAccessed, "Number of partial mappings dynamically accessed")
 STATISTIC (NumValueMappingsCreated, "Number of value mappings dynamically created")
 STATISTIC (NumValueMappingsAccessed, "Number of value mappings dynamically accessed")
 STATISTIC (NumOperandsMappingsCreated, "Number of operands mappings dynamically created")
 STATISTIC (NumOperandsMappingsAccessed, "Number of operands mappings dynamically accessed")
 STATISTIC (NumInstructionMappingsCreated, "Number of instruction mappings dynamically created")
 STATISTIC (NumInstructionMappingsAccessed, "Number of instruction mappings dynamically accessed")
static bool isCopyLike (const MachineInstr &MI)
 Check whether or not MI should be treated like a copy for the mappings.
static hash_code hashPartialMapping (unsigned StartIdx, unsigned Length, const RegisterBank *RegBank)
 Hashing function for PartialMapping.
static hash_code hashValueMapping (const RegisterBankInfo::PartialMapping *BreakDown, unsigned NumBreakDowns)
static hash_code hashInstructionMapping (unsigned ID, unsigned Cost, const RegisterBankInfo::ValueMapping *OperandsMapping, unsigned NumOperands)

Detailed Description

This file implements the RegisterBankInfo class.

Definition in file RegisterBankInfo.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "registerbankinfo"

Definition at line 29 of file RegisterBankInfo.cpp.

Function Documentation

◆ hashInstructionMapping()

hash_code hashInstructionMapping ( unsigned ID,
unsigned Cost,
const RegisterBankInfo::ValueMapping * OperandsMapping,
unsigned NumOperands )
static

Definition at line 374 of file RegisterBankInfo.cpp.

References llvm::hash_combine().

◆ hashPartialMapping()

hash_code hashPartialMapping ( unsigned StartIdx,
unsigned Length,
const RegisterBank * RegBank )
static

Hashing function for PartialMapping.

Definition at line 267 of file RegisterBankInfo.cpp.

References llvm::RegisterBank::getID(), llvm::hash_combine(), and llvm::Length.

Referenced by llvm::RegisterBankInfo::getPartialMapping(), and llvm::hash_value().

◆ hashValueMapping()

◆ isCopyLike()

bool isCopyLike ( const MachineInstr & MI)
static

Check whether or not MI should be treated like a copy for the mappings.

Copy like instruction are special for mapping because they don't have actual register constraints. Moreover, they sometimes have register classes assigned and we can just use that instead of failing to provide a generic mapping.

Definition at line 155 of file RegisterBankInfo.cpp.

References MI.

Referenced by llvm::RegisterBankInfo::getInstrMappingImpl(), and llvm::RegisterBankInfo::InstructionMapping::verify().

◆ STATISTIC() [1/8]

STATISTIC ( NumInstructionMappingsAccessed ,
"Number of instruction mappings dynamically accessed"  )

◆ STATISTIC() [2/8]

STATISTIC ( NumInstructionMappingsCreated ,
"Number of instruction mappings dynamically created"  )

◆ STATISTIC() [3/8]

STATISTIC ( NumOperandsMappingsAccessed ,
"Number of operands mappings dynamically accessed"  )

◆ STATISTIC() [4/8]

STATISTIC ( NumOperandsMappingsCreated ,
"Number of operands mappings dynamically created"  )

◆ STATISTIC() [5/8]

STATISTIC ( NumPartialMappingsAccessed ,
"Number of partial mappings dynamically accessed"  )

◆ STATISTIC() [6/8]

STATISTIC ( NumPartialMappingsCreated ,
"Number of partial mappings dynamically created"  )

◆ STATISTIC() [7/8]

STATISTIC ( NumValueMappingsAccessed ,
"Number of value mappings dynamically accessed"  )

◆ STATISTIC() [8/8]

STATISTIC ( NumValueMappingsCreated ,
"Number of value mappings dynamically created"  )