37#define DEBUG_TYPE "live-debug-values"
43 cl::desc(
"Use instruction-ref based LiveDebugValues with "
44 "normal DBG_VALUE inputs"),
48 "experimental-debug-variable-locations",
49 cl::desc(
"Use experimental new value-tracking variable locations"));
54 "livedebugvalues-input-bb-limit",
55 cl::desc(
"Maximum input basic blocks before DBG_VALUE limit applies"),
58 "livedebugvalues-input-dbg-value-limit",
60 "Maximum input DBG_VALUE insts supported by debug range extension"),
71 LiveDebugValuesLegacy();
72 ~LiveDebugValuesLegacy()
override =
default;
86 ~LiveDebugValues() =
default;
90 std::unique_ptr<LDVImpl> InstrRefImpl;
91 std::unique_ptr<LDVImpl> VarLocImpl;
96char LiveDebugValuesLegacy::ID = 0;
106LiveDebugValues::LiveDebugValues() {
117 bool ShouldEmitDebugEntryValues =
127 auto *TPC = &getAnalysis<TargetPassConfig>();
131 M->getDebuggerTuning()));
135 bool ShouldEmitDebugEntryValues) {
140 LDVImpl *TheImpl = &*VarLocImpl;
146 TheImpl = &*InstrRefImpl;
149 return TheImpl->
ExtendRanges(MF, DomTree, ShouldEmitDebugEntryValues,
Module.h This file contains the declarations for the Module class.
static cl::opt< unsigned > InputBBLimit("livedebugvalues-input-bb-limit", cl::desc("Maximum input basic blocks before DBG_VALUE limit applies"), cl::init(10000), cl::Hidden)
static cl::opt< bool > ForceInstrRefLDV("force-instr-ref-livedebugvalues", cl::Hidden, cl::desc("Use instruction-ref based LiveDebugValues with " "normal DBG_VALUE inputs"), cl::init(false))
static cl::opt< unsigned > InputDbgValueLimit("livedebugvalues-input-dbg-value-limit", cl::desc("Maximum input DBG_VALUE insts supported by debug range extension"), cl::init(50000), cl::Hidden)
static cl::opt< cl::boolOrDefault > ValueTrackingVariableLocations("experimental-debug-variable-locations", cl::desc("Use experimental new value-tracking variable locations"))
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
Target-Independent Code Generator Pass Configuration Options pass.
Represent the analysis usage information of a pass.
AnalysisUsage & addRequired()
LLVM_ABI void setPreservesCFG()
This function should be called by the pass, iff they do not:
Represents analyses that only rely on functions' control flow.
void recalculate(ParentType &Func)
recalculate - compute a dominator tree for the given function
Module * getParent()
Get the module that this global value is contained inside of...
LLVM_ABI PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
bool useDebugInstrRef() const
Returns true if the function's variable locations are tracked with instruction referencing.
Function & getFunction()
Return the LLVM function that this machine code represents.
const TargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
A Module instance is used to store all the information related to an LLVM module.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
virtual bool ExtendRanges(MachineFunction &MF, MachineDominatorTree *DomTree, bool ShouldEmitDebugEntryValues, unsigned InputBBLimit, unsigned InputDbgValLimit)=0
Primary interface to the complete machine description for the target machine.
bool shouldEmitDebugEntryValues(DebuggerKind Tuning) const
NOTE: There are targets that still do not support the debug entry values production.
Target-Independent Code Generator Pass Configuration Options.
Triple - Helper class for working with autoconf configuration names.
initializer< Ty > init(const Ty &Val)
PointerTypeMap run(const Module &M)
Compute the PointerTypeMap for the module M.
This is an optimization pass for GlobalISel generic memory operations.
LDVImpl * makeInstrRefBasedLiveDebugValues()
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
LLVM_ABI char & LiveDebugValuesID
LiveDebugValues pass.
LLVM_ABI PreservedAnalyses getMachineFunctionPassPreservedAnalyses()
Returns the minimum set of Analyses that all machine function passes must preserve.
LDVImpl * makeVarLocBasedLiveDebugValues()
bool debuginfoShouldUseDebugInstrRef(const Triple &T)