LLVM  16.0.0git
Public Types | Public Member Functions | List of all members
llvm::mca::SourceMgr Struct Referenceabstract

Abstracting the input code sequence (a sequence of MCInst) and assigning unique identifiers to every instruction in the sequence. More...

#include "llvm/MCA/SourceMgr.h"

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

Public Types

using UniqueInst = std::unique_ptr< Instruction >
 

Public Member Functions

virtual ArrayRef< UniqueInstgetInstructions () const =0
 Provides a fixed range of UniqueInst to iterate. More...
 
virtual size_t size () const
 (Fixed) Number of UniqueInst. More...
 
virtual bool hasNext () const =0
 Whether there is any SourceRef to inspect / peek next. More...
 
virtual bool isEnd () const =0
 Whether the instruction stream has eneded. More...
 
virtual SourceRef peekNext () const =0
 The next SourceRef. More...
 
virtual void updateNext ()=0
 Advance to the next SourceRef. More...
 
virtual ~SourceMgr ()
 

Detailed Description

Abstracting the input code sequence (a sequence of MCInst) and assigning unique identifiers to every instruction in the sequence.

Definition at line 29 of file SourceMgr.h.

Member Typedef Documentation

◆ UniqueInst

Definition at line 30 of file SourceMgr.h.

Constructor & Destructor Documentation

◆ ~SourceMgr()

virtual llvm::mca::SourceMgr::~SourceMgr ( )
inlinevirtual

Definition at line 53 of file SourceMgr.h.

Member Function Documentation

◆ getInstructions()

virtual ArrayRef<UniqueInst> llvm::mca::SourceMgr::getInstructions ( ) const
pure virtual

Provides a fixed range of UniqueInst to iterate.

Implemented in llvm::mca::CircularSourceMgr, and llvm::mca::IncrementalSourceMgr.

Referenced by size().

◆ hasNext()

virtual bool llvm::mca::SourceMgr::hasNext ( ) const
pure virtual

Whether there is any SourceRef to inspect / peek next.

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

Implemented in llvm::mca::CircularSourceMgr, and llvm::mca::IncrementalSourceMgr.

◆ isEnd()

virtual bool llvm::mca::SourceMgr::isEnd ( ) const
pure virtual

Whether the instruction stream has eneded.

Implemented in llvm::mca::CircularSourceMgr, and llvm::mca::IncrementalSourceMgr.

Referenced by llvm::mca::EntryStage::hasWorkToComplete().

◆ peekNext()

virtual SourceRef llvm::mca::SourceMgr::peekNext ( ) const
pure virtual

The next SourceRef.

Implemented in llvm::mca::CircularSourceMgr, and llvm::mca::IncrementalSourceMgr.

◆ size()

virtual size_t llvm::mca::SourceMgr::size ( ) const
inlinevirtual

(Fixed) Number of UniqueInst.

Returns the size of getInstructions by default.

Definition at line 37 of file SourceMgr.h.

References getInstructions(), and llvm::ArrayRef< T >::size().

◆ updateNext()

virtual void llvm::mca::SourceMgr::updateNext ( )
pure virtual

Advance to the next SourceRef.

Implemented in llvm::mca::CircularSourceMgr, and llvm::mca::IncrementalSourceMgr.


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