LLVM  17.0.0git
DebugInfo.h
Go to the documentation of this file.
1 //===- DebugInfo.h - Debug Information Helpers ------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines a bunch of datatypes that are useful for creating and
10 // walking debug info in LLVM IR form. They essentially provide wrappers around
11 // the information in the global variables that's needed when constructing the
12 // DWARF information.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_IR_DEBUGINFO_H
17 #define LLVM_IR_DEBUGINFO_H
18 
19 #include "llvm/ADT/STLExtras.h"
20 #include "llvm/ADT/SmallPtrSet.h"
21 #include "llvm/ADT/SmallSet.h"
22 #include "llvm/ADT/SmallVector.h"
23 #include "llvm/ADT/TinyPtrVector.h"
25 #include "llvm/IR/DataLayout.h"
26 #include "llvm/IR/IntrinsicInst.h"
27 #include "llvm/IR/PassManager.h"
28 #include <optional>
29 
30 namespace llvm {
31 
32 class DbgDeclareInst;
33 class DbgValueInst;
34 class DbgVariableIntrinsic;
35 class Instruction;
36 class Module;
37 
38 /// Finds all intrinsics declaring local variables as living in the memory that
39 /// 'V' points to. This may include a mix of dbg.declare and
40 /// dbg.addr intrinsics.
41 TinyPtrVector<DbgVariableIntrinsic *> FindDbgAddrUses(Value *V);
42 
43 /// Like \c FindDbgAddrUses, but only returns dbg.declare intrinsics, not
44 /// dbg.addr.
45 TinyPtrVector<DbgDeclareInst *> FindDbgDeclareUses(Value *V);
46 
47 /// Finds the llvm.dbg.value intrinsics describing a value.
48 void findDbgValues(SmallVectorImpl<DbgValueInst *> &DbgValues, Value *V);
49 
50 /// Finds the debug info intrinsics describing a value.
51 void findDbgUsers(SmallVectorImpl<DbgVariableIntrinsic *> &DbgInsts, Value *V);
52 
53 /// Find subprogram that is enclosing this scope.
54 DISubprogram *getDISubprogram(const MDNode *Scope);
55 
56 /// Produce a DebugLoc to use for each dbg.declare that is promoted to a
57 /// dbg.value.
58 DebugLoc getDebugValueLoc(DbgVariableIntrinsic *DII);
59 
60 /// Strip debug info in the module if it exists.
61 ///
62 /// To do this, we remove all calls to the debugger intrinsics and any named
63 /// metadata for debugging. We also remove debug locations for instructions.
64 /// Return true if module is modified.
65 bool StripDebugInfo(Module &M);
66 bool stripDebugInfo(Function &F);
67 
68 /// Downgrade the debug info in a module to contain only line table information.
69 ///
70 /// In order to convert debug info to what -gline-tables-only would have
71 /// created, this does the following:
72 /// 1) Delete all debug intrinsics.
73 /// 2) Delete all non-CU named metadata debug info nodes.
74 /// 3) Create new DebugLocs for each instruction.
75 /// 4) Create a new CU debug info, and similarly for every metadata node
76 /// that's reachable from the CU debug info.
77 /// All debug type metadata nodes are unreachable and garbage collected.
79 
80 /// Update the debug locations contained within the MD_loop metadata attached
81 /// to the instruction \p I, if one exists. \p Updater is applied to Metadata
82 /// operand in the MD_loop metadata: the returned value is included in the
83 /// updated loop metadata node if it is non-null.
85  Instruction &I, function_ref<Metadata *(Metadata *)> Updater);
86 
87 /// Return Debug Info Metadata Version by checking module flags.
89 
90 /// Utility to find all debug info in a module.
91 ///
92 /// DebugInfoFinder tries to list all debug info MDNodes used in a module. To
93 /// list debug info MDNodes used by an instruction, DebugInfoFinder uses
94 /// processDeclare, processValue and processLocation to handle DbgDeclareInst,
95 /// DbgValueInst and DbgLoc attached to instructions. processModule will go
96 /// through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes
97 /// used by the CUs.
99 public:
100  /// Process entire module and collect debug info anchors.
101  void processModule(const Module &M);
102  /// Process a single instruction and collect debug info anchors.
103  void processInstruction(const Module &M, const Instruction &I);
104 
105  /// Process DbgVariableIntrinsic.
106  void processVariable(const Module &M, const DbgVariableIntrinsic &DVI);
107  /// Process debug info location.
108  void processLocation(const Module &M, const DILocation *Loc);
109 
110  /// Process subprogram.
112 
113  /// Clear all lists.
114  void reset();
115 
116 private:
117  void processCompileUnit(DICompileUnit *CU);
118  void processScope(DIScope *Scope);
119  void processType(DIType *DT);
120  bool addCompileUnit(DICompileUnit *CU);
121  bool addGlobalVariable(DIGlobalVariableExpression *DIG);
122  bool addScope(DIScope *Scope);
123  bool addSubprogram(DISubprogram *SP);
124  bool addType(DIType *DT);
125 
126 public:
127  using compile_unit_iterator =
134 
136  return make_range(CUs.begin(), CUs.end());
137  }
138 
140  return make_range(SPs.begin(), SPs.end());
141  }
142 
144  return make_range(GVs.begin(), GVs.end());
145  }
146 
148  return make_range(TYs.begin(), TYs.end());
149  }
150 
152  return make_range(Scopes.begin(), Scopes.end());
153  }
154 
155  unsigned compile_unit_count() const { return CUs.size(); }
156  unsigned global_variable_count() const { return GVs.size(); }
157  unsigned subprogram_count() const { return SPs.size(); }
158  unsigned type_count() const { return TYs.size(); }
159  unsigned scope_count() const { return Scopes.size(); }
160 
161 private:
168 };
169 
170 /// Assignment Tracking (at).
171 namespace at {
172 //
173 // Utilities for enumerating storing instructions from an assignment ID.
174 //
175 /// A range of instructions.
176 using AssignmentInstRange =
178 /// Return a range of instructions (typically just one) that have \p ID
179 /// as an attachment.
180 /// Iterators invalidated by adding or removing DIAssignID metadata to/from any
181 /// instruction (including by deleting or cloning instructions).
183 /// Return a range of instructions (typically just one) that perform the
184 /// assignment that \p DAI encodes.
185 /// Iterators invalidated by adding or removing DIAssignID metadata to/from any
186 /// instruction (including by deleting or cloning instructions).
188  return getAssignmentInsts(DAI->getAssignID());
189 }
190 
191 //
192 // Utilities for enumerating llvm.dbg.assign intrinsic from an assignment ID.
193 //
194 /// High level: this is an iterator for llvm.dbg.assign intrinsics.
195 /// Implementation details: this is a wrapper around Value's User iterator that
196 /// dereferences to a DbgAssignIntrinsic ptr rather than a User ptr.
198  : public iterator_adaptor_base<DbgAssignIt, Value::user_iterator,
199  typename std::iterator_traits<
200  Value::user_iterator>::iterator_category,
201  DbgAssignIntrinsic *, std::ptrdiff_t,
202  DbgAssignIntrinsic **,
203  DbgAssignIntrinsic *&> {
204 public:
206  DbgAssignIntrinsic *operator*() const { return cast<DbgAssignIntrinsic>(*I); }
207 };
208 /// A range of llvm.dbg.assign intrinsics.
210 /// Return a range of dbg.assign intrinsics which use \ID as an operand.
211 /// Iterators invalidated by deleting an intrinsic contained in this range.
213 /// Return a range of dbg.assign intrinsics for which \p Inst performs the
214 /// assignment they encode.
215 /// Iterators invalidated by deleting an intrinsic contained in this range.
217  if (auto *ID = Inst->getMetadata(LLVMContext::MD_DIAssignID))
218  return getAssignmentMarkers(cast<DIAssignID>(ID));
219  else
221 }
222 
223 /// Delete the llvm.dbg.assign intrinsics linked to \p Inst.
224 void deleteAssignmentMarkers(const Instruction *Inst);
225 
226 /// Replace all uses (and attachments) of \p Old with \p New.
227 void RAUW(DIAssignID *Old, DIAssignID *New);
228 
229 /// Remove all Assignment Tracking related intrinsics and metadata from \p F.
230 void deleteAll(Function *F);
231 
232 /// Helper struct for trackAssignments, below. We don't use the similar
233 /// DebugVariable class because trackAssignments doesn't (yet?) understand
234 /// partial variables (fragment info) as input and want to make that clear and
235 /// explicit using types. In addition, eventually we will want to understand
236 /// expressions that modify the base address too, which a DebugVariable doesn't
237 /// capture.
238 struct VarRecord {
241 
243  : Var(DVI->getVariable()), DL(getDebugValueLoc(DVI)) {}
245  friend bool operator<(const VarRecord &LHS, const VarRecord &RHS) {
246  return std::tie(LHS.Var, LHS.DL) < std::tie(RHS.Var, RHS.DL);
247  }
248  friend bool operator==(const VarRecord &LHS, const VarRecord &RHS) {
249  return std::tie(LHS.Var, LHS.DL) == std::tie(RHS.Var, RHS.DL);
250  }
251 };
252 
253 /// Map of backing storage to a set of variables that are stored to it.
254 /// TODO: Backing storage shouldn't be limited to allocas only. Some local
255 /// variables have their storage allocated by the calling function (addresses
256 /// passed in with sret & byval parameters).
258 
259 /// Track assignments to \p Vars between \p Start and \p End.
260 
262  const StorageToVarsMap &Vars, const DataLayout &DL,
263  bool DebugPrints = false);
264 
265 /// Describes properties of a store that has a static size and offset into a
266 /// some base storage. Used by the getAssignmentInfo functions.
268  AllocaInst const *Base; ///< Base storage.
269  uint64_t OffsetInBits; ///< Offset into Base.
270  uint64_t SizeInBits; ///< Number of bits stored.
271  bool StoreToWholeAlloca; ///< SizeInBits equals the size of the base storage.
272 
277  OffsetInBits == 0 &&
278  SizeInBits == DL.getTypeSizeInBits(Base->getAllocatedType())) {}
279 };
280 
281 std::optional<AssignmentInfo> getAssignmentInfo(const DataLayout &DL,
282  const MemIntrinsic *I);
283 std::optional<AssignmentInfo> getAssignmentInfo(const DataLayout &DL,
284  const StoreInst *SI);
285 std::optional<AssignmentInfo> getAssignmentInfo(const DataLayout &DL,
286  const AllocaInst *AI);
287 
288 } // end namespace at
289 
290 /// Convert @llvm.dbg.declare intrinsics into sets of @llvm.dbg.assign
291 /// intrinsics by treating stores to the dbg.declare'd address as assignments
292 /// to the variable. Not all kinds of variables are supported yet; those will
293 /// be left with their dbg.declare intrinsics.
294 /// The pass sets the debug-info-assignment-tracking module flag to true to
295 /// indicate assignment tracking has been enabled.
296 class AssignmentTrackingPass : public PassInfoMixin<AssignmentTrackingPass> {
297  /// Note: this method does not set the debug-info-assignment-tracking module
298  /// flag.
299  void runOnFunction(Function &F);
300 
301 public:
304 };
305 
306 /// Return true if assignment tracking is enabled for module \p M.
307 bool isAssignmentTrackingEnabled(const Module &M);
308 } // end namespace llvm
309 
310 #endif // LLVM_IR_DEBUGINFO_H
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:152
llvm::at::AssignmentInfo::AssignmentInfo
AssignmentInfo(const DataLayout &DL, AllocaInst const *Base, uint64_t OffsetInBits, uint64_t SizeInBits)
Definition: DebugInfo.h:273
llvm::StripDebugInfo
bool StripDebugInfo(Module &M)
Strip debug info in the module if it exists.
Definition: DebugInfo.cpp:557
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::DIType
Base class for types.
Definition: DebugInfoMetadata.h:697
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::make_range
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
Definition: iterator_range.h:53
llvm::DataLayout
A parsed version of the target data layout string in and methods for querying it.
Definition: DataLayout.h:114
llvm::DebugInfoFinder::reset
void reset()
Clear all lists.
Definition: DebugInfo.cpp:154
IntrinsicInst.h
llvm::PassInfoMixin
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:371
llvm::Function
Definition: Function.h:59
llvm::DebugInfoFinder::type_count
unsigned type_count() const
Definition: DebugInfo.h:158
llvm::at::deleteAssignmentMarkers
void deleteAssignmentMarkers(const Instruction *Inst)
Delete the llvm.dbg.assign intrinsics linked to Inst.
Definition: DebugInfo.cpp:1764
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1199
llvm::isAssignmentTrackingEnabled
bool isAssignmentTrackingEnabled(const Module &M)
Return true if assignment tracking is enabled for module M.
Definition: DebugInfo.cpp:2033
llvm::at::AssignmentInfo::Base
const AllocaInst * Base
Base storage.
Definition: DebugInfo.h:268
llvm::iterator_adaptor_base< DbgAssignIt, Value::user_iterator, std::iterator_traits< Value::user_iterator >::iterator_category, DbgAssignIntrinsic *, std::ptrdiff_t, DbgAssignIntrinsic **, DbgAssignIntrinsic *& >::I
Value::user_iterator I
Definition: iterator.h:241
llvm::findDbgUsers
void findDbgUsers(SmallVectorImpl< DbgVariableIntrinsic * > &DbgInsts, Value *V)
Finds the debug info intrinsics describing a value.
Definition: DebugInfo.cpp:105
llvm::at::AssignmentInfo::SizeInBits
uint64_t SizeInBits
Number of bits stored.
Definition: DebugInfo.h:270
llvm::at::DbgAssignIt::operator*
DbgAssignIntrinsic * operator*() const
Definition: DebugInfo.h:206
llvm::DILocation
Debug location.
Definition: DebugInfoMetadata.h:1605
llvm::getDISubprogram
DISubprogram * getDISubprogram(const MDNode *Scope)
Find subprogram that is enclosing this scope.
Definition: DebugInfo.cpp:132
llvm::at::RAUW
void RAUW(DIAssignID *Old, DIAssignID *New)
Replace all uses (and attachments) of Old with New.
Definition: DebugInfo.cpp:1773
llvm::iterator_adaptor_base
CRTP base class for adapting an iterator to a different type.
Definition: iterator.h:235
llvm::AssignmentTrackingPass
Convert @llvm.dbg.declare intrinsics into sets of @llvm.dbg.assign intrinsics by treating stores to t...
Definition: DebugInfo.h:296
llvm::MemIntrinsic
This is the common base class for memset/memcpy/memmove.
Definition: IntrinsicInst.h:1048
llvm::SmallPtrSet
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
Definition: SmallPtrSet.h:450
llvm::at::DbgAssignIt::DbgAssignIt
DbgAssignIt(Value::user_iterator It)
Definition: DebugInfo.h:205
at
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional ldr LCPI1_0 ldr ldr tst movne lsr ldr LCPI1_1 and r0 bx lr it saves an instruction and a register It might be profitable to cse MOVi16 if there are lots of bit immediates with the same bottom half Robert Muth started working on an alternate jump table implementation that does not put the tables in line in the text This is more like the llvm default jump table implementation This might be useful sometime Several revisions of patches are on the mailing beginning at
Definition: README.txt:582
llvm::FindDbgAddrUses
TinyPtrVector< DbgVariableIntrinsic * > FindDbgAddrUses(Value *V)
Finds all intrinsics declaring local variables as living in the memory that 'V' points to.
Definition: DebugInfo.cpp:49
llvm::at::VarRecord::operator<
friend bool operator<(const VarRecord &LHS, const VarRecord &RHS)
Definition: DebugInfo.h:245
STLExtras.h
RHS
Value * RHS
Definition: X86PartialReduction.cpp:76
llvm::DebugInfoFinder::compile_units
iterator_range< compile_unit_iterator > compile_units() const
Definition: DebugInfo.h:135
llvm::DebugInfoFinder
Utility to find all debug info in a module.
Definition: DebugInfo.h:98
llvm::at::getAssignmentMarkers
AssignmentMarkerRange getAssignmentMarkers(DIAssignID *ID)
Return a range of dbg.assign intrinsics which use \ID as an operand.
Definition: DebugInfo.cpp:1750
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::DebugInfoFinder::type_iterator
SmallVectorImpl< DIType * >::const_iterator type_iterator
Definition: DebugInfo.h:132
LHS
Value * LHS
Definition: X86PartialReduction.cpp:75
llvm::DILocalVariable
Local variable.
Definition: DebugInfoMetadata.h:3162
llvm::at::AssignmentInfo
Describes properties of a store that has a static size and offset into a some base storage.
Definition: DebugInfo.h:267
llvm::DbgAssignIntrinsic::getAssignID
DIAssignID * getAssignID() const
Definition: IntrinsicInst.h:430
SI
@ SI
Definition: SIInstrInfo.cpp:7993
llvm::DebugInfoFinder::scope_iterator
SmallVectorImpl< DIScope * >::const_iterator scope_iterator
Definition: DebugInfo.h:133
llvm::Instruction
Definition: Instruction.h:41
llvm::FindDbgDeclareUses
TinyPtrVector< DbgDeclareInst * > FindDbgDeclareUses(Value *V)
Like FindDbgAddrUses, but only returns dbg.declare intrinsics, not dbg.addr.
Definition: DebugInfo.cpp:71
llvm::stripDebugInfo
bool stripDebugInfo(Function &F)
Definition: DebugInfo.cpp:519
SmallPtrSet.h
llvm::at::getAssignmentInsts
AssignmentInstRange getAssignmentInsts(DIAssignID *ID)
Return a range of instructions (typically just one) that have ID as an attachment.
Definition: DebugInfo.cpp:1738
llvm::AssignmentTrackingPass::run
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Definition: DebugInfo.cpp:2037
llvm::CallingConv::ID
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
llvm::at::getAssignmentInfo
std::optional< AssignmentInfo > getAssignmentInfo(const DataLayout &DL, const MemIntrinsic *I)
Definition: DebugInfo.cpp:1822
llvm::Instruction::getMetadata
MDNode * getMetadata(unsigned KindID) const
Get the metadata of given kind attached to this Instruction.
Definition: Instruction.h:275
llvm::at::VarRecord::Var
DILocalVariable * Var
Definition: DebugInfo.h:239
llvm::DebugInfoFinder::scope_count
unsigned scope_count() const
Definition: DebugInfo.h:159
llvm::DebugInfoFinder::processSubprogram
void processSubprogram(DISubprogram *SP)
Process subprogram.
Definition: DebugInfo.cpp:273
llvm::DbgVariableIntrinsic
This is the common base class for debug info intrinsics for variables.
Definition: IntrinsicInst.h:181
llvm::StoreInst
An instruction for storing to memory.
Definition: Instructions.h:301
uint64_t
llvm::DenseMap
Definition: DenseMap.h:714
I
#define I(x, y, z)
Definition: MD5.cpp:58
llvm::at::trackAssignments
void trackAssignments(Function::iterator Start, Function::iterator End, const StorageToVarsMap &Vars, const DataLayout &DL, bool DebugPrints=false)
Track assignments to Vars between Start and End.
Definition: DebugInfo.cpp:1871
llvm::DICompileUnit
Compile unit.
Definition: DebugInfoMetadata.h:1363
llvm::findDbgValues
void findDbgValues(SmallVectorImpl< DbgValueInst * > &DbgValues, Value *V)
Finds the llvm.dbg.value intrinsics describing a value.
Definition: DebugInfo.cpp:79
llvm::getDebugValueLoc
DebugLoc getDebugValueLoc(DbgVariableIntrinsic *DII)
Produce a DebugLoc to use for each dbg.declare that is promoted to a dbg.value.
Definition: DebugInfo.cpp:138
llvm::at::deleteAll
void deleteAll(Function *F)
Remove all Assignment Tracking related intrinsics and metadata from F.
Definition: DebugInfo.cpp:1791
llvm::SmallVectorImpl::const_iterator
typename SuperClass::const_iterator const_iterator
Definition: SmallVector.h:582
llvm::DebugInfoFinder::processModule
void processModule(const Module &M)
Process entire module and collect debug info anchors.
Definition: DebugInfo.cpp:163
llvm::DebugInfoFinder::global_variable_expression_iterator
SmallVectorImpl< DIGlobalVariableExpression * >::const_iterator global_variable_expression_iterator
Definition: DebugInfo.h:131
iterator_range.h
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
TinyPtrVector.h
llvm::DebugInfoFinder::global_variables
iterator_range< global_variable_expression_iterator > global_variables() const
Definition: DebugInfo.h:143
llvm::DebugInfoFinder::processLocation
void processLocation(const Module &M, const DILocation *Loc)
Process debug info location.
Definition: DebugInfo.cpp:216
llvm::DebugInfoFinder::subprograms
iterator_range< subprogram_iterator > subprograms() const
Definition: DebugInfo.h:139
llvm::DebugInfoFinder::subprogram_count
unsigned subprogram_count() const
Definition: DebugInfo.h:157
DataLayout.h
llvm::DebugInfoFinder::processVariable
void processVariable(const Module &M, const DbgVariableIntrinsic &DVI)
Process DbgVariableIntrinsic.
Definition: DebugInfo.cpp:296
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
llvm::DbgAssignIntrinsic
This represents the llvm.dbg.assign instruction.
Definition: IntrinsicInst.h:412
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
llvm::updateLoopMetadataDebugLocations
void updateLoopMetadataDebugLocations(Instruction &I, function_ref< Metadata *(Metadata *)> Updater)
Update the debug locations contained within the MD_loop metadata attached to the instruction I,...
Definition: DebugInfo.cpp:389
llvm::DebugInfoFinder::subprogram_iterator
SmallVectorImpl< DISubprogram * >::const_iterator subprogram_iterator
Definition: DebugInfo.h:129
llvm::at::DbgAssignIt
High level: this is an iterator for llvm.dbg.assign intrinsics.
Definition: DebugInfo.h:197
llvm::DIScope
Base class for scope-like contexts.
Definition: DebugInfoMetadata.h:508
llvm::Value::user_iterator
user_iterator_impl< User > user_iterator
Definition: Value.h:390
llvm::at::VarRecord
Helper struct for trackAssignments, below.
Definition: DebugInfo.h:238
llvm::DebugInfoFinder::compile_unit_count
unsigned compile_unit_count() const
Definition: DebugInfo.h:155
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
PassManager.h
llvm::at::AssignmentInfo::OffsetInBits
uint64_t OffsetInBits
Offset into Base.
Definition: DebugInfo.h:269
llvm::at::VarRecord::operator==
friend bool operator==(const VarRecord &LHS, const VarRecord &RHS)
Definition: DebugInfo.h:248
llvm::at::VarRecord::VarRecord
VarRecord(DILocalVariable *Var, DILocation *DL)
Definition: DebugInfo.h:244
llvm::DIGlobalVariableExpression
A pair of DIGlobalVariable and DIExpression.
Definition: DebugInfoMetadata.h:3462
llvm::at::AssignmentInfo::StoreToWholeAlloca
bool StoreToWholeAlloca
SizeInBits equals the size of the base storage.
Definition: DebugInfo.h:271
SmallVector.h
llvm::DIAssignID
Assignment ID.
Definition: DebugInfoMetadata.h:302
llvm::stripNonLineTableDebugInfo
bool stripNonLineTableDebugInfo(Module &M)
Downgrade the debug info in a module to contain only line table information.
Definition: DebugInfo.cpp:792
LineType::Metadata
@ Metadata
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition: iterator_range.h:30
llvm::at::VarRecord::DL
DILocation * DL
Definition: DebugInfo.h:240
llvm::DISubprogram
Subprogram description.
Definition: DebugInfoMetadata.h:1851
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition: InstructionSimplify.h:42
llvm::getDebugMetadataVersionFromModule
unsigned getDebugMetadataVersionFromModule(const Module &M)
Return Debug Info Metadata Version by checking module flags.
Definition: DebugInfo.cpp:889
llvm::DebugInfoFinder::scopes
iterator_range< scope_iterator > scopes() const
Definition: DebugInfo.h:151
llvm::AllocaInst
an instruction to allocate memory on the stack
Definition: Instructions.h:58
llvm::DebugInfoFinder::types
iterator_range< type_iterator > types() const
Definition: DebugInfo.h:147
llvm::DebugInfoFinder::processInstruction
void processInstruction(const Module &M, const Instruction &I)
Process a single instruction and collect debug info anchors.
Definition: DebugInfo.cpp:207
llvm::DebugInfoFinder::compile_unit_iterator
SmallVectorImpl< DICompileUnit * >::const_iterator compile_unit_iterator
Definition: DebugInfo.h:128
CU
Definition: AArch64AsmBackend.cpp:505
llvm::at::VarRecord::VarRecord
VarRecord(DbgVariableIntrinsic *DVI)
Definition: DebugInfo.h:242
llvm::DebugInfoFinder::global_variable_count
unsigned global_variable_count() const
Definition: DebugInfo.h:156
llvm::Function::iterator
BasicBlockListType::iterator iterator
Definition: Function.h:65
SmallSet.h