LLVM  10.0.0svn
Public Member Functions | List of all members
llvm::mca::ResourceCycles Class Reference

This class represents the number of cycles per resource (fractions of cycles). More...

#include "llvm/MCA/Support.h"

Public Member Functions

 ResourceCycles ()
 
 ResourceCycles (unsigned Cycles, unsigned ResourceUnits=1)
 
 operator double () const
 
unsigned getNumerator () const
 
unsigned getDenominator () const
 
ResourceCyclesoperator+= (const ResourceCycles &RHS)
 

Detailed Description

This class represents the number of cycles per resource (fractions of cycles).

That quantity is managed here as a ratio, and accessed via the double cast-operator below. The two quantities, number of cycles and number of resources, are kept separate. This is used by the ResourcePressureView to calculate the average resource cycles per instruction/iteration.

Definition at line 50 of file Support.h.

Constructor & Destructor Documentation

◆ ResourceCycles() [1/2]

llvm::mca::ResourceCycles::ResourceCycles ( )
inline

Definition at line 54 of file Support.h.

Referenced by llvm::mca::computeBlockRThroughput().

◆ ResourceCycles() [2/2]

llvm::mca::ResourceCycles::ResourceCycles ( unsigned  Cycles,
unsigned  ResourceUnits = 1 
)
inline

Definition at line 55 of file Support.h.

Member Function Documentation

◆ getDenominator()

unsigned llvm::mca::ResourceCycles::getDenominator ( ) const
inline

Definition at line 64 of file Support.h.

References llvm::mca::computeProcResourceMasks(), and llvm::operator+=().

◆ getNumerator()

unsigned llvm::mca::ResourceCycles::getNumerator ( ) const
inline

Definition at line 63 of file Support.h.

◆ operator double()

llvm::mca::ResourceCycles::operator double ( ) const
inline

Definition at line 58 of file Support.h.

References assert().

◆ operator+=()

ResourceCycles & llvm::mca::ResourceCycles::operator+= ( const ResourceCycles RHS)

Definition at line 23 of file Support.cpp.

References llvm::GreatestCommonDivisor64().


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