Lines Matching defs:DVR

629   for (auto *DVR : DPUsers)
630 DVR->setKillLocation();
1625 for (auto *DVR : DbgVariableRecords) {
1626 assert(is_contained(DVR->location_ops(), APN));
1627 if ((DVR->getVariable() == DIVar) && (DVR->getExpression() == DIExpr))
1668 static bool valueCoversEntireFragment(Type *ValTy, DbgVariableRecord *DVR) {
1669 const DataLayout &DL = DVR->getModule()->getDataLayout();
1672 DVR->getExpression()->getActiveBits(DVR->getVariable()))
1678 if (DVR->isAddressOfVariable()) {
1679 // DVR should have exactly 1 location when it is an address.
1680 assert(DVR->getNumVariableLocationOps() == 1 &&
1683 dyn_cast_or_null<AllocaInst>(DVR->getVariableLocationOp(0))) {
1821 void llvm::ConvertDebugDeclareToDebugValue(DbgVariableRecord *DVR,
1823 assert(DVR->isAddressOfVariable() || DVR->isDbgAssign());
1824 auto *DIVar = DVR->getVariable();
1826 auto *DIExpr = DVR->getExpression();
1829 DebugLoc NewLoc = getDebugValueLoc(DVR);
1845 valueCoversEntireFragment(DV->getType(), DVR));
1854 LLVM_DEBUG(dbgs() << "Failed to convert dbg.declare to dbg.value: " << *DVR
1868 void llvm::InsertDebugValueAtStoreLoc(DbgVariableRecord *DVR, StoreInst *SI,
1870 auto *DIVar = DVR->getVariable();
1872 auto *DIExpr = DVR->getExpression();
1876 DebugLoc NewLoc = getDebugValueLoc(DVR);
1916 void llvm::ConvertDebugDeclareToDebugValue(DbgVariableRecord *DVR, LoadInst *LI,
1918 auto *DIVar = DVR->getVariable();
1919 auto *DIExpr = DVR->getExpression();
1922 if (!valueCoversEntireFragment(LI->getType(), DVR)) {
1927 << *DVR << '\n');
1931 DebugLoc NewLoc = getDebugValueLoc(DVR);
1956 void llvm::ConvertDebugDeclareToDebugValue(DbgVariableRecord *DVR, PHINode *APN,
1958 auto *DIVar = DVR->getVariable();
1959 auto *DIExpr = DVR->getExpression();
1965 if (!valueCoversEntireFragment(APN->getType(), DVR)) {
1970 << *DVR << '\n');
1977 DebugLoc NewLoc = getDebugValueLoc(DVR);
1999 for (DbgVariableRecord &DVR : filterDbgVars(BI.getDbgRecordRange())) {
2000 if (DVR.getType() == DbgVariableRecord::LocationType::Declare)
2001 DVRs.push_back(&DVR);
2087 for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange())) {
2088 for (Value *V : DVR.location_ops())
2090 DbgValueMap.insert({Loc, &DVR});
2228 DbgVariableRecord *DVR,
2247 assert(DVR);
2248 DVR->setExpression(DIExpr);
2249 DVR->replaceVariableLocationOp(0u, NewAddress);
2266 for (DbgVariableRecord *DVR : DPUsers)
2267 updateOneDbgValueForAlloca(DVR->getDebugLoc(), DVR->getVariable(),
2268 DVR->getExpression(), NewAllocaAddress, nullptr,
2269 DVR, Builder, Offset);
2386 for (auto *DVR : DPUsers) {
2387 if (DVR->isDbgAssign()) {
2388 if (DVR->getAddress() == &I) {
2389 salvageDbgAssignAddress(DVR);
2392 if (DVR->getValue() != &I)
2400 DVR->getType() != DbgVariableRecord::LocationType::Declare;
2401 auto DVRLocation = DVR->location_ops();
2406 // 'I' may appear more than once in DVR's location ops, and each use of 'I'
2411 DIExpression *SalvagedExpr = DVR->getExpression();
2430 DVR->replaceVariableLocationOp(&I, Op0);
2434 DVR->setExpression(SalvagedExpr);
2435 } else if (DVR->getType() != DbgVariableRecord::LocationType::Declare &&
2437 DVR->getNumVariableLocationOps() + AdditionalValues.size() <=
2439 DVR->addVariableLocationOps(AdditionalValues, SalvagedExpr);
2445 DVR->setKillLocation();
2447 LLVM_DEBUG(dbgs() << "SALVAGE: " << DVR << '\n');
2457 for (auto *DVR : DPUsers)
2458 DVR->setKillLocation();
2674 function_ref<DbgValReplacement(DbgVariableRecord &DVR)> RewriteDVRExpr) {
2706 for (auto *DVR : DPUsers) {
2707 Instruction *MarkedInstr = DVR->getMarker()->MarkedInstr;
2714 LLVM_DEBUG(dbgs() << "MOVE: " << *DVR << '\n');
2715 DVR->removeFromParent();
2717 DomPoint.getParent()->insertDbgRecordAfter(DVR, &DomPoint);
2720 UndefOrSalvageDVR.insert(DVR);
2739 for (auto *DVR : DPUsers) {
2740 if (UndefOrSalvageDVR.count(DVR))
2743 DbgValReplacement DVRepl = RewriteDVRExpr(*DVR);
2747 DVR->replaceVariableLocationOp(&From, &To);
2748 DVR->setExpression(*DVRepl);
2749 LLVM_DEBUG(dbgs() << "REWRITE: " << DVR << '\n');
2801 auto IdentityDVR = [&](DbgVariableRecord &DVR) -> DbgValReplacement {
2802 return DVR.getExpression();
2839 auto SignOrZeroExtDVR = [&](DbgVariableRecord &DVR) -> DbgValReplacement {
2840 DILocalVariable *Var = DVR.getVariable();
2848 return DIExpression::appendExt(DVR.getExpression(), ToBits, FromBits,
3702 for (auto *DVR : DPUsers)
3703 DVR->eraseFromParent();
3804 for (DbgVariableRecord &DVR : filterDbgVars(Inst->getDbgRecordRange())) {
3805 RemapDebugOperands(&DVR, DVR.location_ops());
3806 if (DVR.isDbgAssign())
3807 RemapAssignAddress(&DVR);