Lines Matching refs:DII

556   for (auto *DII : DbgUsers) {  in replaceDbgUsesWithUndef()  local
558 DII->setOperand(0, MetadataAsValue::get(DII->getContext(), in replaceDbgUsesWithUndef()
1369 static bool valueCoversEntireFragment(Type *ValTy, DbgVariableIntrinsic *DII) { in valueCoversEntireFragment() argument
1370 const DataLayout &DL = DII->getModule()->getDataLayout(); in valueCoversEntireFragment()
1372 if (auto FragmentSize = DII->getFragmentSizeInBits()) in valueCoversEntireFragment()
1377 if (DII->isAddressOfVariable()) in valueCoversEntireFragment()
1378 if (auto *AI = dyn_cast_or_null<AllocaInst>(DII->getVariableLocation())) in valueCoversEntireFragment()
1389 static DebugLoc getDebugValueLoc(DbgVariableIntrinsic *DII, Instruction *Src) { in getDebugValueLoc() argument
1391 DebugLoc DeclareLoc = DII->getDebugLoc(); in getDebugValueLoc()
1400 void llvm::ConvertDebugDeclareToDebugValue(DbgVariableIntrinsic *DII, in ConvertDebugDeclareToDebugValue() argument
1402 assert(DII->isAddressOfVariable()); in ConvertDebugDeclareToDebugValue()
1403 auto *DIVar = DII->getVariable(); in ConvertDebugDeclareToDebugValue()
1405 auto *DIExpr = DII->getExpression(); in ConvertDebugDeclareToDebugValue()
1408 DebugLoc NewLoc = getDebugValueLoc(DII, SI); in ConvertDebugDeclareToDebugValue()
1410 if (!valueCoversEntireFragment(DV->getType(), DII)) { in ConvertDebugDeclareToDebugValue()
1414 << *DII << '\n'); in ConvertDebugDeclareToDebugValue()
1428 void llvm::ConvertDebugDeclareToDebugValue(DbgVariableIntrinsic *DII, in ConvertDebugDeclareToDebugValue() argument
1430 auto *DIVar = DII->getVariable(); in ConvertDebugDeclareToDebugValue()
1431 auto *DIExpr = DII->getExpression(); in ConvertDebugDeclareToDebugValue()
1434 if (!valueCoversEntireFragment(LI->getType(), DII)) { in ConvertDebugDeclareToDebugValue()
1439 << *DII << '\n'); in ConvertDebugDeclareToDebugValue()
1443 DebugLoc NewLoc = getDebugValueLoc(DII, nullptr); in ConvertDebugDeclareToDebugValue()
1456 void llvm::ConvertDebugDeclareToDebugValue(DbgVariableIntrinsic *DII, in ConvertDebugDeclareToDebugValue() argument
1458 auto *DIVar = DII->getVariable(); in ConvertDebugDeclareToDebugValue()
1459 auto *DIExpr = DII->getExpression(); in ConvertDebugDeclareToDebugValue()
1465 if (!valueCoversEntireFragment(APN->getType(), DII)) { in ConvertDebugDeclareToDebugValue()
1470 << *DII << '\n'); in ConvertDebugDeclareToDebugValue()
1477 DebugLoc NewLoc = getDebugValueLoc(DII, nullptr); in ConvertDebugDeclareToDebugValue()
1631 if (auto *DII = dyn_cast<DbgVariableIntrinsic>(U)) in FindDbgAddrUses() local
1632 if (DII->isAddressOfVariable()) in FindDbgAddrUses()
1633 Declares.push_back(DII); in FindDbgAddrUses()
1668 if (DbgVariableIntrinsic *DII = dyn_cast<DbgVariableIntrinsic>(U)) in findDbgUsers() local
1669 DbgUsers.push_back(DII); in findDbgUsers()
1676 for (DbgVariableIntrinsic *DII : DbgAddrs) { in replaceDbgDeclare()
1677 DebugLoc Loc = DII->getDebugLoc(); in replaceDbgDeclare()
1678 auto *DIVar = DII->getVariable(); in replaceDbgDeclare()
1679 auto *DIExpr = DII->getExpression(); in replaceDbgDeclare()
1684 Builder.insertDeclare(NewAddress, DIVar, DIExpr, Loc, DII); in replaceDbgDeclare()
1685 DII->eraseFromParent(); in replaceDbgDeclare()
1743 for (auto *DII : DbgUsers) { in salvageDebugInfoForDbgValues() local
1747 bool StackValue = isa<DbgValueInst>(DII); in salvageDebugInfoForDbgValues()
1750 salvageDebugInfoImpl(I, DII->getExpression(), StackValue); in salvageDebugInfoForDbgValues()
1757 DII->setOperand(0, wrapMD(I.getOperand(0))); in salvageDebugInfoForDbgValues()
1758 DII->setOperand(2, MetadataAsValue::get(Ctx, DIExpr)); in salvageDebugInfoForDbgValues()
1759 LLVM_DEBUG(dbgs() << "SALVAGE: " << *DII << '\n'); in salvageDebugInfoForDbgValues()
1766 for (auto *DII : DbgUsers) { in salvageDebugInfoForDbgValues() local
1768 DII->setOperand(0, MetadataAsValue::get(DII->getContext(), in salvageDebugInfoForDbgValues()
1879 function_ref<DbgValReplacement(DbgVariableIntrinsic &DII)> RewriteExpr) { in rewriteDebugUsers()
1892 for (auto *DII : Users) { in rewriteDebugUsers() local
1895 if (DomPointAfterFrom && DII->getNextNonDebugInstruction() == &DomPoint) { in rewriteDebugUsers()
1896 LLVM_DEBUG(dbgs() << "MOVE: " << *DII << '\n'); in rewriteDebugUsers()
1897 DII->moveAfter(&DomPoint); in rewriteDebugUsers()
1902 } else if (!DT.dominates(&DomPoint, DII)) { in rewriteDebugUsers()
1903 UndefOrSalvage.insert(DII); in rewriteDebugUsers()
1909 for (auto *DII : Users) { in rewriteDebugUsers() local
1910 if (UndefOrSalvage.count(DII)) in rewriteDebugUsers()
1913 LLVMContext &Ctx = DII->getContext(); in rewriteDebugUsers()
1914 DbgValReplacement DVR = RewriteExpr(*DII); in rewriteDebugUsers()
1918 DII->setOperand(0, wrapValueInMetadata(Ctx, &To)); in rewriteDebugUsers()
1919 DII->setOperand(2, MetadataAsValue::get(Ctx, *DVR)); in rewriteDebugUsers()
1920 LLVM_DEBUG(dbgs() << "REWRITE: " << *DII << '\n'); in rewriteDebugUsers()
1969 auto Identity = [&](DbgVariableIntrinsic &DII) -> DbgValReplacement { in replaceAllDbgUsesWith() argument
1970 return DII.getExpression(); in replaceAllDbgUsesWith()
1993 auto SignOrZeroExt = [&](DbgVariableIntrinsic &DII) -> DbgValReplacement { in replaceAllDbgUsesWith() argument
1994 DILocalVariable *Var = DII.getVariable(); in replaceAllDbgUsesWith()
2002 return DIExpression::appendExt(DII.getExpression(), ToBits, FromBits, in replaceAllDbgUsesWith()
2741 for (auto *DII : DbgUsers) in dropDebugUsers() local
2742 DII->eraseFromParent(); in dropDebugUsers()