LLVM 20.0.0git
Classes | Public Member Functions | List of all members
llvm::mca::RegisterFile Class Reference

Manages hardware register files, and tracks register definitions for register renaming purposes. More...

#include "llvm/MCA/HardwareUnits/RegisterFile.h"

Inheritance diagram for llvm::mca::RegisterFile:
Inheritance graph
[legend]

Classes

struct  RAWHazard
 

Public Member Functions

 RegisterFile (const MCSchedModel &SM, const MCRegisterInfo &mri, unsigned NumRegs=0)
 
void collectWrites (const MCSubtargetInfo &STI, const ReadState &RS, SmallVectorImpl< WriteRef > &Writes, SmallVectorImpl< WriteRef > &CommittedWrites) const
 
RAWHazard checkRAWHazards (const MCSubtargetInfo &STI, const ReadState &RS) const
 
void addRegisterWrite (WriteRef Write, MutableArrayRef< unsigned > UsedPhysRegs)
 
void addRegisterRead (ReadState &RS, const MCSubtargetInfo &STI) const
 
void removeRegisterWrite (const WriteState &WS, MutableArrayRef< unsigned > FreedPhysRegs)
 
bool canEliminateMove (const WriteState &WS, const ReadState &RS, unsigned PRFIndex) const
 
bool tryEliminateMoveOrSwap (MutableArrayRef< WriteState > Writes, MutableArrayRef< ReadState > Reads)
 
unsigned isAvailable (ArrayRef< MCPhysReg > Regs) const
 
unsigned getNumRegisterFiles () const
 
unsigned getElapsedCyclesFromWriteBack (const WriteRef &WR) const
 
void onInstructionExecuted (Instruction *IS)
 
void cycleStart ()
 
void cycleEnd ()
 
void dump () const
 
- Public Member Functions inherited from llvm::mca::HardwareUnit
 HardwareUnit ()=default
 
virtual ~HardwareUnit ()
 

Detailed Description

Manages hardware register files, and tracks register definitions for register renaming purposes.

Definition at line 83 of file RegisterFile.h.

Constructor & Destructor Documentation

◆ RegisterFile()

llvm::mca::RegisterFile::RegisterFile ( const MCSchedModel SM,
const MCRegisterInfo mri,
unsigned  NumRegs = 0 
)

Definition at line 64 of file RegisterFile.cpp.

Member Function Documentation

◆ addRegisterRead()

void llvm::mca::RegisterFile::addRegisterRead ( ReadState RS,
const MCSubtargetInfo STI 
) const

◆ addRegisterWrite()

void llvm::mca::RegisterFile::addRegisterWrite ( WriteRef  Write,
MutableArrayRef< unsigned UsedPhysRegs 
)

◆ canEliminateMove()

bool llvm::mca::RegisterFile::canEliminateMove ( const WriteState WS,
const ReadState RS,
unsigned  PRFIndex 
) const

◆ checkRAWHazards()

RegisterFile::RAWHazard llvm::mca::RegisterFile::checkRAWHazards ( const MCSubtargetInfo STI,
const ReadState RS 
) const

◆ collectWrites()

void llvm::mca::RegisterFile::collectWrites ( const MCSubtargetInfo STI,
const ReadState RS,
SmallVectorImpl< WriteRef > &  Writes,
SmallVectorImpl< WriteRef > &  CommittedWrites 
) const

◆ cycleEnd()

void llvm::mca::RegisterFile::cycleEnd ( )
inline

◆ cycleStart()

void llvm::mca::RegisterFile::cycleStart ( )

◆ dump()

void llvm::mca::RegisterFile::dump ( ) const

◆ getElapsedCyclesFromWriteBack()

unsigned llvm::mca::RegisterFile::getElapsedCyclesFromWriteBack ( const WriteRef WR) const

◆ getNumRegisterFiles()

unsigned llvm::mca::RegisterFile::getNumRegisterFiles ( ) const
inline

◆ isAvailable()

unsigned llvm::mca::RegisterFile::isAvailable ( ArrayRef< MCPhysReg Regs) const

Definition at line 660 of file RegisterFile.cpp.

References llvm::dbgs(), E, getNumRegisterFiles(), I, and LLVM_DEBUG.

◆ onInstructionExecuted()

void llvm::mca::RegisterFile::onInstructionExecuted ( Instruction IS)

◆ removeRegisterWrite()

void llvm::mca::RegisterFile::removeRegisterWrite ( const WriteState WS,
MutableArrayRef< unsigned FreedPhysRegs 
)

◆ tryEliminateMoveOrSwap()

bool llvm::mca::RegisterFile::tryEliminateMoveOrSwap ( MutableArrayRef< WriteState Writes,
MutableArrayRef< ReadState Reads 
)

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