|
LLVM 23.0.0git
|
The class that contains the configuration for the instrumentor. More...
#include "llvm/Transforms/IPO/Instrumentor.h"
Public Member Functions | |
| virtual | ~InstrumentationConfig () |
| InstrumentationConfig () | |
| Construct an instrumentation configuration with the base options. | |
| virtual void | populate (InstrumentorIRBuilderTy &IIRB) |
| Populate the instrumentation opportunities. | |
| StringRef | getRTName () const |
| Get the runtime prefix for the instrumentation runtime functions. | |
| std::string | getRTName (StringRef Prefix, StringRef Name, StringRef Suffix1="", StringRef Suffix2="") const |
| Get the instrumentation function name. | |
| void | addBaseChoice (BaseConfigurationOption *BCO) |
Add the base configuration option BCO into the list of base options. | |
| void | addChoice (InstrumentationOpportunity &IO, LLVMContext &Ctx) |
Register instrumentation opportunity IO. | |
Static Public Member Functions | |
| template<typename Ty, typename... ArgsTy> | |
| static Ty * | allocate (ArgsTy &&...Args) |
Allocate an object of type Ty using a bump allocator and construct it with the Args arguments. | |
Public Attributes | |
| SmallVector< BaseConfigurationOption * > | BaseConfigurationOptions |
| The list of enabled base configuration options. | |
| std::unique_ptr< BaseConfigurationOption > | RuntimePrefix |
| The base configuration options. | |
| std::unique_ptr< BaseConfigurationOption > | RuntimeStubsFile |
| std::unique_ptr< BaseConfigurationOption > | TargetRegex |
| std::unique_ptr< BaseConfigurationOption > | HostEnabled |
| std::unique_ptr< BaseConfigurationOption > | GPUEnabled |
| EnumeratedArray< StringMap< InstrumentationOpportunity * >, InstrumentationLocation::KindTy > | IChoices |
| The map registered instrumentation opportunities. | |
| BumpPtrAllocator | StringAllocator |
| Utilities for allocating and building strings. | |
| StringSaver | SS |
The class that contains the configuration for the instrumentor.
It holds the information for each instrumented opportunity, including the base configuration options. Another class may inherit from this one to modify the default behavior.
Definition at line 346 of file Instrumentor.h.
|
inlinevirtual |
Definition at line 347 of file Instrumentor.h.
|
inline |
Construct an instrumentation configuration with the base options.
Definition at line 350 of file Instrumentor.h.
References llvm::instrumentor::BaseConfigurationOption::createBoolOption(), llvm::instrumentor::BaseConfigurationOption::createStringOption(), GPUEnabled, HostEnabled, RuntimePrefix, RuntimeStubsFile, SS, StringAllocator, and TargetRegex.
|
inline |
Add the base configuration option BCO into the list of base options.
Definition at line 380 of file Instrumentor.h.
References BaseConfigurationOptions.
Referenced by llvm::instrumentor::BaseConfigurationOption::createBoolOption(), and llvm::instrumentor::BaseConfigurationOption::createStringOption().
| void InstrumentationConfig::addChoice | ( | InstrumentationOpportunity & | IO, |
| LLVMContext & | Ctx ) |
Register instrumentation opportunity IO.
Definition at line 322 of file Instrumentor.cpp.
References llvm::DS_Warning, llvm::instrumentor::InstrumentationOpportunity::getLocationKind(), llvm::instrumentor::InstrumentationOpportunity::getName(), and IChoices.
Referenced by llvm::instrumentor::LoadIO::init(), and llvm::instrumentor::StoreIO::init().
|
inlinestatic |
Allocate an object of type Ty using a bump allocator and construct it with the Args arguments.
The object may not be freed manually.
Definition at line 390 of file Instrumentor.h.
References Allocator.
Referenced by llvm::instrumentor::LoadIO::populate(), and llvm::instrumentor::StoreIO::populate().
|
inline |
Get the runtime prefix for the instrumentation runtime functions.
Definition at line 371 of file Instrumentor.h.
References RuntimePrefix.
Referenced by llvm::instrumentor::IRTCallDescription::createCSignature(), llvm::instrumentor::IRTCallDescription::createLLVMCall(), and getRTName().
|
inline |
Get the instrumentation function name.
Definition at line 374 of file Instrumentor.h.
References getRTName().
|
virtual |
Populate the instrumentation opportunities.
List of all instrumentation opportunities.
Definition at line 316 of file Instrumentor.cpp.
References llvm::instrumentor::LoadIO::populate(), and llvm::instrumentor::StoreIO::populate().
| SmallVector<BaseConfigurationOption *> llvm::instrumentor::InstrumentationConfig::BaseConfigurationOptions |
The list of enabled base configuration options.
Definition at line 398 of file Instrumentor.h.
Referenced by addBaseChoice(), llvm::instrumentor::readConfigFromJSON(), and llvm::instrumentor::writeConfigToJSON().
| std::unique_ptr<BaseConfigurationOption> llvm::instrumentor::InstrumentationConfig::GPUEnabled |
Definition at line 405 of file Instrumentor.h.
Referenced by InstrumentationConfig().
| std::unique_ptr<BaseConfigurationOption> llvm::instrumentor::InstrumentationConfig::HostEnabled |
Definition at line 404 of file Instrumentor.h.
Referenced by InstrumentationConfig().
| EnumeratedArray<StringMap<InstrumentationOpportunity *>, InstrumentationLocation::KindTy> llvm::instrumentor::InstrumentationConfig::IChoices |
The map registered instrumentation opportunities.
The map is indexed by the instrumentation location kind and then by the opportunity name. Notice that an instrumentation location may have more than one instrumentation opportunity registered.
Definition at line 413 of file Instrumentor.h.
Referenced by addChoice(), llvm::instrumentor::printRuntimeStub(), llvm::instrumentor::readConfigFromJSON(), and llvm::instrumentor::writeConfigToJSON().
| std::unique_ptr<BaseConfigurationOption> llvm::instrumentor::InstrumentationConfig::RuntimePrefix |
The base configuration options.
Definition at line 401 of file Instrumentor.h.
Referenced by getRTName(), and InstrumentationConfig().
| std::unique_ptr<BaseConfigurationOption> llvm::instrumentor::InstrumentationConfig::RuntimeStubsFile |
Definition at line 402 of file Instrumentor.h.
Referenced by InstrumentationConfig().
| StringSaver llvm::instrumentor::InstrumentationConfig::SS |
Definition at line 418 of file Instrumentor.h.
Referenced by InstrumentationConfig(), and llvm::instrumentor::readConfigFromJSON().
| BumpPtrAllocator llvm::instrumentor::InstrumentationConfig::StringAllocator |
Utilities for allocating and building strings.
{
Definition at line 417 of file Instrumentor.h.
Referenced by InstrumentationConfig().
| std::unique_ptr<BaseConfigurationOption> llvm::instrumentor::InstrumentationConfig::TargetRegex |
Definition at line 403 of file Instrumentor.h.
Referenced by InstrumentationConfig().