9#ifndef LLVM_CODEGEN_DBGENTITYHISTORYCALCULATOR_H
10#define LLVM_CODEGEN_DBGENTITYHISTORYCALCULATOR_H
24class 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);
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
unsigned const TargetRegisterInfo * TRI
This file implements a map that provides insertion order iteration.
This file defines the PointerIntPair class.
This file defines the SmallVector class.
For each inlined instance of a source-level label, keep the corresponding DBG_LABEL instruction.
InstrMap::const_iterator end() const
std::pair< const DINode *, const DILocation * > InlinedEntity
void addInstr(InlinedEntity Label, const MachineInstr &MI)
InstrMap::const_iterator begin() const
Specifies a change in a variable's debug value history.
const MachineInstr * getInstr() const
Entry(const MachineInstr *Instr, EntryKind Kind)
EntryIndex getEndIndex() const
EntryKind getEntryKind() const
void endEntry(EntryIndex EndIndex)
For each user variable, keep a list of instruction ranges where this variable is accessible.
bool startDbgValue(InlinedEntity Var, const MachineInstr &MI, EntryIndex &NewIndex)
void trimLocationRanges(const MachineFunction &MF, LexicalScopes &LScopes, const InstructionOrdering &Ordering)
Drop location ranges which exist entirely outside each variable's scope.
size_t EntryIndex
Index in the entry vector.
EntryIndex startClobber(InlinedEntity Var, const MachineInstr &MI)
EntriesMap::const_iterator begin() const
SmallVector< Entry, 4 > Entries
EntriesMap::const_iterator end() const
Entry & getEntry(InlinedEntity Var, EntryIndex Index)
LLVM_DUMP_METHOD void dump(StringRef FuncName) const
static const EntryIndex NoEntry
Special value to indicate that an entry is valid until the end of the function.
bool hasNonEmptyLocation(const Entries &Entries) const
Test whether a vector of entries features any non-empty locations.
std::pair< const DINode *, const DILocation * > InlinedEntity
Record instruction ordering so we can query their relative positions within a function.
void initialize(const MachineFunction &MF)
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...
LexicalScopes - This class provides interface to collect and use lexical scoping information from mac...
Representation of each machine instruction.
typename VectorType::const_iterator const_iterator
PointerIntPair - This class implements a pair of a pointer and small integer.
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
void calculateDbgEntityHistory(const MachineFunction *MF, const TargetRegisterInfo *TRI, DbgValueHistoryMap &DbgValues, DbgLabelInstrMap &DbgLabels)