LLVM 20.0.0git
|
For each user variable, keep a list of instruction ranges where this variable is accessible. More...
#include "llvm/CodeGen/DbgEntityHistoryCalculator.h"
Classes | |
class | Entry |
Specifies a change in a variable's debug value history. More... | |
Public Types | |
typedef size_t | EntryIndex |
Index in the entry vector. | |
using | Entries = SmallVector< Entry, 4 > |
using | InlinedEntity = std::pair< const DINode *, const DILocation * > |
using | EntriesMap = MapVector< InlinedEntity, Entries > |
Public Member Functions | |
bool | startDbgValue (InlinedEntity Var, const MachineInstr &MI, EntryIndex &NewIndex) |
EntryIndex | startClobber (InlinedEntity Var, const MachineInstr &MI) |
Entry & | getEntry (InlinedEntity Var, EntryIndex Index) |
bool | hasNonEmptyLocation (const Entries &Entries) const |
Test whether a vector of entries features any non-empty locations. | |
void | trimLocationRanges (const MachineFunction &MF, LexicalScopes &LScopes, const InstructionOrdering &Ordering) |
Drop location ranges which exist entirely outside each variable's scope. | |
bool | empty () const |
void | clear () |
EntriesMap::const_iterator | begin () const |
EntriesMap::const_iterator | end () const |
LLVM_DUMP_METHOD void | dump (StringRef FuncName) const |
Static Public Attributes | |
static const EntryIndex | NoEntry = std::numeric_limits<EntryIndex>::max() |
Special value to indicate that an entry is valid until the end of the function. | |
For each user variable, keep a list of instruction ranges where this variable is accessible.
The variables are listed in order of appearance.
Definition at line 46 of file DbgEntityHistoryCalculator.h.
using llvm::DbgValueHistoryMap::Entries = SmallVector<Entry, 4> |
Definition at line 95 of file DbgEntityHistoryCalculator.h.
Definition at line 97 of file DbgEntityHistoryCalculator.h.
typedef size_t llvm::DbgValueHistoryMap::EntryIndex |
Index in the entry vector.
Definition at line 49 of file DbgEntityHistoryCalculator.h.
using llvm::DbgValueHistoryMap::InlinedEntity = std::pair<const DINode *, const DILocation *> |
Definition at line 96 of file DbgEntityHistoryCalculator.h.
|
inline |
Definition at line 121 of file DbgEntityHistoryCalculator.h.
References llvm::MapVector< KeyT, ValueT, MapType, VectorType >::begin().
|
inline |
Definition at line 120 of file DbgEntityHistoryCalculator.h.
References llvm::MapVector< KeyT, ValueT, MapType, VectorType >::clear().
Referenced by llvm::DebugHandlerBase::endFunction().
LLVM_DUMP_METHOD void DbgValueHistoryMap::dump | ( | StringRef | FuncName | ) | const |
Definition at line 565 of file DbgEntityHistoryCalculator.cpp.
References llvm::dbgs(), llvm::enumerate(), llvm::DbgValueHistoryMap::Entry::getEndIndex(), llvm::DbgValueHistoryMap::Entry::getInstr(), llvm::DbgValueHistoryMap::Entry::isDbgValue(), and NoEntry.
Referenced by llvm::DebugHandlerBase::beginFunction().
|
inline |
Definition at line 119 of file DbgEntityHistoryCalculator.h.
References llvm::MapVector< KeyT, ValueT, MapType, VectorType >::empty().
Referenced by llvm::DebugHandlerBase::beginFunction().
|
inline |
Definition at line 122 of file DbgEntityHistoryCalculator.h.
References llvm::MapVector< KeyT, ValueT, MapType, VectorType >::end().
|
inline |
Definition at line 107 of file DbgEntityHistoryCalculator.h.
References Index.
Referenced by llvm::calculateDbgEntityHistory(), clobberRegEntries(), and handleNewDebugValue().
Test whether a vector of entries features any non-empty locations.
It could have no entries, or only DBG_VALUE $noreg entries.
Definition at line 266 of file DbgEntityHistoryCalculator.cpp.
References assert(), llvm::DbgValueHistoryMap::Entry::getInstr(), llvm::DbgValueHistoryMap::Entry::isDbgValue(), and MI.
EntryIndex DbgValueHistoryMap::startClobber | ( | InlinedEntity | Var, |
const MachineInstr & | MI | ||
) |
Definition at line 90 of file DbgEntityHistoryCalculator.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::DbgValueHistoryMap::Entry::Clobber, llvm::SmallVectorImpl< T >::emplace_back(), MI, and llvm::SmallVectorBase< Size_T >::size().
Referenced by llvm::calculateDbgEntityHistory(), and clobberRegEntries().
bool DbgValueHistoryMap::startDbgValue | ( | InlinedEntity | Var, |
const MachineInstr & | MI, | ||
EntryIndex & | NewIndex | ||
) |
Definition at line 70 of file DbgEntityHistoryCalculator.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::dbgs(), llvm::DbgValueHistoryMap::Entry::DbgValue, llvm::SmallVectorImpl< T >::emplace_back(), llvm::SmallVectorBase< Size_T >::empty(), LLVM_DEBUG, MI, and llvm::SmallVectorBase< Size_T >::size().
Referenced by handleNewDebugValue().
void DbgValueHistoryMap::trimLocationRanges | ( | const MachineFunction & | MF, |
LexicalScopes & | LScopes, | ||
const InstructionOrdering & | Ordering | ||
) |
Drop location ranges which exist entirely outside each variable's scope.
Definition at line 129 of file DbgEntityHistoryCalculator.cpp.
References llvm::SmallVectorImpl< T >::assign(), llvm::dbgs(), llvm::ArrayRef< T >::end(), llvm::LexicalScopes::findInlinedScope(), llvm::LexicalScopes::findLexicalScope(), llvm::MachineFunction::getName(), Idx, intersects(), llvm::DbgValueHistoryMap::Entry::isClosed(), LLVM_DEBUG, NoEntry, llvm::MachineInstr::print(), llvm::reverse(), llvm::sort(), and ToRemove.
Referenced by llvm::DebugHandlerBase::beginFunction().
|
static |
Special value to indicate that an entry is valid until the end of the function.
Definition at line 53 of file DbgEntityHistoryCalculator.h.
Referenced by dump(), llvm::DbgValueHistoryMap::Entry::isClosed(), and trimLocationRanges().