/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | Local.cpp | 623 for (auto *DVR : DPUsers) in replaceDbgUsesWithUndef() local 624 DVR->setKillLocation(); in replaceDbgUsesWithUndef() 1591 for (auto *DVR : DbgVariableRecords) { in PhiHasDebugValue() local 1592 assert(is_contained(DVR->location_ops(), APN)); in PhiHasDebugValue() 1593 if ((DVR->getVariable() == DIVar) && (DVR->getExpression() == DIExpr)) in PhiHasDebugValue() 1634 static bool valueCoversEntireFragment(Type *ValTy, DbgVariableRecord *DVR) { in valueCoversEntireFragment() argument 1635 const DataLayout &DL = DVR->getModule()->getDataLayout(); in valueCoversEntireFragment() 1638 DVR->getExpression()->getActiveBits(DVR->getVariable())) in valueCoversEntireFragment() 1644 if (DVR->isAddressOfVariable()) { in valueCoversEntireFragment() 1646 assert(DVR->getNumVariableLocationOps() == 1 && in valueCoversEntireFragment() [all …]
|
H A D | MemoryTaggingSupport.cpp | 116 for (DbgVariableRecord &DVR : filterDbgVars(Inst.getDbgRecordRange())) { in visit() 123 if (DVRVec.empty() || DVRVec.back() != &DVR) in visit() 124 DVRVec.push_back(&DVR); in visit() 128 for_each(DVR.location_ops(), AddIfInteresting); in visit() 129 if (DVR.isDbgAssign()) in visit() 130 AddIfInteresting(DVR.getAddress()); in visit() 293 static DbgVariableRecord *DynCastToDbgAssign(DbgVariableRecord *DVR) { in DynCastToDbgAssign() argument 294 return DVR->isDbgAssign() ? DVR : nullptr; in DynCastToDbgAssign()
|
H A D | SSAUpdater.cpp | 209 for (auto &DVR : DbgVariableRecords) { in UpdateDebugValues() local 210 if (DVR->getParent() == I->getParent()) in UpdateDebugValues() 212 UpdateDebugValue(I, DVR); in UpdateDebugValues() 225 for (auto &DVR : DbgVariableRecords) { in UpdateDebugValues() local 226 UpdateDebugValue(I, DVR); in UpdateDebugValues() 239 void SSAUpdater::UpdateDebugValue(Instruction *I, DbgVariableRecord *DVR) { in UpdateDebugValue() argument 240 BasicBlock *UserBB = DVR->getParent(); in UpdateDebugValue() 243 DVR->replaceVariableLocationOp(I, NewVal); in UpdateDebugValue() 245 DVR->setKillLocation(); in UpdateDebugValue()
|
H A D | BasicBlockUtils.cpp | 398 DbgVariableRecord &DVR = cast<DbgVariableRecord>(DR); in DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan() local 401 if (DVR.getType() == DbgVariableRecord::LocationType::Declare) { in DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan() 411 DebugVariable Key(DVR.getVariable(), DVR.getExpression(), in DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan() 412 DVR.getDebugLoc()->getInlinedAt()); in DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan() 420 if (DVR.isDbgAssign()) { in DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan() 422 if (!at::getAssignmentInsts(&DVR).empty()) in DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan() 427 ToBeRemoved.push_back(&DVR); in DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan() 436 for (auto &DVR : ToBeRemoved) in DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan() local 437 DVR->eraseFromParent(); in DbgVariableRecordsRemoveRedundantDbgInstrsUsingBackwardScan() 509 for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange())) { in DbgVariableRecordsRemoveRedundantDbgInstrsUsingForwardScan() [all …]
|
H A D | LoopRotationUtils.cpp | 187 for (DbgVariableRecord *DVR : DbgVariableRecords) { in RewriteUsesOfClonedInstructions() 190 BasicBlock *UserBB = DVR->getMarker()->getParent(); in RewriteUsesOfClonedInstructions() 205 DVR->replaceVariableLocationOp(OrigHeaderVal, NewVal); in RewriteUsesOfClonedInstructions() 568 for (const DbgVariableRecord &DVR : in rotateLoop() local 570 DbgIntrinsics.insert(makeHash(&DVR)); in rotateLoop() 578 for (const DbgVariableRecord &DVR : in rotateLoop() local 580 DbgIntrinsics.insert(makeHash(&DVR)); in rotateLoop() 645 for (DbgVariableRecord &DVR : in rotateLoop() 647 if (DbgIntrinsics.count(makeHash(&DVR))) in rotateLoop() 648 DVR.eraseFromParent(); in rotateLoop() [all …]
|
H A D | PromoteMemoryToRegister.cpp | 138 for (DbgVariableRecord *DVR : at::getDVRAssignmentMarkers(AI)) { in init() 139 if (Vars.insert(DebugVariable(DVR)).second) in init() 140 DVRAssigns.push_back(DVR); in init() 199 for (auto *DVR : DVRAssigns) in updateForNewPhi() local 200 ConvertDebugDeclareToDebugValue(DVR, NewPhi, DIB); in updateForNewPhi() 276 [](DbgVariableRecord *DVR) { return !DVR->isDbgAssign(); }); in AnalyzeAlloca() argument 437 for (auto *DVR : DVRAssignsToDelete) in cleanUpDbgAssigns() local 438 DVR->eraseFromParent(); in cleanUpDbgAssigns()
|
H A D | CodeExtractor.cpp | 1535 for (DbgVariableRecord *DVR : DbgVariableRecords) in eraseDebugIntrinsicsWithNonLocalRefs() 1536 if (DVR->getFunction() != &F) in eraseDebugIntrinsicsWithNonLocalRefs() 1537 DVR->eraseFromParent(); in eraseDebugIntrinsicsWithNonLocalRefs() 1630 DbgVariableRecord &DVR = cast<DbgVariableRecord>(DR); in fixupDebugInfoPostExtraction() local 1633 if (any_of(DVR.location_ops(), IsInvalidLocation)) { in fixupDebugInfoPostExtraction() 1634 DVRsToDelete.push_back(&DVR); in fixupDebugInfoPostExtraction() 1637 if (DVR.isDbgAssign() && IsInvalidLocation(DVR.getAddress())) { in fixupDebugInfoPostExtraction() 1638 DVRsToDelete.push_back(&DVR); in fixupDebugInfoPostExtraction() 1641 if (!DVR.getDebugLoc().getInlinedAt()) in fixupDebugInfoPostExtraction() 1642 DVR.setVariable(GetUpdatedDIVariable(DVR.getVariable())); in fixupDebugInfoPostExtraction() [all …]
|
H A D | Debugify.cpp | 354 for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange())) in collectDebugInfoMetadata() 355 HandleDbgVariable(&DVR); in collectDebugInfoMetadata() 600 for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange())) in checkDebugInfoMetadata() 601 HandleDbgVariable(&DVR); in checkDebugInfoMetadata() 775 for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange())) in checkDebugifyMetadata() 776 if (DVR.isDbgValue() || DVR.isDbgAssign()) in checkDebugifyMetadata() 777 CheckForMisSized(&DVR); in checkDebugifyMetadata()
|
H A D | LCSSA.cpp | 264 for (DbgVariableRecord *DVR : DbgVariableRecords) { in formLCSSAForInstructions() 265 BasicBlock *UserBB = DVR->getMarker()->getParent(); in formLCSSAForInstructions() 274 DVR->replaceVariableLocationOp(I, V); in formLCSSAForInstructions()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | AssignmentTrackingAnalysis.cpp | 230 for (const DbgVariableRecord &DVR : filterDbgVars(I->getDbgRecordRange())) { in init() local 233 if (!Builder.VarLocsBeforeInst.count(&DVR)) in init() 235 for (const VarLocInfo &VarLoc : Builder.VarLocsBeforeInst[&DVR]) in init() 833 for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange())) { in process() 834 if (const auto *Locs = FnVarLocs->getWedge(&DVR)) { in process() 836 addDef(Loc, &DVR, *I.getParent(), LiveSet); in process() 1358 void processDbgVariableRecord(DbgVariableRecord &DVR, BlockInfo *LiveSet); 1461 static DIAssignID *getIDFromMarker(const DbgVariableRecord &DVR) { in getIDFromMarker() argument 1462 assert(DVR.isDbgAssign() && in getIDFromMarker() 1464 return DVR.getAssignID(); in getIDFromMarker() [all …]
|
H A D | MachineDebugify.cpp | 86 for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange())) { in applyDebugifyMetadataToMachineFunction() 87 if (!DVR.isDbgValue()) in applyDebugifyMetadataToMachineFunction() 89 unsigned Line = DVR.getDebugLoc().getLine(); in applyDebugifyMetadataToMachineFunction() 91 Line2Var[Line] = DVR.getVariable(); in applyDebugifyMetadataToMachineFunction() 93 EarliestDVR = &DVR; in applyDebugifyMetadataToMachineFunction() 94 Expr = DVR.getExpression(); in applyDebugifyMetadataToMachineFunction()
|
/freebsd/contrib/llvm-project/llvm/lib/Bitcode/Writer/ |
H A D | ValueEnumerator.cpp | 147 for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange())) { in orderModule() 148 OrderConstantFromMetadata(DVR.getRawLocation()); in orderModule() 149 if (DVR.isDbgAssign()) in orderModule() 150 OrderConstantFromMetadata(DVR.getRawAddress()); in orderModule() 288 for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange())) { in predictUseListOrder() 289 PredictValueOrderFromMetadata(DVR.getRawLocation()); in predictUseListOrder() 290 if (DVR.isDbgAssign()) in predictUseListOrder() 291 PredictValueOrderFromMetadata(DVR.getRawAddress()); in predictUseListOrder() 450 DbgVariableRecord &DVR = cast<DbgVariableRecord>(DR); in ValueEnumerator() local 451 EnumerateNonLocalValuesFromMetadata(DVR.getRawLocation()); in ValueEnumerator() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
H A D | DebugInfo.h | 63 DebugLoc getDebugValueLoc(DbgVariableRecord *DVR); 199 inline AssignmentInstRange getAssignmentInsts(const DbgVariableRecord *DVR) { in getAssignmentInsts() argument 200 assert(DVR->isDbgAssign() && in getAssignmentInsts() 202 return getAssignmentInsts(DVR->getAssignID()); in getAssignmentInsts() 287 VarRecord(DbgVariableRecord *DVR) in VarRecord() 288 : Var(DVR->getVariable()), DL(getDebugValueLoc(DVR)) {} in VarRecord()
|
/freebsd/contrib/llvm-project/llvm/lib/IR/ |
H A D | DebugInfo.cpp | 76 for (DbgVariableRecord *DVR : L->getAllDbgVariableRecordUsers()) in findDVRDeclares() 77 if (DVR->getType() == DbgVariableRecord::LocationType::Declare) in findDVRDeclares() 78 Declares.push_back(DVR); in findDVRDeclares() 115 for (DbgVariableRecord *DVR : L->getAllDbgVariableRecordUsers()) { in findDbgIntrinsics() 116 if (!DbgAssignAndValuesOnly || DVR->isDbgValue() || DVR->isDbgAssign()) in findDbgIntrinsics() 117 if (EncounteredDbgVariableRecords.insert(DVR).second) in findDbgIntrinsics() 118 DbgVariableRecords->push_back(DVR); in findDbgIntrinsics() 130 for (DbgVariableRecord *DVR : DI->getAllDbgVariableRecordUsers()) in findDbgIntrinsics() 131 if (!DbgAssignAndValuesOnly || DVR->isDbgValue() || DVR->isDbgAssign()) in findDbgIntrinsics() 132 if (EncounteredDbgVariableRecords.insert(DVR).second) in findDbgIntrinsics() [all …]
|
H A D | DebugProgramInstruction.cpp | 58 DbgVariableRecord::DbgVariableRecord(const DbgVariableRecord &DVR) in DbgVariableRecord() argument 59 : DbgRecord(ValueKind, DVR.getDebugLoc()), DebugValueUser(DVR.DebugValues), in DbgVariableRecord() 60 Type(DVR.getType()), Variable(DVR.getVariable()), in DbgVariableRecord() 61 Expression(DVR.getExpression()), in DbgVariableRecord() 62 AddressExpression(DVR.AddressExpression) {} in DbgVariableRecord() 673 for (DbgRecord &DVR : Src.StoredDbgRecords) in absorbDebugValues() 674 DVR.setMarker(this); in absorbDebugValues()
|
H A D | Verifier.cpp | 543 void visit(DbgVariableRecord &DVR); 637 void verifyFnArgs(const DbgVariableRecord &DVR); 689 if (auto *DVR = dyn_cast<DbgVariableRecord>(&DR)) { in visitDbgRecords() local 690 visit(*DVR); in visitDbgRecords() 693 verifyFragmentExpression(*DVR); in visitDbgRecords() 694 verifyNotEntryValue(*DVR); in visitDbgRecords() 4890 for (DbgVariableRecord *DVR : in visitDIAssignIDMetadata() 4892 CheckDI(DVR->isDbgAssign(), in visitDIAssignIDMetadata() 4893 "!DIAssignID should only be used by Assign DVRs.", MD, DVR); in visitDIAssignIDMetadata() 4894 CheckDI(DVR->getFunction() == I.getFunction(), in visitDIAssignIDMetadata() [all …]
|
H A D | DIBuilder.cpp | 981 DbgVariableRecord *DVR = DbgVariableRecord::createDVRAssign( in insertDbgAssign() local 987 insertDbgVariableRecord(DVR, InsertBB, InsertBefore, true); in insertDbgAssign() 988 return DVR; in insertDbgAssign() 1070 DbgVariableRecord *DVR = in insertDbgValueIntrinsic() local 1072 insertDbgVariableRecord(DVR, InsertBB, InsertBefore); in insertDbgValueIntrinsic() 1073 return DVR; in insertDbgValueIntrinsic() 1093 DbgVariableRecord *DVR = in insertDeclare() local 1095 insertDbgVariableRecord(DVR, InsertBB, InsertBefore); in insertDeclare() 1096 return DVR; in insertDeclare() 1113 void DIBuilder::insertDbgVariableRecord(DbgVariableRecord *DVR, in insertDbgVariableRecord() argument [all …]
|
H A D | AsmWriter.cpp | 871 void processDbgRecordMetadata(const DbgRecord &DVR); 1148 if (const DbgVariableRecord *DVR = dyn_cast<const DbgVariableRecord>(&DR)) { in processDbgRecordMetadata() local 1153 if (auto *Empty = dyn_cast<MDNode>(DVR->getRawLocation())) in processDbgRecordMetadata() 1155 CreateMetadataSlot(DVR->getRawVariable()); in processDbgRecordMetadata() 1156 if (DVR->isDbgAssign()) { in processDbgRecordMetadata() 1157 CreateMetadataSlot(cast<MDNode>(DVR->getRawAssignID())); in processDbgRecordMetadata() 1158 if (auto *Empty = dyn_cast<MDNode>(DVR->getRawAddress())) in processDbgRecordMetadata() 2755 void printDbgVariableRecord(const DbgVariableRecord &DVR); 4668 if (auto *DVR = dyn_cast<DbgVariableRecord>(&DR)) in printDbgRecord() local 4669 printDbgVariableRecord(*DVR); in printDbgRecord() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/ |
H A D | MergeFunctions.cpp | 532 DbgVariableRecord *DVR = PDVRUnrelatedWL.back(); in eraseInstsUnrelatedToPDI() local 534 LLVM_DEBUG(DVR->print(dbgs())); in eraseInstsUnrelatedToPDI() 536 DVR->eraseFromParent(); in eraseInstsUnrelatedToPDI() 648 for (DbgVariableRecord &DVR : filterDbgVars(BI->getDbgRecordRange())) { in filterInstsUnrelatedToPDI() 649 if (DVR.isDbgValue() || DVR.isDbgAssign()) { in filterInstsUnrelatedToPDI() 650 ExamineDbgValue(&DVR, PDVRRelated); in filterInstsUnrelatedToPDI() 652 assert(DVR.isDbgDeclare()); in filterInstsUnrelatedToPDI() 653 ExamineDbgDeclare(&DVR, PDVRRelated); in filterInstsUnrelatedToPDI() 691 for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange())) in filterInstsUnrelatedToPDI() 692 IsPDIRelated(&DVR, PDVRRelated, PDVRUnrelatedWL); in filterInstsUnrelatedToPDI()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
H A D | Local.h | 266 void ConvertDebugDeclareToDebugValue(DbgVariableRecord *DVR, StoreInst *SI, 273 void ConvertDebugDeclareToDebugValue(DbgVariableRecord *DVR, LoadInst *LI, 280 void ConvertDebugDeclareToDebugValue(DbgVariableRecord *DVR, PHINode *LI,
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | ADCE.cpp | 554 if (DbgVariableRecord *DVR = dyn_cast<DbgVariableRecord>(&DR); in removeDeadInstructions() local 555 DVR && DVR->isDbgAssign()) in removeDeadInstructions() 556 if (!at::getAssignmentInsts(DVR).empty()) in removeDeadInstructions()
|
H A D | SROA.cpp | 318 static DebugVariable getAggregateVariable(DbgVariableRecord *DVR) { in getAggregateVariable() argument 319 return DebugVariable(DVR->getVariable(), std::nullopt, in getAggregateVariable() 320 DVR->getDebugLoc().getInlinedAt()); in getAggregateVariable() 378 for (auto *DVR : at::getDVRAssignmentMarkers(OldAlloca)) in migrateDebugInfo() local 379 BaseFragments[getAggregateVariable(DVR)] = in migrateDebugInfo() 380 DVR->getExpression()->getFragmentInfo(); in migrateDebugInfo() 4979 const Value *getAddress(const DbgVariableRecord *DVR) { in getAddress() argument 4980 assert(DVR->getType() == DbgVariableRecord::LocationType::Declare || in getAddress() 4981 DVR->getType() == DbgVariableRecord::LocationType::Assign); in getAddress() 4982 return DVR->getAddress(); in getAddress() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Coroutines/ |
H A D | CoroFrame.cpp | 1958 for (DbgVariableRecord &DVR : filterDbgVars(U->getDbgRecordRange())) in insertSpills() 1959 DVR.replaceVariableLocationOp(Def, CurrentReload, true); in insertSpills() 2014 for (auto *DVR : DbgVariableRecords) in insertSpills() local 2015 DVR->replaceVariableLocationOp(Alloca, G); in insertSpills() 2994 DbgVariableRecord &DVR, bool OptimizeFrame, bool UseEntryValue) { in salvageDebugInfo() argument 2996 Function *F = DVR.getFunction(); in salvageDebugInfo() 2999 bool SkipOutermostLoad = DVR.isDbgDeclare(); in salvageDebugInfo() 3000 Value *OriginalStorage = DVR.getVariableLocationOp(0); in salvageDebugInfo() 3004 DVR.getExpression(), SkipOutermostLoad); in salvageDebugInfo() 3011 DVR.replaceVariableLocationOp(OriginalStorage, Storage); in salvageDebugInfo() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstructionCombining.cpp | 3297 for (auto *DVR : DVRs) in visitAllocSite() local 3298 if (DVR->isAddressOfVariable()) in visitAllocSite() 3299 ConvertDebugDeclareToDebugValue(DVR, SI, *DIB); in visitAllocSite() 3344 for (auto *DVR : DVRs) in visitAllocSite() local 3345 if (DVR->isAddressOfVariable() || DVR->getExpression()->startsWithDeref()) in visitAllocSite() 3346 DVR->eraseFromParent(); in visitAllocSite() 4884 for (auto &DVR : DbgVariableRecords) in tryToSinkInstructionDbgVariableRecords() local 4885 if (DVR->getParent() != DestBlock) in tryToSinkInstructionDbgVariableRecords() 4886 DbgVariableRecordsToSalvage.push_back(DVR); in tryToSinkInstructionDbgVariableRecords() 4891 for (DbgVariableRecord *DVR : DbgVariableRecordsToSalvage) in tryToSinkInstructionDbgVariableRecords() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ |
H A D | FastISel.cpp | 1221 DbgVariableRecord &DVR = cast<DbgVariableRecord>(DR); in handleDbgInfo() local 1224 if (!DVR.hasArgList()) in handleDbgInfo() 1225 V = DVR.getVariableLocationOp(0); in handleDbgInfo() 1228 if (DVR.getType() == DbgVariableRecord::LocationType::Value || in handleDbgInfo() 1229 DVR.getType() == DbgVariableRecord::LocationType::Assign) { in handleDbgInfo() 1230 Res = lowerDbgValue(V, DVR.getExpression(), DVR.getVariable(), in handleDbgInfo() 1231 DVR.getDebugLoc()); in handleDbgInfo() 1233 assert(DVR.getType() == DbgVariableRecord::LocationType::Declare); in handleDbgInfo() 1234 if (FuncInfo.PreprocessedDVRDeclares.contains(&DVR)) in handleDbgInfo() 1236 Res = lowerDbgDeclare(V, DVR.getExpression(), DVR.getVariable(), in handleDbgInfo() [all …]
|