LLVM 20.0.0git
Public Member Functions | List of all members
llvm::mca::DefaultResourceStrategy Class Referencefinal

Default resource allocation strategy used by processor resource groups and processor resources with multiple units. More...

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

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

Public Member Functions

 DefaultResourceStrategy (uint64_t UnitMask)
 
virtual ~DefaultResourceStrategy ()=default
 
uint64_t select (uint64_t ReadyMask) override
 Selects a processor resource unit from a ReadyMask.
 
void used (uint64_t Mask) override
 Called by the ResourceManager when a processor resource group, or a processor resource with multiple units has become unavailable.
 
- Public Member Functions inherited from llvm::mca::ResourceStrategy
 ResourceStrategy ()=default
 
virtual ~ResourceStrategy ()
 
virtual uint64_t select (uint64_t ReadyMask)=0
 Selects a processor resource unit from a ReadyMask.
 
virtual void used (uint64_t ResourceMask)
 Called by the ResourceManager when a processor resource group, or a processor resource with multiple units has become unavailable.
 

Detailed Description

Default resource allocation strategy used by processor resource groups and processor resources with multiple units.

Definition at line 67 of file ResourceManager.h.

Constructor & Destructor Documentation

◆ DefaultResourceStrategy()

llvm::mca::DefaultResourceStrategy::DefaultResourceStrategy ( uint64_t  UnitMask)
inline

Definition at line 120 of file ResourceManager.h.

◆ ~DefaultResourceStrategy()

virtual llvm::mca::DefaultResourceStrategy::~DefaultResourceStrategy ( )
virtualdefault

Member Function Documentation

◆ select()

uint64_t llvm::mca::DefaultResourceStrategy::select ( uint64_t  ReadyMask)
overridevirtual

Selects a processor resource unit from a ReadyMask.

Implements llvm::mca::ResourceStrategy.

Definition at line 34 of file ResourceManager.cpp.

References llvm::mca::selectImpl().

◆ used()

void llvm::mca::DefaultResourceStrategy::used ( uint64_t  ResourceMask)
overridevirtual

Called by the ResourceManager when a processor resource group, or a processor resource with multiple units has become unavailable.

The default strategy uses this information to bias its selection logic.

Reimplemented from llvm::mca::ResourceStrategy.

Definition at line 51 of file ResourceManager.cpp.


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