LLVM 18.0.0git
|
#include "llvm/Support/DebugCounter.h"
Public Types | |
typedef UniqueVector< std::string > | CounterVector |
Public Member Functions | |
void | push_back (const std::string &) |
LLVM_DUMP_METHOD void | dump () const |
void | print (raw_ostream &OS) const |
unsigned | getCounterId (const std::string &Name) const |
unsigned int | getNumCounters () const |
std::pair< std::string, std::string > | getCounterInfo (unsigned ID) const |
CounterVector::const_iterator | begin () const |
CounterVector::const_iterator | end () const |
Static Public Member Functions | |
static DebugCounter & | instance () |
Returns a reference to the singleton instance. | |
static unsigned | registerCounter (StringRef Name, StringRef Desc) |
static bool | shouldExecute (unsigned CounterName) |
static bool | isCounterSet (unsigned ID) |
static int64_t | getCounterValue (unsigned ID) |
static void | setCounterValue (unsigned ID, int64_t Count) |
static void | enableAllCounters () |
static bool | isCountingEnabled () |
Definition at line 56 of file DebugCounter.h.
typedef UniqueVector<std::string> llvm::DebugCounter::CounterVector |
Definition at line 137 of file DebugCounter.h.
|
inline |
Definition at line 138 of file DebugCounter.h.
References llvm::UniqueVector< T >::begin().
LLVM_DUMP_METHOD void DebugCounter::dump | ( | ) | const |
Definition at line 150 of file DebugCounter.cpp.
References llvm::dbgs(), and print().
|
inlinestatic |
|
inline |
Definition at line 141 of file DebugCounter.h.
References llvm::UniqueVector< T >::end().
Definition at line 124 of file DebugCounter.h.
References llvm::UniqueVector< T >::idFor(), and Name.
Referenced by print(), and push_back().
|
inline |
Definition at line 132 of file DebugCounter.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup().
|
inlinestatic |
Definition at line 105 of file DebugCounter.h.
References assert(), and instance().
|
inline |
Definition at line 129 of file DebugCounter.h.
References llvm::UniqueVector< T >::size().
|
static |
Returns a reference to the singleton instance.
Definition at line 77 of file DebugCounter.cpp.
Referenced by enableAllCounters(), getCounterValue(), llvm::initDebugCounterOptions(), isCounterSet(), isCountingEnabled(), print(), registerCounter(), setCounterValue(), and shouldExecute().
Definition at line 100 of file DebugCounter.h.
References instance().
|
inlinestatic |
Definition at line 150 of file DebugCounter.h.
References instance().
Referenced by shouldExecute().
void DebugCounter::print | ( | raw_ostream & | OS | ) | const |
Definition at line 135 of file DebugCounter.cpp.
References llvm::UniqueVector< T >::begin(), llvm::UniqueVector< T >::end(), getCounterId(), instance(), llvm::left_justify(), OS, and llvm::sort().
Referenced by dump().
void DebugCounter::push_back | ( | const std::string & | Val | ) |
Definition at line 84 of file DebugCounter.cpp.
References enableAllCounters(), llvm::errs(), getCounterId(), and llvm::StringRef::split().
Definition at line 69 of file DebugCounter.h.
References instance(), and Name.
|
inlinestatic |
Definition at line 113 of file DebugCounter.h.
References instance().
Definition at line 72 of file DebugCounter.h.
References instance(), and isCountingEnabled().
Referenced by checkCondition(), DCEInstruction(), findRenameRegForSameLdStRegPair(), llvm::getKnowledgeFromBundle(), llvm::Attributor::getOrCreateAAFor(), llvm::Negator::Negate(), optimizeDivRem(), optimizeSQRT(), and llvm::InstCombinerImpl::run().