|
LLVM 22.0.0git
|
#include "llvm/Support/DebugCounter.h"
Classes | |
| struct | Chunk |
| class | CounterInfo |
| Struct to store counter info. More... | |
| struct | CounterState |
Public Member Functions | |
| LLVM_ABI void | push_back (const std::string &) |
| LLVM_DUMP_METHOD void | dump () const |
| LLVM_ABI void | print (raw_ostream &OS) const |
| CounterInfo * | getCounterInfo (StringRef Name) const |
| unsigned int | getNumCounters () const |
| std::pair< StringRef, StringRef > | getCounterDesc (CounterInfo *Info) const |
| MapVector< StringRef, CounterInfo * >::const_iterator | begin () const |
| MapVector< StringRef, CounterInfo * >::const_iterator | end () const |
| void | activateAllCounters () |
Static Public Member Functions | |
| static LLVM_ABI void | printChunks (raw_ostream &OS, ArrayRef< Chunk >) |
| static LLVM_ABI bool | parseChunks (StringRef Str, SmallVector< Chunk > &Res) |
| Return true on parsing error and print the error message on the llvm::errs() | |
| static LLVM_ABI DebugCounter & | instance () |
| Returns a reference to the singleton instance. | |
| static void | registerCounter (CounterInfo *Info) |
| static LLVM_ABI bool | shouldExecuteImpl (CounterInfo &Counter) |
| static bool | shouldExecute (CounterInfo &Counter) |
| static bool | isCounterSet (CounterInfo &Info) |
| static CounterState | getCounterState (CounterInfo &Info) |
| static void | setCounterState (CounterInfo &Info, CounterState State) |
Protected Member Functions | |
| void | addCounter (CounterInfo *Info) |
| bool | handleCounterIncrement (CounterInfo &Info) |
Protected Attributes | |
| MapVector< StringRef, CounterInfo * > | Counters |
| bool | ShouldPrintCounter = false |
| bool | ShouldPrintCounterQueries = false |
| bool | BreakOnLast = false |
Definition at line 57 of file DebugCounter.h.
|
inline |
Definition at line 167 of file DebugCounter.h.
|
inlineprotected |
Definition at line 173 of file DebugCounter.h.
References Counters, and Info.
Referenced by registerCounter().
|
inline |
Definition at line 160 of file DebugCounter.h.
References Counters.
| LLVM_DUMP_METHOD void DebugCounter::dump | ( | ) | const |
Definition at line 262 of file DebugCounter.cpp.
References llvm::dbgs(), LLVM_DUMP_METHOD, and print().
|
inline |
Definition at line 163 of file DebugCounter.h.
References Counters.
|
inline |
Definition at line 155 of file DebugCounter.h.
References Info.
|
inline |
Definition at line 147 of file DebugCounter.h.
References Counters.
Referenced by print(), and push_back().
|
inlinestatic |
Definition at line 128 of file DebugCounter.h.
References Info.
|
inline |
Definition at line 152 of file DebugCounter.h.
References Counters.
|
protected |
Handle consecutive blocks.
Definition at line 226 of file DebugCounter.cpp.
References BreakOnLast, and LLVM_BUILTIN_DEBUGTRAP.
|
static |
Returns a reference to the singleton instance.
Definition at line 181 of file DebugCounter.cpp.
References Owner.
Referenced by llvm::initDebugCounterOptions(), registerCounter(), and shouldExecuteImpl().
|
inlinestatic |
Definition at line 120 of file DebugCounter.h.
References Info.
|
static |
Return true on parsing error and print the error message on the llvm::errs()
Definition at line 35 of file DebugCounter.cpp.
References llvm::StringRef::drop_front(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::StringRef::empty(), llvm::errs(), llvm::Number, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::StringRef::starts_with(), and llvm::StringRef::take_until().
Referenced by push_back().
| void DebugCounter::print | ( | raw_ostream & | OS | ) | const |
Definition at line 213 of file DebugCounter.cpp.
References llvm::CallingConv::C, Counters, getCounterInfo(), llvm::left_justify(), printChunks(), and llvm::sort().
Referenced by dump().
|
static |
Definition at line 20 of file DebugCounter.cpp.
References llvm::ArrayRef< T >::empty().
Referenced by print().
| void DebugCounter::push_back | ( | const std::string & | Val | ) |
Definition at line 185 of file DebugCounter.cpp.
References llvm::errs(), getCounterInfo(), parseChunks(), and llvm::StringRef::split().
|
inlinestatic |
Definition at line 106 of file DebugCounter.h.
References addCounter(), Info, and instance().
Referenced by llvm::DebugCounter::CounterInfo::CounterInfo().
|
inlinestatic |
Definition at line 133 of file DebugCounter.h.
References Info.
|
inlinestatic |
Definition at line 111 of file DebugCounter.h.
References shouldExecuteImpl().
Referenced by checkCondition(), DCEInstruction(), findRenameRegForSameLdStRegPair(), llvm::getKnowledgeFromBundle(), llvm::Attributor::getOrCreateAAFor(), slpvectorizer::BoUpSLP::isTreeTinyAndNotFullyVectorizable(), llvm::Negator::Negate(), optimizeDivRem(), optimizeSQRT(), llvm::InstCombinerImpl::run(), and llvm::InstructionSelect::selectMachineFunction().
|
static |
Definition at line 251 of file DebugCounter.cpp.
References llvm::dbgs(), and instance().
Referenced by shouldExecute().
|
protected |
Definition at line 182 of file DebugCounter.h.
Referenced by handleCounterIncrement().
|
protected |
Definition at line 176 of file DebugCounter.h.
Referenced by activateAllCounters(), addCounter(), begin(), end(), getCounterInfo(), getNumCounters(), and print().
|
protected |
Definition at line 178 of file DebugCounter.h.
|
protected |
Definition at line 180 of file DebugCounter.h.