LLVM 18.0.0git
|
#include "llvm/TableGen/Record.h"
Public Member Functions | |
RecordKeeper () | |
~RecordKeeper () | |
detail::RecordKeeperImpl & | getImpl () |
Return the internal implementation of the RecordKeeper. | |
const std::string | getInputFilename () const |
Get the main TableGen input file's name. | |
const RecordMap & | getClasses () const |
Get the map of classes. | |
const RecordMap & | getDefs () const |
Get the map of records (defs). | |
const GlobalMap & | getGlobals () const |
Get the map of global variables. | |
Record * | getClass (StringRef Name) const |
Get the class with the specified name. | |
Record * | getDef (StringRef Name) const |
Get the concrete record with the specified name. | |
Init * | getGlobal (StringRef Name) const |
Get the Init value of the specified global variable. | |
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) |
Init * | getNewAnonymousName () |
GetNewAnonymousName - Generate a unique anonymous name that can be used as an identifier. | |
void | startPhaseTiming () |
Start phase timing; called if the –time-phases option is specified. | |
void | startTimer (StringRef Name) |
Start timing a phase. Automatically stops any previous phase timer. | |
void | stopTimer () |
Stop timing a phase. | |
void | startBackendTimer (StringRef Name) |
Start timing the overall backend. | |
void | stopBackendTimer () |
Stop timing the overall backend. | |
void | stopPhaseTiming () |
Stop phase timing and print the report. | |
std::vector< Record * > | getAllDerivedDefinitions (StringRef ClassName) const |
Get all the concrete records that inherit from the one specified class. | |
std::vector< Record * > | getAllDerivedDefinitions (ArrayRef< StringRef > ClassNames) const |
Get all the concrete records that inherit from all the specified classes. | |
std::vector< Record * > | getAllDerivedDefinitionsIfDefined (StringRef ClassName) const |
Get all the concrete records that inherit from specified class, if the class is defined. | |
void | dump () const |
RecordKeeper::RecordKeeper | ( | ) |
Definition at line 3113 of file Record.cpp.
|
default |
|
inline |
|
inline |
LLVM_DUMP_METHOD void RecordKeeper::dump | ( | ) | const |
Definition at line 3118 of file Record.cpp.
References llvm::errs().
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 3190 of file Record.cpp.
References llvm::all_of(), assert(), getClass(), getDefs(), llvm::Value::getName(), LHS, llvm::PrintFatalError(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), RHS, llvm::ArrayRef< T >::size(), and llvm::sort().
Get all the concrete records that inherit from the one specified class.
The class must be defined.
Definition at line 3180 of file Record.cpp.
References getAllDerivedDefinitions().
Referenced by getAllDerivedDefinitions(), getAllDerivedDefinitionsIfDefined(), llvm::DirectiveLanguage::getClauses(), and llvm::DirectiveLanguage::getDirectives().
std::vector< Record * > RecordKeeper::getAllDerivedDefinitionsIfDefined | ( | StringRef | ClassName | ) | const |
Get all the concrete records that inherit from specified class, if the class is defined.
Returns an empty vector if the class is not defined.
Definition at line 3218 of file Record.cpp.
References getAllDerivedDefinitions(), and getClass().
Get the class with the specified name.
Definition at line 1969 of file Record.h.
Referenced by getAllDerivedDefinitions(), and getAllDerivedDefinitionsIfDefined().
|
inline |
Get the concrete record with the specified name.
Definition at line 1975 of file Record.h.
Referenced by addExtraGlobal(), llvm::UnOpInit::Fold(), llvm::ExistsOpInit::Fold(), and getGlobal().
|
inline |
Get the map of records (defs).
Definition at line 1963 of file Record.h.
Referenced by getAllDerivedDefinitions(), and llvm::operator<<().
|
inline |
|
inline |
Return the internal implementation of the RecordKeeper.
Definition at line 1954 of file Record.h.
Referenced by llvm::CondOpInit::get(), llvm::ListInit::get(), llvm::ArgumentInit::get(), llvm::BitRecTy::get(), llvm::IntRecTy::get(), llvm::StringRecTy::get(), llvm::DagRecTy::get(), llvm::UnsetInit::get(), llvm::BitsInit::get(), llvm::RecordRecTy::get(), llvm::BitInit::get(), llvm::IntInit::get(), llvm::StringInit::get(), llvm::BitsRecTy::get(), llvm::AnonymousNameInit::get(), llvm::IsAOpInit::get(), llvm::ExistsOpInit::get(), llvm::Record::getDefInit(), llvm::RecTy::getListTy(), getNewAnonymousName(), and llvm::Record::getNewUID().
|
inline |
Init * RecordKeeper::getNewAnonymousName | ( | ) |
GetNewAnonymousName - Generate a unique anonymous name that can be used as an identifier.
Definition at line 3134 of file Record.cpp.
References llvm::AnonymousNameInit::get(), and getImpl().
|
inline |
Definition at line 1988 of file Record.h.
Referenced by llvm::TableGenMain(), and llvm::TableGenParseFile().
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 3163 of file Record.cpp.
References Name, and startTimer().
Referenced by llvm::TableGenMain().
|
inline |
Start phase timing; called if the –time-phases option is specified.
Definition at line 2016 of file Record.h.
Referenced by llvm::TableGenMain().
void RecordKeeper::startTimer | ( | StringRef | Name | ) |
Start timing a phase. Automatically stops any previous phase timer.
Definition at line 3141 of file Record.cpp.
References llvm::Timer::clear(), llvm::Timer::isRunning(), Name, llvm::Timer::startTimer(), and llvm::Timer::stopTimer().
Referenced by startBackendTimer(), and llvm::TableGenMain().
void RecordKeeper::stopBackendTimer | ( | ) |
Stop timing the overall backend.
Definition at line 3170 of file Record.cpp.
References stopTimer().
Referenced by llvm::TableGenMain().
|
inline |
Stop phase timing and print the report.
Definition at line 2034 of file Record.h.
Referenced by llvm::TableGenMain().
void RecordKeeper::stopTimer | ( | ) |
Stop timing a phase.
Definition at line 3156 of file Record.cpp.
References assert(), and llvm::Timer::stopTimer().
Referenced by stopBackendTimer(), and llvm::TableGenMain().