LLVM  7.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::DebugCounter Class Reference

#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 DebugCounterinstance ()
 Returns a reference to the singleton instance. More...
static unsigned registerCounter (StringRef Name, StringRef Desc)
static bool shouldExecute (unsigned CounterName)
static bool isCounterSet (unsigned ID)
static std::pair< int, int > getCounterValue (unsigned ID)
static void setCounterValue (unsigned ID, const std::pair< int, int > &Val)

Detailed Description

Definition at line 56 of file DebugCounter.h.

Member Typedef Documentation

◆ CounterVector

Definition at line 143 of file DebugCounter.h.

Member Function Documentation

◆ begin()

CounterVector::const_iterator llvm::DebugCounter::begin ( ) const

Definition at line 144 of file DebugCounter.h.

References llvm::UniqueVector< T >::begin().

◆ dump()

LLVM_DUMP_METHOD void DebugCounter::dump ( ) const

Definition at line 112 of file DebugCounter.cpp.

References llvm::dbgs(), and print().

Referenced by setCounterValue().

◆ end()

CounterVector::const_iterator llvm::DebugCounter::end ( ) const

◆ getCounterId()

unsigned llvm::DebugCounter::getCounterId ( const std::string &  Name) const

Definition at line 130 of file DebugCounter.h.

References llvm::UniqueVector< T >::idFor().

◆ getCounterInfo()

std::pair<std::string, std::string> llvm::DebugCounter::getCounterInfo ( unsigned  ID) const

◆ getCounterValue()

static std::pair<int, int> llvm::DebugCounter::getCounterValue ( unsigned  ID)

Definition at line 111 of file DebugCounter.h.

References assert(), and instance().

Referenced by okayForPHIOfOps().

◆ getNumCounters()

unsigned int llvm::DebugCounter::getNumCounters ( ) const

Definition at line 135 of file DebugCounter.h.

References llvm::UniqueVector< T >::size().

◆ instance()

DebugCounter & DebugCounter::instance ( )

Returns a reference to the singleton instance.

Definition at line 54 of file DebugCounter.cpp.

References DC.

Referenced by getCounterValue(), isCounterSet(), registerCounter(), setCounterValue(), and shouldExecute().

◆ isCounterSet()

static bool llvm::DebugCounter::isCounterSet ( unsigned  ID)

◆ print()

void DebugCounter::print ( raw_ostream OS) const

Definition at line 105 of file DebugCounter.cpp.

References llvm::left_justify().

Referenced by setCounterValue().

◆ push_back()

void DebugCounter::push_back ( const std::string &  Val)

Definition at line 58 of file DebugCounter.cpp.

References llvm::errs(), and llvm::StringRef::split().

◆ registerCounter()

static unsigned llvm::DebugCounter::registerCounter ( StringRef  Name,
StringRef  Desc 

Definition at line 69 of file DebugCounter.h.

References instance().

◆ setCounterValue()

static void llvm::DebugCounter::setCounterValue ( unsigned  ID,
const std::pair< int, int > &  Val 

Definition at line 119 of file DebugCounter.h.

References dump(), instance(), LLVM_DUMP_METHOD, and print().

Referenced by okayForPHIOfOps().

◆ shouldExecute()

static bool llvm::DebugCounter::shouldExecute ( unsigned  CounterName)

The documentation for this class was generated from the following files: