|
LLVM 22.0.0git
|
Base class for non-instruction debug metadata records that have positions within IR. More...
#include "llvm/IR/DebugProgramInstruction.h"
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 Attributes | |
| DbgMarker * | Marker = nullptr |
| Marker that this DbgRecord is linked into. | |
Protected Member Functions | |
| ~DbgRecord ()=default | |
| Similarly to Value, we avoid paying the cost of a vtable by protecting the dtor and having deleteRecord dispatch cleanup. | |
| Protected Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< DbgRecord, Options... >::type > | |
| ilist_node_impl ()=default | |
Protected Attributes | |
| DebugLoc | DbgLoc |
| Kind | RecordKind |
| Subclass discriminator. | |
Additional Inherited Members | |
| Protected Types inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< DbgRecord, Options... >::type > | |
| using | self_iterator |
| using | const_self_iterator |
| using | reverse_self_iterator |
| using | const_reverse_self_iterator |
Base class for non-instruction debug metadata records that have positions within IR.
Features various methods copied across from the Instruction class to aid ease-of-use. DbgRecords should always be linked into a DbgMarker's StoredDbgRecords list. The marker connects a DbgRecord back to its position in the BasicBlock.
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 line 139 of file DebugProgramInstruction.h.
Definition at line 220 of file DebugProgramInstruction.h.
| using llvm::DbgRecord::self_iterator = simple_ilist<DbgRecord>::iterator |
Definition at line 219 of file DebugProgramInstruction.h.
| enum llvm::DbgRecord::Kind : uint8_t |
Subclass discriminator.
| Enumerator | |
|---|---|
| ValueKind | |
| LabelKind | |
Definition at line 144 of file DebugProgramInstruction.h.
Definition at line 151 of file DebugProgramInstruction.h.
References DbgLoc, DL, and RecordKind.
Referenced by llvm::DbgLabelRecord::classof(), llvm::DbgVariableRecord::classof(), clone(), llvm::DbgLabelRecord::DbgLabelRecord(), llvm::DbgVariableRecord::DbgVariableRecord(), llvm::DbgVariableRecord::DbgVariableRecord(), llvm::DbgVariableRecord::DbgVariableRecord(), llvm::DbgVariableRecord::DbgVariableRecord(), getNextNode(), getPrevNode(), insertAfter(), insertBefore(), isEquivalentTo(), isIdenticalToWhenDefined(), moveAfter(), and moveBefore().
|
protecteddefault |
| DbgRecord * DbgRecord::clone | ( | ) | const |
Definition at line 403 of file DebugProgramInstruction.cpp.
References llvm::cast(), DbgRecord(), LabelKind, llvm_unreachable, RecordKind, and ValueKind.
| DbgInfoIntrinsic * DbgRecord::createDebugIntrinsic | ( | Module * | M, |
| Instruction * | InsertBefore ) const |
Convert this DbgRecord back into an appropriate llvm.dbg.
InsertBefore Optional position to insert this intrinsic. Definition at line 138 of file DebugProgramInstruction.cpp.
References llvm::cast(), LabelKind, llvm_unreachable, RecordKind, and ValueKind.
| void DbgRecord::deleteRecord | ( | ) |
Methods that dispatch to subclass implementations.
These need to be manually updated when a new subclass is added.
Definition at line 82 of file DebugProgramInstruction.cpp.
References llvm::cast(), LabelKind, llvm_unreachable, RecordKind, and ValueKind.
Referenced by llvm::DbgMarker::dropDbgRecords(), llvm::DbgMarker::dropOneDbgRecord(), and eraseFromParent().
| LLVM_DUMP_METHOD void DbgRecord::dump | ( | ) | const |
Definition at line 5450 of file AsmWriter.cpp.
References llvm::dbgs(), and print().
| void DbgRecord::eraseFromParent | ( | ) |
Definition at line 702 of file DebugProgramInstruction.cpp.
References deleteRecord(), and removeFromParent().
Referenced by promoteSingleBlockAlloca(), and rewriteSingleStoreAlloca().
| BasicBlock * DbgRecord::getBlock | ( | ) |
Definition at line 536 of file DebugProgramInstruction.cpp.
References Marker.
Referenced by getContext(), getContext(), getFunction(), and getFunction().
| const BasicBlock * DbgRecord::getBlock | ( | ) | const |
Definition at line 538 of file DebugProgramInstruction.cpp.
References Marker.
| LLVMContext & DbgRecord::getContext | ( | ) |
Definition at line 552 of file DebugProgramInstruction.cpp.
References getBlock(), and llvm::BasicBlock::getContext().
Referenced by llvm::DbgVariableRecord::addVariableLocationOps(), llvm::DbgLabelRecord::createDebugIntrinsic(), llvm::getDebugValueLoc(), llvm::DbgVariableRecord::replaceVariableLocationOp(), llvm::DbgVariableRecord::replaceVariableLocationOp(), and restorePreTransformState().
| const LLVMContext & DbgRecord::getContext | ( | ) | const |
Definition at line 554 of file DebugProgramInstruction.cpp.
References getBlock(), and llvm::BasicBlock::getContext().
|
inline |
Definition at line 214 of file DebugProgramInstruction.h.
References DbgLoc.
Referenced by buildOverlapMapAndRecordDeclares(), llvm::DbgLabelRecord::clone(), llvm::DbgLabelRecord::createDebugIntrinsic(), llvm::DbgVariableRecord::createDebugIntrinsic(), llvm::DbgVariableRecord::DbgVariableRecord(), llvm::DbgVariableRecord::DbgVariableRecord(), findVarsWithStackSlot(), fixupDebugInfoPostExtraction(), getAggregateVariable(), llvm::getDebugValueLoc(), llvm::FastISel::handleDbgInfo(), insertNewDbgInst(), isEquivalentTo(), llvm::DebugInfoFinder::processDbgRecord(), remarkAlloca(), llvm::coro::salvageDebugInfo(), llvm::ValueEnumerator::ValueEnumerator(), and llvm::SelectionDAGBuilder::visitDbgInfo().
| Function * DbgRecord::getFunction | ( | ) |
Definition at line 540 of file DebugProgramInstruction.cpp.
References getBlock(), and llvm::BasicBlock::getParent().
Referenced by getModule(), getModule(), and llvm::coro::salvageDebugInfo().
Definition at line 542 of file DebugProgramInstruction.cpp.
References getBlock(), and llvm::BasicBlock::getParent().
| const Instruction * DbgRecord::getInstruction | ( | ) | const |
Definition at line 526 of file DebugProgramInstruction.cpp.
References Marker.
|
inline |
Definition at line 177 of file DebugProgramInstruction.h.
References Marker.
Referenced by llvm::DbgMarker::dropOneDbgRecord(), getModuleFromDPI(), getNextNode(), insertAfter(), insertAfter(), insertBefore(), insertBefore(), llvm::DbgMarker::insertDbgRecord(), llvm::DbgMarker::insertDbgRecordAfter(), moveAfter(), moveAfter(), moveBefore(), moveBefore(), removeFromParent(), and rewriteDebugUsers().
Definition at line 178 of file DebugProgramInstruction.h.
References Marker.
| Module * DbgRecord::getModule | ( | ) |
Definition at line 546 of file DebugProgramInstruction.cpp.
References getFunction(), and llvm::GlobalValue::getParent().
Referenced by valueCoversEntireFragment().
Definition at line 548 of file DebugProgramInstruction.cpp.
References getFunction(), and llvm::GlobalValue::getParent().
|
inline |
Definition at line 199 of file DebugProgramInstruction.h.
References DbgRecord(), and llvm::ilist_node_impl< ilist_detail::compute_node_options< DbgRecord, Options... >::type >::getIterator().
| BasicBlock * DbgRecord::getParent | ( | ) |
Definition at line 534 of file DebugProgramInstruction.cpp.
References Marker.
| const BasicBlock * DbgRecord::getParent | ( | ) | const |
Definition at line 530 of file DebugProgramInstruction.cpp.
References Marker.
Referenced by llvm::JumpThreadingPass::updateSSA().
|
inline |
Definition at line 200 of file DebugProgramInstruction.h.
References DbgRecord(), and llvm::ilist_node_impl< ilist_detail::compute_node_options< DbgRecord, Options... >::type >::getIterator().
|
inline |
Definition at line 173 of file DebugProgramInstruction.h.
References RecordKind.
| void DbgRecord::insertAfter | ( | DbgRecord * | InsertAfter | ) |
Definition at line 566 of file DebugProgramInstruction.cpp.
References assert(), DbgRecord(), getMarker(), and llvm::DbgMarker::insertDbgRecordAfter().
Referenced by moveAfter(), and moveAfter().
| void DbgRecord::insertAfter | ( | self_iterator | InsertAfter | ) |
Definition at line 583 of file DebugProgramInstruction.cpp.
References assert(), and getMarker().
| void DbgRecord::insertBefore | ( | DbgRecord * | InsertBefore | ) |
Definition at line 558 of file DebugProgramInstruction.cpp.
References assert(), DbgRecord(), getMarker(), and llvm::DbgMarker::insertDbgRecord().
Referenced by moveBefore(), and moveBefore().
| void DbgRecord::insertBefore | ( | self_iterator | InsertBefore | ) |
Definition at line 575 of file DebugProgramInstruction.cpp.
References assert(), and getMarker().
Same as isIdenticalToWhenDefined but checks DebugLoc too.
Definition at line 133 of file DebugProgramInstruction.cpp.
References DbgRecord(), getDebugLoc(), and isIdenticalToWhenDefined().
Definition at line 119 of file DebugProgramInstruction.cpp.
References llvm::cast(), DbgRecord(), LabelKind, llvm_unreachable, RecordKind, and ValueKind.
Referenced by isEquivalentTo().
| void DbgRecord::moveAfter | ( | DbgRecord * | MoveAfter | ) |
Definition at line 598 of file DebugProgramInstruction.cpp.
References assert(), DbgRecord(), getMarker(), insertAfter(), and removeFromParent().
| void DbgRecord::moveAfter | ( | self_iterator | MoveAfter | ) |
Definition at line 611 of file DebugProgramInstruction.cpp.
References assert(), getMarker(), insertAfter(), and removeFromParent().
| void DbgRecord::moveBefore | ( | DbgRecord * | MoveBefore | ) |
Definition at line 592 of file DebugProgramInstruction.cpp.
References assert(), DbgRecord(), getMarker(), insertBefore(), and removeFromParent().
Referenced by migrateDebugInfo().
| void DbgRecord::moveBefore | ( | self_iterator | MoveBefore | ) |
Definition at line 605 of file DebugProgramInstruction.cpp.
References assert(), getMarker(), insertBefore(), and removeFromParent().
| void DbgRecord::print | ( | raw_ostream & | O, |
| bool | IsForDebug = false ) const |
Definition at line 94 of file DebugProgramInstruction.cpp.
References llvm::cast(), RecordKind, and ValueKind.
| void DbgRecord::print | ( | raw_ostream & | O, |
| ModuleSlotTracker & | MST, | ||
| bool | IsForDebug ) const |
Definition at line 106 of file DebugProgramInstruction.cpp.
References llvm::cast(), LabelKind, llvm_unreachable, RecordKind, and ValueKind.
| void DbgRecord::removeFromParent | ( | ) |
Definition at line 697 of file DebugProgramInstruction.cpp.
References llvm::ilist_node_impl< ilist_detail::compute_node_options< DbgRecord, Options... >::type >::getIterator(), getMarker(), Marker, and llvm::DbgMarker::StoredDbgRecords.
Referenced by DbgInserterHelper(), eraseFromParent(), hoistLockstepIdenticalDbgVariableRecords(), moveAfter(), moveAfter(), moveBefore(), moveBefore(), rewriteDebugUsers(), and llvm::coro::salvageDebugInfo().
|
inline |
Definition at line 215 of file DebugProgramInstruction.h.
References DbgLoc.
Referenced by migrateDebugInfo(), and llvm::coro::salvageDebugInfo().
|
inline |
Definition at line 175 of file DebugProgramInstruction.h.
References Marker.
Referenced by llvm::DbgMarker::absorbDebugValues().
|
protected |
Definition at line 147 of file DebugProgramInstruction.h.
Referenced by DbgRecord(), getDebugLoc(), llvm::DbgVariableRecord::isEquivalentTo(), and setDebugLoc().
| DbgMarker* llvm::DbgRecord::Marker = nullptr |
Marker that this DbgRecord is linked into.
Definition at line 142 of file DebugProgramInstruction.h.
Referenced by getBlock(), getBlock(), getInstruction(), getMarker(), getMarker(), getParent(), getParent(), llvm::DbgLabelRecord::print(), llvm::DbgVariableRecord::print(), removeFromParent(), and setMarker().
|
protected |
Subclass discriminator.
Definition at line 148 of file DebugProgramInstruction.h.
Referenced by clone(), createDebugIntrinsic(), DbgRecord(), deleteRecord(), getRecordKind(), isIdenticalToWhenDefined(), print(), and print().