MLIR
20.0.0git
|
This class represesents a uniqued string owned by a TimingManager
.
More...
#include "mlir/Support/Timing.h"
Public Member Functions | |
TimingIdentifier (const TimingIdentifier &)=default | |
TimingIdentifier & | operator= (const TimingIdentifier &other)=default |
StringRef | strref () const |
Return a StringRef for the string. More... | |
std::string | str () const |
Return an std::string . More... | |
const void * | getAsOpaquePointer () const |
Return the opaque pointer that corresponds to this identifier. More... | |
Static Public Member Functions | |
static TimingIdentifier | get (StringRef str, TimingManager &tm) |
Return an identifier for the specified string. More... | |
This class represesents a uniqued string owned by a TimingManager
.
Most importantly, instances of this class provide a stable opaque pointer that is guaranteed to be reproduced by later interning of the same string. The TimingManager
uses this mechanism to provide timers with an opaque id even when the user of the API merely provided a string as identification (instead of a pass for example).
This is a POD type with pointer size, so it should be passed around by value. The underlying data is owned by the TimingManager
.
|
default |
Referenced by get().
|
static |
Return an identifier for the specified string.
Definition at line 83 of file Timing.cpp.
References mlir::TimingManager::impl, str(), and TimingIdentifier().
Referenced by mlir::Timer::nest().
|
inline |
Return the opaque pointer that corresponds to this identifier.
Definition at line 63 of file Timing.h.
Referenced by mlir::Timer::nest().
|
default |
|
inline |
|
inline |