|
LLVM 23.0.0git
|
Helper to represent an instrumentation location, which is composed of an instrumentation opportunity type and a position. More...
#include "llvm/Transforms/IPO/Instrumentor.h"
Public Types | |
| enum | KindTy { MODULE_PRE , MODULE_POST , GLOBAL_PRE , GLOBAL_POST , FUNCTION_PRE , FUNCTION_POST , BASIC_BLOCK_PRE , BASIC_BLOCK_POST , INSTRUCTION_PRE , INSTRUCTION_POST , SPECIAL_VALUE , Last = SPECIAL_VALUE } |
| The supported location kinds, which are composed of a opportunity type and position. More... | |
Public Member Functions | |
| InstrumentationLocation (KindTy Kind) | |
| Construct an instrumentation location with the given kind. | |
| KindTy | getKind () const |
| Return the type and position. | |
| bool | isPRE () const |
| Return whether the instrumentation location is before the event occurs. | |
Static Public Member Functions | |
| static StringRef | getKindStr (KindTy Kind) |
| Return the string representation given a location kind. | |
| static KindTy | getKindFromStr (StringRef S) |
| Return the location kind described by a string. | |
| static bool | isPRE (KindTy Kind) |
| Return whether a location kind is positioned before the event occurs. | |
Helper to represent an instrumentation location, which is composed of an instrumentation opportunity type and a position.
Definition at line 165 of file Instrumentor.h.
The supported location kinds, which are composed of a opportunity type and position.
The PRE position indicates the instrumentation function call is inserted before the instrumented event occurs. The POST position indicates the instrumentation call is inserted after the event occurs. Some opportunity types may only support one position.
| Enumerator | |
|---|---|
| MODULE_PRE | |
| MODULE_POST | |
| GLOBAL_PRE | |
| GLOBAL_POST | |
| FUNCTION_PRE | |
| FUNCTION_POST | |
| BASIC_BLOCK_PRE | |
| BASIC_BLOCK_POST | |
| INSTRUCTION_PRE | |
| INSTRUCTION_POST | |
| SPECIAL_VALUE | |
| Last | |
Definition at line 171 of file Instrumentor.h.
|
inline |
Construct an instrumentation location with the given kind.
Definition at line 187 of file Instrumentor.h.
|
inline |
Return the type and position.
Definition at line 190 of file Instrumentor.h.
Return the location kind described by a string.
Definition at line 223 of file Instrumentor.h.
References BASIC_BLOCK_POST, BASIC_BLOCK_PRE, llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), FUNCTION_POST, FUNCTION_PRE, GLOBAL_POST, GLOBAL_PRE, INSTRUCTION_POST, INSTRUCTION_PRE, Last, MODULE_POST, MODULE_PRE, and SPECIAL_VALUE.
Referenced by llvm::instrumentor::readConfigFromJSON().
Return the string representation given a location kind.
This is the string used in the configuration file.
Definition at line 194 of file Instrumentor.h.
References BASIC_BLOCK_POST, BASIC_BLOCK_PRE, FUNCTION_POST, FUNCTION_PRE, GLOBAL_POST, GLOBAL_PRE, INSTRUCTION_POST, INSTRUCTION_PRE, llvm_unreachable, MODULE_POST, MODULE_PRE, and SPECIAL_VALUE.
Referenced by llvm::instrumentor::writeConfigToJSON().
|
inline |
Return whether the instrumentation location is before the event occurs.
Definition at line 260 of file Instrumentor.h.
References isPRE().
Referenced by llvm::instrumentor::GlobalVarIO::init(), and isPRE().
Return whether a location kind is positioned before the event occurs.
Definition at line 240 of file Instrumentor.h.
References BASIC_BLOCK_POST, BASIC_BLOCK_PRE, FUNCTION_POST, FUNCTION_PRE, GLOBAL_POST, GLOBAL_PRE, INSTRUCTION_POST, INSTRUCTION_PRE, llvm_unreachable, MODULE_POST, MODULE_PRE, and SPECIAL_VALUE.