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

The default implementation of SourceMgr. More...

#include "llvm/MCA/SourceMgr.h"

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

Public Member Functions

 CircularSourceMgr (ArrayRef< UniqueInst > S, unsigned Iter)
 
ArrayRef< UniqueInstgetInstructions () const override
 Provides a fixed range of UniqueInst to iterate.
 
unsigned getNumIterations () const
 
bool hasNext () const override
 Whether there is any SourceRef to inspect / peek next.
 
bool isEnd () const override
 Whether the instruction stream has eneded.
 
SourceRef peekNext () const override
 The next SourceRef.
 
void updateNext () override
 Advance to the next SourceRef.
 
- Public Member Functions inherited from llvm::mca::SourceMgr
virtual ArrayRef< UniqueInstgetInstructions () const =0
 Provides a fixed range of UniqueInst to iterate.
 
virtual size_t size () const
 (Fixed) Number of UniqueInst.
 
virtual bool hasNext () const =0
 Whether there is any SourceRef to inspect / peek next.
 
virtual bool isEnd () const =0
 Whether the instruction stream has eneded.
 
virtual SourceRef peekNext () const =0
 The next SourceRef.
 
virtual void updateNext ()=0
 Advance to the next SourceRef.
 
virtual ~SourceMgr ()
 

Additional Inherited Members

- Public Types inherited from llvm::mca::SourceMgr
using UniqueInst = std::unique_ptr< Instruction >
 

Detailed Description

The default implementation of SourceMgr.

It always takes a fixed number of instructions and provides an option to loop the given sequence for a certain iterations.

Definition at line 59 of file SourceMgr.h.

Constructor & Destructor Documentation

◆ CircularSourceMgr()

llvm::mca::CircularSourceMgr::CircularSourceMgr ( ArrayRef< UniqueInst S,
unsigned  Iter 
)
inline

Definition at line 66 of file SourceMgr.h.

Member Function Documentation

◆ getInstructions()

ArrayRef< UniqueInst > llvm::mca::CircularSourceMgr::getInstructions ( ) const
inlineoverridevirtual

Provides a fixed range of UniqueInst to iterate.

Implements llvm::mca::SourceMgr.

Definition at line 69 of file SourceMgr.h.

◆ getNumIterations()

unsigned llvm::mca::CircularSourceMgr::getNumIterations ( ) const
inline

Definition at line 71 of file SourceMgr.h.

◆ hasNext()

bool llvm::mca::CircularSourceMgr::hasNext ( ) const
inlineoverridevirtual

Whether there is any SourceRef to inspect / peek next.

Note that returning false from this doesn't mean the instruction stream has ended.

Implements llvm::mca::SourceMgr.

Definition at line 72 of file SourceMgr.h.

Referenced by isEnd(), and peekNext().

◆ isEnd()

bool llvm::mca::CircularSourceMgr::isEnd ( ) const
inlineoverridevirtual

Whether the instruction stream has eneded.

Implements llvm::mca::SourceMgr.

Definition at line 75 of file SourceMgr.h.

References hasNext().

◆ peekNext()

SourceRef llvm::mca::CircularSourceMgr::peekNext ( ) const
inlineoverridevirtual

The next SourceRef.

Implements llvm::mca::SourceMgr.

Definition at line 77 of file SourceMgr.h.

References assert(), and hasNext().

◆ updateNext()

void llvm::mca::CircularSourceMgr::updateNext ( )
inlineoverridevirtual

Advance to the next SourceRef.

Implements llvm::mca::SourceMgr.

Definition at line 82 of file SourceMgr.h.


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