Lines Matching refs:DPV
616 for (auto *DPV : DPUsers) in replaceDbgUsesWithUndef() local
617 DPV->setKillLocation(); in replaceDbgUsesWithUndef()
1580 for (auto *DPV : DPValues) { in PhiHasDebugValue() local
1581 assert(is_contained(DPV->location_ops(), APN)); in PhiHasDebugValue()
1582 if ((DPV->getVariable() == DIVar) && (DPV->getExpression() == DIExpr)) in PhiHasDebugValue()
1622 static bool valueCoversEntireFragment(Type *ValTy, DPValue *DPV) { in valueCoversEntireFragment() argument
1623 const DataLayout &DL = DPV->getModule()->getDataLayout(); in valueCoversEntireFragment()
1625 if (std::optional<uint64_t> FragmentSize = DPV->getFragmentSizeInBits()) in valueCoversEntireFragment()
1631 if (DPV->isAddressOfVariable()) { in valueCoversEntireFragment()
1633 assert(DPV->getNumVariableLocationOps() == 1 && in valueCoversEntireFragment()
1636 dyn_cast_or_null<AllocaInst>(DPV->getVariableLocationOp(0))) { in valueCoversEntireFragment()
1754 void llvm::ConvertDebugDeclareToDebugValue(DPValue *DPV, StoreInst *SI, in ConvertDebugDeclareToDebugValue() argument
1756 assert(DPV->isAddressOfVariable() || DPV->isDbgAssign()); in ConvertDebugDeclareToDebugValue()
1757 auto *DIVar = DPV->getVariable(); in ConvertDebugDeclareToDebugValue()
1759 auto *DIExpr = DPV->getExpression(); in ConvertDebugDeclareToDebugValue()
1762 DebugLoc NewLoc = getDebugValueLoc(DPV); in ConvertDebugDeclareToDebugValue()
1778 valueCoversEntireFragment(DV->getType(), DPV)); in ConvertDebugDeclareToDebugValue()
1787 LLVM_DEBUG(dbgs() << "Failed to convert dbg.declare to dbg.value: " << *DPV in ConvertDebugDeclareToDebugValue()
1833 void llvm::ConvertDebugDeclareToDebugValue(DPValue *DPV, LoadInst *LI, in ConvertDebugDeclareToDebugValue() argument
1835 auto *DIVar = DPV->getVariable(); in ConvertDebugDeclareToDebugValue()
1836 auto *DIExpr = DPV->getExpression(); in ConvertDebugDeclareToDebugValue()
1839 if (!valueCoversEntireFragment(LI->getType(), DPV)) { in ConvertDebugDeclareToDebugValue()
1843 LLVM_DEBUG(dbgs() << "Failed to convert dbg.declare to DPValue: " << *DPV in ConvertDebugDeclareToDebugValue()
1848 DebugLoc NewLoc = getDebugValueLoc(DPV); in ConvertDebugDeclareToDebugValue()
1872 void llvm::ConvertDebugDeclareToDebugValue(DPValue *DPV, PHINode *APN, in ConvertDebugDeclareToDebugValue() argument
1874 auto *DIVar = DPV->getVariable(); in ConvertDebugDeclareToDebugValue()
1875 auto *DIExpr = DPV->getExpression(); in ConvertDebugDeclareToDebugValue()
1881 if (!valueCoversEntireFragment(APN->getType(), DPV)) { in ConvertDebugDeclareToDebugValue()
1885 LLVM_DEBUG(dbgs() << "Failed to convert dbg.declare to DPValue: " << *DPV in ConvertDebugDeclareToDebugValue()
1893 DebugLoc NewLoc = getDebugValueLoc(DPV); in ConvertDebugDeclareToDebugValue()
1914 for (DPValue &DPV : BI.getDbgValueRange()) { in LowerDbgDeclare()
1915 if (DPV.getType() == DPValue::LocationType::Declare) in LowerDbgDeclare()
1916 DPVs.push_back(&DPV); in LowerDbgDeclare()
1999 for (auto &DPV : I.getDbgValueRange()) { in insertDPValuesForPHIs() local
2000 for (Value *V : DPV.location_ops()) in insertDPValuesForPHIs()
2002 DbgValueMap.insert({Loc, &DPV}); in insertDPValuesForPHIs()
2139 DbgValueInst *DVI, DPValue *DPV, in updateOneDbgValueForAlloca() argument
2158 assert(DPV); in updateOneDbgValueForAlloca()
2159 DPV->setExpression(DIExpr); in updateOneDbgValueForAlloca()
2160 DPV->replaceVariableLocationOp(0u, NewAddress); in updateOneDbgValueForAlloca()
2177 for (DPValue *DPV : DPUsers) in replaceDbgValueForAlloca()
2178 updateOneDbgValueForAlloca(DPV->getDebugLoc(), DPV->getVariable(), in replaceDbgValueForAlloca()
2179 DPV->getExpression(), NewAllocaAddress, nullptr, in replaceDbgValueForAlloca()
2180 DPV, Builder, Offset); in replaceDbgValueForAlloca()
2294 for (auto *DPV : DPUsers) { in salvageDebugInfoForDbgValues() local
2295 if (DPV->isDbgAssign()) { in salvageDebugInfoForDbgValues()
2296 if (DPV->getAddress() == &I) { in salvageDebugInfoForDbgValues()
2297 salvageDbgAssignAddress(DPV); in salvageDebugInfoForDbgValues()
2300 if (DPV->getValue() != &I) in salvageDebugInfoForDbgValues()
2307 bool StackValue = DPV->getType() != DPValue::LocationType::Declare; in salvageDebugInfoForDbgValues()
2308 auto DPVLocation = DPV->location_ops(); in salvageDebugInfoForDbgValues()
2318 DIExpression *SalvagedExpr = DPV->getExpression(); in salvageDebugInfoForDbgValues()
2336 DPV->replaceVariableLocationOp(&I, Op0); in salvageDebugInfoForDbgValues()
2340 DPV->setExpression(SalvagedExpr); in salvageDebugInfoForDbgValues()
2341 } else if (DPV->getType() != DPValue::LocationType::Declare && in salvageDebugInfoForDbgValues()
2343 DPV->getNumVariableLocationOps() + AdditionalValues.size() <= in salvageDebugInfoForDbgValues()
2345 DPV->addVariableLocationOps(AdditionalValues, SalvagedExpr); in salvageDebugInfoForDbgValues()
2351 DPV->setKillLocation(); in salvageDebugInfoForDbgValues()
2353 LLVM_DEBUG(dbgs() << "SALVAGE: " << DPV << '\n'); in salvageDebugInfoForDbgValues()
2363 for (auto *DPV : DPUsers) in salvageDebugInfoForDbgValues() local
2364 DPV->setKillLocation(); in salvageDebugInfoForDbgValues()
2580 function_ref<DbgValReplacement(DPValue &DPV)> RewriteDPVExpr) { in rewriteDebugUsers()
2612 for (auto *DPV : DPUsers) { in rewriteDebugUsers() local
2613 Instruction *MarkedInstr = DPV->getMarker()->MarkedInstr; in rewriteDebugUsers()
2620 LLVM_DEBUG(dbgs() << "MOVE: " << *DPV << '\n'); in rewriteDebugUsers()
2621 DPV->removeFromParent(); in rewriteDebugUsers()
2623 DomPoint.getParent()->insertDPValueAfter(DPV, &DomPoint); in rewriteDebugUsers()
2626 UndefOrSalvageDPV.insert(DPV); in rewriteDebugUsers()
2645 for (auto *DPV : DPUsers) { in rewriteDebugUsers() local
2646 if (UndefOrSalvageDPV.count(DPV)) in rewriteDebugUsers()
2649 DbgValReplacement DVR = RewriteDPVExpr(*DPV); in rewriteDebugUsers()
2653 DPV->replaceVariableLocationOp(&From, &To); in rewriteDebugUsers()
2654 DPV->setExpression(*DVR); in rewriteDebugUsers()
2655 LLVM_DEBUG(dbgs() << "REWRITE: " << DPV << '\n'); in rewriteDebugUsers()
2707 auto IdentityDPV = [&](DPValue &DPV) -> DbgValReplacement { in replaceAllDbgUsesWith() argument
2708 return DPV.getExpression(); in replaceAllDbgUsesWith()
2745 auto SignOrZeroExtDPV = [&](DPValue &DPV) -> DbgValReplacement { in replaceAllDbgUsesWith() argument
2746 DILocalVariable *Var = DPV.getVariable(); in replaceAllDbgUsesWith()
2754 return DIExpression::appendExt(DPV.getExpression(), ToBits, FromBits, in replaceAllDbgUsesWith()
3533 for (auto *DPV : DPUsers) in dropDebugUsers() local
3534 DPV->eraseFromParent(); in dropDebugUsers()