LLVM  15.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]
Collaboration diagram for llvm::mca::CircularSourceMgr:
Collaboration graph
[legend]

Public Member Functions

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