LLVM 20.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.
 
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 ()
 

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::IncrementalSourceMgr, and llvm::mca::CircularSourceMgr.

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::IncrementalSourceMgr, and llvm::mca::CircularSourceMgr.

◆ isEnd()

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

Whether the instruction stream has eneded.

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

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

◆ peekNext()

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

The next SourceRef.

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

◆ 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::IncrementalSourceMgr, and llvm::mca::CircularSourceMgr.


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