LLVM  13.0.0git
Public Member Functions | Friends | List of all members
llvm::RecordKeeper Class Reference

#include "llvm/TableGen/Record.h"

Public Member Functions

const std::string getInputFilename () const
 Get the main TableGen input file's name. More...
 
const RecordMap & getClasses () const
 Get the map of classes. More...
 
const RecordMap & getDefs () const
 Get the map of records (defs). More...
 
const GlobalMap & getGlobals () const
 Get the map of global variables. More...
 
RecordgetClass (StringRef Name) const
 Get the class with the specified name. More...
 
RecordgetDef (StringRef Name) const
 Get the concrete record with the specified name. More...
 
InitgetGlobal (StringRef Name) const
 Get the Init value of the specified global variable. More...
 
void saveInputFilename (std::string Filename)
 
void addClass (std::unique_ptr< Record > R)
 
void addDef (std::unique_ptr< Record > R)
 
void addExtraGlobal (StringRef Name, Init *I)
 
InitgetNewAnonymousName ()
 GetNewAnonymousName - Generate a unique anonymous name that can be used as an identifier. More...
 
void startPhaseTiming ()
 Start phase timing; called if the –time-phases option is specified. More...
 
void startTimer (StringRef Name)
 Start timing a phase. Automatically stops any previous phase timer. More...
 
void stopTimer ()
 Stop timing a phase. More...
 
void startBackendTimer (StringRef Name)
 Start timing the overall backend. More...
 
void stopBackendTimer ()
 Stop timing the overall backend. More...
 
void stopPhaseTiming ()
 Stop phase timing and print the report. More...
 
std::vector< Record * > getAllDerivedDefinitions (StringRef ClassName) const
 Get all the concrete records that inherit from the one specified class. More...
 
std::vector< Record * > getAllDerivedDefinitions (ArrayRef< StringRef > ClassNames) const
 Get all the concrete records that inherit from all the specified classes. More...
 
void dump () const
 

Friends

class RecordRecTy
 

Detailed Description

Definition at line 1754 of file Record.h.

Member Function Documentation

◆ addClass()

void llvm::RecordKeeper::addClass ( std::unique_ptr< Record R)
inline

Definition at line 1811 of file Record.h.

References assert(), llvm::MipsISD::Ins, move, and llvm::RISCVFenceField::R.

◆ addDef()

void llvm::RecordKeeper::addDef ( std::unique_ptr< Record R)
inline

Definition at line 1818 of file Record.h.

References assert(), llvm::MipsISD::Ins, move, and llvm::RISCVFenceField::R.

◆ addExtraGlobal()

void llvm::RecordKeeper::addExtraGlobal ( StringRef  Name,
Init I 
)
inline

Definition at line 1825 of file Record.h.

References assert(), getDef(), I, and llvm::MipsISD::Ins.

◆ dump()

LLVM_DUMP_METHOD void RecordKeeper::dump ( ) const

Definition at line 2599 of file Record.cpp.

References llvm::errs().

◆ getAllDerivedDefinitions() [1/2]

std::vector< Record * > RecordKeeper::getAllDerivedDefinitions ( ArrayRef< StringRef ClassNames) const

Get all the concrete records that inherit from all the specified classes.

The classes must be defined.

Definition at line 2672 of file Record.cpp.

References llvm::all_of(), assert(), getClass(), getDefs(), llvm::PrintFatalError(), and llvm::ArrayRef< T >::size().

◆ getAllDerivedDefinitions() [2/2]

std::vector< Record * > RecordKeeper::getAllDerivedDefinitions ( StringRef  ClassName) const

Get all the concrete records that inherit from the one specified class.

The class must be defined.

Definition at line 2662 of file Record.cpp.

References llvm::makeArrayRef().

Referenced by llvm::DirectiveLanguage::getClauses(), and llvm::DirectiveLanguage::getDirectives().

◆ getClass()

Record* llvm::RecordKeeper::getClass ( StringRef  Name) const
inline

Get the class with the specified name.

Definition at line 1788 of file Record.h.

References I.

Referenced by getAllDerivedDefinitions().

◆ getClasses()

const RecordMap& llvm::RecordKeeper::getClasses ( ) const
inline

Get the map of classes.

Definition at line 1779 of file Record.h.

Referenced by llvm::operator<<().

◆ getDef()

Record* llvm::RecordKeeper::getDef ( StringRef  Name) const
inline

Get the concrete record with the specified name.

Definition at line 1794 of file Record.h.

References I.

Referenced by addExtraGlobal(), llvm::UnOpInit::Fold(), and getGlobal().

◆ getDefs()

const RecordMap& llvm::RecordKeeper::getDefs ( ) const
inline

Get the map of records (defs).

Definition at line 1782 of file Record.h.

Referenced by getAllDerivedDefinitions(), and llvm::operator<<().

◆ getGlobal()

Init* llvm::RecordKeeper::getGlobal ( StringRef  Name) const
inline

Get the Init value of the specified global variable.

Definition at line 1800 of file Record.h.

References getDef(), and llvm::RISCVFenceField::R.

◆ getGlobals()

const GlobalMap& llvm::RecordKeeper::getGlobals ( ) const
inline

Get the map of global variables.

Definition at line 1785 of file Record.h.

◆ getInputFilename()

const std::string llvm::RecordKeeper::getInputFilename ( ) const
inline

Get the main TableGen input file's name.

Definition at line 1776 of file Record.h.

References InputFilename.

◆ getNewAnonymousName()

Init * RecordKeeper::getNewAnonymousName ( )

GetNewAnonymousName - Generate a unique anonymous name that can be used as an identifier.

Definition at line 2615 of file Record.cpp.

References llvm::AnonymousNameInit::get().

◆ saveInputFilename()

void llvm::RecordKeeper::saveInputFilename ( std::string  Filename)
inline

Definition at line 1807 of file Record.h.

References InputFilename.

Referenced by llvm::TableGenMain().

◆ startBackendTimer()

void RecordKeeper::startBackendTimer ( StringRef  Name)

Start timing the overall backend.

If the backend itself starts a timer, then this timer is cleared.

Definition at line 2644 of file Record.cpp.

References startTimer().

Referenced by llvm::TableGenMain().

◆ startPhaseTiming()

void llvm::RecordKeeper::startPhaseTiming ( )
inline

Start phase timing; called if the –time-phases option is specified.

Definition at line 1835 of file Record.h.

Referenced by llvm::TableGenMain().

◆ startTimer()

void RecordKeeper::startTimer ( StringRef  Name)

Start timing a phase. Automatically stops any previous phase timer.

Definition at line 2622 of file Record.cpp.

References llvm::Timer::clear(), llvm::Timer::isRunning(), llvm::Timer::startTimer(), and llvm::Timer::stopTimer().

Referenced by startBackendTimer(), and llvm::TableGenMain().

◆ stopBackendTimer()

void RecordKeeper::stopBackendTimer ( )

Stop timing the overall backend.

Definition at line 2651 of file Record.cpp.

References stopTimer().

Referenced by llvm::TableGenMain().

◆ stopPhaseTiming()

void llvm::RecordKeeper::stopPhaseTiming ( )
inline

Stop phase timing and print the report.

Definition at line 1853 of file Record.h.

Referenced by llvm::TableGenMain().

◆ stopTimer()

void RecordKeeper::stopTimer ( )

Stop timing a phase.

Definition at line 2637 of file Record.cpp.

References assert(), and llvm::Timer::stopTimer().

Referenced by stopBackendTimer(), and llvm::TableGenMain().

Friends And Related Function Documentation

◆ RecordRecTy

friend class RecordRecTy
friend

Definition at line 1755 of file Record.h.


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