Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Public Types |Public Member Functions |Public Attributes |Protected Member Functions |Protected Attributes |List of all members
llvm::DbgRecord Class Reference

Base class for non-instruction debug metadata records that have positions within IR.More...

#include "llvm/IR/DebugProgramInstruction.h"

Inheritance diagram for llvm::DbgRecord:
Inheritance graph
[legend]

Public Types

enum  Kind : uint8_t {ValueKind,LabelKind }
 Subclass discriminator.More...
 
using self_iterator =simple_ilist<DbgRecord >::iterator
 
using const_self_iterator =simple_ilist<DbgRecord >::const_iterator
 

Public Member Functions

 DbgRecord (KindRecordKind,DebugLocDL)
 
bool isEquivalentTo (constDbgRecord &R)const
 Same as isIdenticalToWhenDefined but checksDebugLoc too.
 
Kind getRecordKind ()const
 
void setMarker (DbgMarker *M)
 
DbgMarkergetMarker ()
 
constDbgMarkergetMarker ()const
 
BasicBlockgetBlock ()
 
constBasicBlockgetBlock ()const
 
FunctiongetFunction ()
 
constFunctiongetFunction ()const
 
ModulegetModule ()
 
constModulegetModule ()const
 
LLVMContextgetContext ()
 
constLLVMContextgetContext ()const
 
constInstructiongetInstruction ()const
 
constBasicBlockgetParent ()const
 
BasicBlockgetParent ()
 
void removeFromParent ()
 
void eraseFromParent ()
 
DbgRecordgetNextNode ()
 
DbgRecordgetPrevNode ()
 
void insertBefore (DbgRecord *InsertBefore)
 
void insertAfter (DbgRecord *InsertAfter)
 
void moveBefore (DbgRecord *MoveBefore)
 
void moveAfter (DbgRecord *MoveAfter)
 
void insertBefore (self_iterator InsertBefore)
 
void insertAfter (self_iterator InsertAfter)
 
void moveBefore (self_iterator MoveBefore)
 
void moveAfter (self_iterator MoveAfter)
 
DebugLoc getDebugLoc ()const
 
void setDebugLoc (DebugLoc Loc)
 
void dump ()const
 
void deleteRecord ()
 Methods that dispatch to subclass implementations.
 
DbgRecordclone ()const
 
void print (raw_ostream &O,bool IsForDebug=false)const
 
void print (raw_ostream &O,ModuleSlotTracker &MST,bool IsForDebug)const
 
bool isIdenticalToWhenDefined (constDbgRecord &R)const
 
DbgInfoIntrinsiccreateDebugIntrinsic (Module *M,Instruction *InsertBefore)const
 Convert thisDbgRecord back into an appropriate llvm.dbg.
 
- Public Member Functions inherited fromllvm::ilist_node_impl< OptionsT >
self_iterator getIterator ()
 
const_self_iterator getIterator ()const
 
reverse_self_iterator getReverseIterator ()
 
const_reverse_self_iterator getReverseIterator ()const
 
bool isSentinel ()const
 Check whether this is the sentinel node.
 
- Public Member Functions inherited fromllvm::ilist_detail::node_parent_access< ilist_node_impl< OptionsT >, OptionsT::parent_ty >
const OptionsT::parent_ty * getParent ()const
 
OptionsT::parent_ty * getParent ()
 
void setParent (OptionsT::parent_ty *Parent)
 

Public Attributes

DbgMarkerMarker = nullptr
 Marker that thisDbgRecord is linked into.
 

Protected Member Functions

 ~DbgRecord ()=default
 Similarly toValue, we avoid paying the cost of a vtable by protecting the dtor and having deleteRecord dispatch cleanup.
 
- Protected Member Functions inherited fromllvm::ilist_node_impl< OptionsT >
 ilist_node_impl ()=default
 

Protected Attributes

DebugLoc DbgLoc
 
Kind RecordKind
 Subclass discriminator.
 

Additional Inherited Members

- Protected Types inherited fromllvm::ilist_node_impl< OptionsT >
using self_iterator = typenameilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, false, false >::type
 
using const_self_iterator = typenameilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT, false,true >::type
 
using reverse_self_iterator = typenameilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT,true, false >::type
 
using const_reverse_self_iterator = typenameilist_select_iterator_type< OptionsT::has_iterator_bits, OptionsT,true,true >::type
 

Detailed Description

Base class for non-instruction debug metadata records that have positions within IR.

Features various methods copied across from theInstruction class to aid ease-of-use. DbgRecords should always be linked into aDbgMarker's StoredDbgRecords list. The marker connects aDbgRecord back to its position in theBasicBlock.

We need a discriminator for dyn/isa casts. In order to avoid paying for a vtable for "virtual" functions too, subclasses must add a new discriminator value (RecordKind) and cases to a few functions in the base class: deleteRecord clone isIdenticalToWhenDefined both print methods createDebugIntrinsic

Definition at line134 of fileDebugProgramInstruction.h.

Member Typedef Documentation

◆ const_self_iterator

usingllvm::DbgRecord::const_self_iterator =simple_ilist<DbgRecord>::const_iterator

Definition at line214 of fileDebugProgramInstruction.h.

◆ self_iterator

usingllvm::DbgRecord::self_iterator =simple_ilist<DbgRecord>::iterator

Definition at line213 of fileDebugProgramInstruction.h.

Member Enumeration Documentation

◆ Kind

enumllvm::DbgRecord::Kind :uint8_t

Subclass discriminator.

Enumerator
ValueKind 
LabelKind 

Definition at line139 of fileDebugProgramInstruction.h.

Constructor & Destructor Documentation

◆ DbgRecord()

llvm::DbgRecord::DbgRecord(Kind RecordKind,
DebugLoc DL 
)
inline

Definition at line146 of fileDebugProgramInstruction.h.

◆ ~DbgRecord()

llvm::DbgRecord::~DbgRecord()
protecteddefault

Similarly toValue, we avoid paying the cost of a vtable by protecting the dtor and having deleteRecord dispatch cleanup.

Use deleteRecord to delete a generic record.

Member Function Documentation

◆ clone()

DbgRecord * llvm::DbgRecord::clone() const

Definition at line384 of fileDebugProgramInstruction.cpp.

ReferencesLabelKind,llvm_unreachable,RecordKind, andValueKind.

◆ createDebugIntrinsic()

DbgInfoIntrinsic * llvm::DbgRecord::createDebugIntrinsic(ModuleM,
InstructionInsertBefore 
) const

Convert thisDbgRecord back into an appropriate llvm.dbg.

  • intrinsic.InsertBefore Optional position to insert this intrinsic.
    Returns
    A new llvm.dbg.* intrinsic representiung thisDbgRecord.

Definition at line135 of fileDebugProgramInstruction.cpp.

ReferencesLabelKind,llvm_unreachable,RecordKind, andValueKind.

◆ deleteRecord()

void llvm::DbgRecord::deleteRecord()

Methods that dispatch to subclass implementations.

These need to be manually updated when a new subclass is added.

Definition at line79 of fileDebugProgramInstruction.cpp.

ReferencesRecordKind, andValueKind.

Referenced byllvm::DbgMarker::dropDbgRecords(),llvm::DbgMarker::dropOneDbgRecord(), anderaseFromParent().

◆ dump()

LLVM_DUMP_METHOD void DbgRecord::dump() const

Definition at line5315 of fileAsmWriter.cpp.

Referencesllvm::dbgs(), andprint().

◆ eraseFromParent()

void llvm::DbgRecord::eraseFromParent()

Definition at line679 of fileDebugProgramInstruction.cpp.

ReferencesdeleteRecord(), andremoveFromParent().

◆ getBlock()[1/2]

BasicBlock * llvm::DbgRecord::getBlock()

Definition at line513 of fileDebugProgramInstruction.cpp.

Referencesllvm::DbgMarker::getParent(), andMarker.

Referenced bygetContext(), andgetFunction().

◆ getBlock()[2/2]

constBasicBlock * llvm::DbgRecord::getBlock() const

Definition at line515 of fileDebugProgramInstruction.cpp.

Referencesllvm::DbgMarker::getParent(), andMarker.

◆ getContext()[1/2]

LLVMContext & llvm::DbgRecord::getContext()

Definition at line529 of fileDebugProgramInstruction.cpp.

ReferencesgetBlock(), andllvm::BasicBlock::getContext().

Referenced byllvm::DbgVariableRecord::addVariableLocationOps(),llvm::DbgLabelRecord::createDebugIntrinsic(),llvm::getDebugValueLoc(), andllvm::DbgVariableRecord::replaceVariableLocationOp().

◆ getContext()[2/2]

constLLVMContext & llvm::DbgRecord::getContext() const

Definition at line531 of fileDebugProgramInstruction.cpp.

ReferencesgetBlock(), andllvm::BasicBlock::getContext().

◆ getDebugLoc()

DebugLoc llvm::DbgRecord::getDebugLoc() const
inline

Definition at line208 of fileDebugProgramInstruction.h.

ReferencesDbgLoc.

Referenced bybuildOverlapMapAndRecordDeclares(),llvm::DbgLabelRecord::clone(),llvm::DbgLabelRecord::createDebugIntrinsic(),llvm::DbgVariableRecord::createDebugIntrinsic(),DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan(),findVarsWithStackSlot(),fixupDebugInfoPostExtraction(),getAggregateVariable(),llvm::getDebugValueLoc(),llvm::FastISel::handleDbgInfo(),insertNewDbgInst(),isEquivalentTo(),llvm::DebugInfoFinder::processDbgRecord(),llvm::coro::salvageDebugInfo(),llvm::ValueEnumerator::ValueEnumerator(), andllvm::SelectionDAGBuilder::visitDbgInfo().

◆ getFunction()[1/2]

Function * llvm::DbgRecord::getFunction()

Definition at line517 of fileDebugProgramInstruction.cpp.

ReferencesgetBlock(), andllvm::BasicBlock::getParent().

Referenced bygetModule(), andllvm::coro::salvageDebugInfo().

◆ getFunction()[2/2]

constFunction * llvm::DbgRecord::getFunction() const

Definition at line519 of fileDebugProgramInstruction.cpp.

ReferencesgetBlock(), andllvm::BasicBlock::getParent().

◆ getInstruction()

constInstruction * llvm::DbgRecord::getInstruction() const

Definition at line503 of fileDebugProgramInstruction.cpp.

Referencesllvm::DbgMarker::MarkedInstr, andMarker.

◆ getMarker()[1/2]

DbgMarker * llvm::DbgRecord::getMarker()
inline

Definition at line171 of fileDebugProgramInstruction.h.

ReferencesMarker.

Referenced byllvm::DbgMarker::dropOneDbgRecord(),getModuleFromDPI(),getNextNode(),insertAfter(),insertBefore(),llvm::DbgMarker::insertDbgRecord(),llvm::DbgMarker::insertDbgRecordAfter(),moveAfter(),moveBefore(),removeFromParent(), andrewriteDebugUsers().

◆ getMarker()[2/2]

constDbgMarker * llvm::DbgRecord::getMarker() const
inline

Definition at line172 of fileDebugProgramInstruction.h.

ReferencesMarker.

◆ getModule()[1/2]

Module * llvm::DbgRecord::getModule()

Definition at line523 of fileDebugProgramInstruction.cpp.

ReferencesgetFunction(), andllvm::GlobalValue::getParent().

Referenced byvalueCoversEntireFragment().

◆ getModule()[2/2]

constModule * llvm::DbgRecord::getModule() const

Definition at line525 of fileDebugProgramInstruction.cpp.

ReferencesgetFunction(), andllvm::GlobalValue::getParent().

◆ getNextNode()

DbgRecord * llvm::DbgRecord::getNextNode()
inline

Definition at line193 of fileDebugProgramInstruction.h.

Referencesllvm::ilist_node_impl< OptionsT >::getIterator().

◆ getParent()[1/2]

BasicBlock * llvm::DbgRecord::getParent()

Definition at line511 of fileDebugProgramInstruction.cpp.

Referencesllvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(),llvm::DbgMarker::MarkedInstr, andMarker.

◆ getParent()[2/2]

constBasicBlock * llvm::DbgRecord::getParent() const

Definition at line507 of fileDebugProgramInstruction.cpp.

Referencesllvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(),llvm::DbgMarker::MarkedInstr, andMarker.

Referenced byllvm::JumpThreadingPass::updateSSA().

◆ getPrevNode()

DbgRecord * llvm::DbgRecord::getPrevNode()
inline

Definition at line194 of fileDebugProgramInstruction.h.

Referencesllvm::ilist_node_impl< OptionsT >::getIterator().

◆ getRecordKind()

Kind llvm::DbgRecord::getRecordKind() const
inline

Definition at line167 of fileDebugProgramInstruction.h.

ReferencesRecordKind.

◆ insertAfter()[1/2]

void llvm::DbgRecord::insertAfter(DbgRecordInsertAfter)

Definition at line543 of fileDebugProgramInstruction.cpp.

Referencesassert(),getMarker(), andllvm::DbgMarker::insertDbgRecordAfter().

Referenced bymoveAfter().

◆ insertAfter()[2/2]

void llvm::DbgRecord::insertAfter(self_iterator InsertAfter)

Definition at line560 of fileDebugProgramInstruction.cpp.

Referencesassert(), andgetMarker().

◆ insertBefore()[1/2]

void llvm::DbgRecord::insertBefore(DbgRecordInsertBefore)

Definition at line535 of fileDebugProgramInstruction.cpp.

Referencesassert(),getMarker(), andllvm::DbgMarker::insertDbgRecord().

Referenced bymoveBefore().

◆ insertBefore()[2/2]

void llvm::DbgRecord::insertBefore(self_iterator InsertBefore)

Definition at line552 of fileDebugProgramInstruction.cpp.

Referencesassert(), andgetMarker().

◆ isEquivalentTo()

bool llvm::DbgRecord::isEquivalentTo(constDbgRecordR) const

Same as isIdenticalToWhenDefined but checksDebugLoc too.

Definition at line130 of fileDebugProgramInstruction.cpp.

ReferencesgetDebugLoc(), andisIdenticalToWhenDefined().

◆ isIdenticalToWhenDefined()

bool llvm::DbgRecord::isIdenticalToWhenDefined(constDbgRecordR) const

Definition at line116 of fileDebugProgramInstruction.cpp.

ReferencesLabelKind,llvm_unreachable,RecordKind, andValueKind.

Referenced byisEquivalentTo().

◆ moveAfter()[1/2]

void llvm::DbgRecord::moveAfter(DbgRecordMoveAfter)

Definition at line575 of fileDebugProgramInstruction.cpp.

Referencesassert(),getMarker(),insertAfter(), andremoveFromParent().

◆ moveAfter()[2/2]

void llvm::DbgRecord::moveAfter(self_iterator MoveAfter)

Definition at line588 of fileDebugProgramInstruction.cpp.

Referencesassert(),getMarker(),insertAfter(), andremoveFromParent().

◆ moveBefore()[1/2]

void llvm::DbgRecord::moveBefore(DbgRecordMoveBefore)

Definition at line569 of fileDebugProgramInstruction.cpp.

Referencesassert(),getMarker(),insertBefore(), andremoveFromParent().

◆ moveBefore()[2/2]

void llvm::DbgRecord::moveBefore(self_iterator MoveBefore)

Definition at line582 of fileDebugProgramInstruction.cpp.

Referencesassert(),getMarker(),insertBefore(), andremoveFromParent().

◆ print()[1/2]

void llvm::DbgRecord::print(raw_ostreamO,
bool IsForDebug =false 
) const

Definition at line91 of fileDebugProgramInstruction.cpp.

Referenced bydump().

◆ print()[2/2]

void llvm::DbgRecord::print(raw_ostreamO,
ModuleSlotTrackerMST,
bool IsForDebug 
) const

Definition at line103 of fileDebugProgramInstruction.cpp.

ReferencesLabelKind,llvm_unreachable,RecordKind, andValueKind.

◆ removeFromParent()

void llvm::DbgRecord::removeFromParent()

Definition at line674 of fileDebugProgramInstruction.cpp.

Referencesllvm::ilist_node_impl< OptionsT >::getIterator(),getMarker(),Marker, andllvm::DbgMarker::StoredDbgRecords.

Referenced byDbgInserterHelper(),eraseFromParent(),hoistLockstepIdenticalDbgVariableRecords(),moveAfter(),moveBefore(),rewriteDebugUsers(), andllvm::coro::salvageDebugInfo().

◆ setDebugLoc()

void llvm::DbgRecord::setDebugLoc(DebugLoc Loc)
inline

Definition at line209 of fileDebugProgramInstruction.h.

ReferencesDbgLoc.

Referenced byllvm::coro::salvageDebugInfo().

◆ setMarker()

void llvm::DbgRecord::setMarker(DbgMarkerM)
inline

Definition at line169 of fileDebugProgramInstruction.h.

ReferencesMarker.

Referenced byllvm::DbgMarker::absorbDebugValues().

Member Data Documentation

◆ DbgLoc

DebugLoc llvm::DbgRecord::DbgLoc
protected

Definition at line142 of fileDebugProgramInstruction.h.

Referenced bygetDebugLoc(),llvm::DbgVariableRecord::isEquivalentTo(), andsetDebugLoc().

◆ Marker

DbgMarker* llvm::DbgRecord::Marker = nullptr

Marker that thisDbgRecord is linked into.

Definition at line137 of fileDebugProgramInstruction.h.

Referenced bygetBlock(),getInstruction(),getMarker(),getParent(),llvm::DbgLabelRecord::print(),llvm::DbgVariableRecord::print(),removeFromParent(), andsetMarker().

◆ RecordKind

Kind llvm::DbgRecord::RecordKind
protected

Subclass discriminator.

Definition at line143 of fileDebugProgramInstruction.h.

Referenced byclone(),createDebugIntrinsic(),deleteRecord(),getRecordKind(),isIdenticalToWhenDefined(), andprint().


The documentation for this class was generated from the following files:

Generated on Sun Jul 20 2025 15:56:00 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp