Go to the documentation of this file.
9 #ifndef LLVM_CODEGEN_DBGENTITYHISTORYCALCULATOR_H
10 #define LLVM_CODEGEN_DBGENTITYHISTORYCALCULATOR_H
23 class MachineFunction;
24 class TargetRegisterInfo;
33 void clear() { InstNumberMap.clear(); }
79 : Instr(Instr, Kind), EndIndex(
NoEntry) {}
108 auto &
Entries = VarEntries[Var];
124 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
150 const TargetRegisterInfo *
TRI,
151 DbgValueHistoryMap &DbgValues,
152 DbgLabelInstrMap &DbgLabels);
156 #endif // LLVM_CODEGEN_DBGENTITYHISTORYCALCULATOR_H
void initialize(const MachineFunction &MF)
InstrMap::const_iterator begin() const
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
This is an optimization pass for GlobalISel generic memory operations.
For each inlined instance of a source-level label, keep the corresponding DBG_LABEL instruction.
Specifies a change in a variable's debug value history.
size_t EntryIndex
Index in the entry vector.
Entry(const MachineInstr *Instr, EntryKind Kind)
Expected< ExpressionValue > max(const ExpressionValue &Lhs, const ExpressionValue &Rhs)
EntriesMap::const_iterator begin() const
unsigned const TargetRegisterInfo * TRI
bool startDbgValue(InlinedEntity Var, const MachineInstr &MI, EntryIndex &NewIndex)
EntryIndex getEndIndex() const
typename std::vector< std::pair< InlinedEntity, Entries >> ::const_iterator const_iterator
const MachineInstr * getInstr() const
EntriesMap::const_iterator end() const
void calculateDbgEntityHistory(const MachineFunction *MF, const TargetRegisterInfo *TRI, DbgValueHistoryMap &DbgValues, DbgLabelInstrMap &DbgLabels)
bool isBefore(const MachineInstr *A, const MachineInstr *B) const
Check if instruction A comes before B, where A and B both belong to the MachineFunction passed to ini...
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
std::pair< const DINode *, const DILocation * > InlinedEntity
bool hasNonEmptyLocation(const Entries &Entries) const
Test whether a vector of entries features any non-empty locations.
Record instruction ordering so we can query their relative positions within a function.
EntryIndex startClobber(InlinedEntity Var, const MachineInstr &MI)
LLVM_DUMP_METHOD void dump() const
Representation of each machine instruction.
static const EntryIndex NoEntry
Special value to indicate that an entry is valid until the end of the function.
void endEntry(EntryIndex EndIndex)
Entry & getEntry(InlinedEntity Var, EntryIndex Index)
SmallVector< Entry, 4 > Entries
void trimLocationRanges(const MachineFunction &MF, LexicalScopes &LScopes, const InstructionOrdering &Ordering)
Drop location ranges which exist entirely outside each variable's scope.
For each user variable, keep a list of instruction ranges where this variable is accessible.
void addInstr(InlinedEntity Label, const MachineInstr &MI)
std::pair< const DINode *, const DILocation * > InlinedEntity
InstrMap::const_iterator end() const
PointerIntPair - This class implements a pair of a pointer and small integer.
LexicalScopes - This class provides interface to collect and use lexical scoping information from mac...
EntryKind getEntryKind() const