Lines Matching refs:Var
138 void addSingleLocVar(DebugVariable Var, DIExpression *Expr, DebugLoc DL, in addSingleLocVar() argument
141 VarLoc.VariableID = insertVariable(Var); in addSingleLocVar()
149 void addVarLoc(VarLocInsertPt Before, DebugVariable Var, DIExpression *Expr, in addVarLoc() argument
152 VarLoc.VariableID = insertVariable(Var); in addVarLoc()
330 static DebugAggregate getAggregate(const DebugVariable &Var) { in getAggregate() argument
331 return DebugAggregate(Var.getVariable(), Var.getInlinedAt()); in getAggregate()
396 unsigned Var; member
622 void insertMemLoc(BasicBlock &BB, VarLocInsertPt Before, unsigned Var, in insertMemLoc() argument
629 Loc.Var = Var; in insertMemLoc()
636 LLVM_DEBUG(dbgs() << "Add mem def for " << Aggregates[Var].first->getName() in insertMemLoc()
644 void coalesceFragments(BasicBlock &BB, VarLocInsertPt Before, unsigned Var, in coalesceFragments() argument
661 insertMemLoc(BB, Before, Var, CoalescedFrag.start(), CoalescedFrag.stop(), in coalesceFragments()
675 unsigned Var = Aggregates.insert( in addDef() local
711 auto FragIt = LiveSet.find(Var); in addDef()
716 auto P = LiveSet.try_emplace(Var, FragsInMemMap(IntervalMapAlloc)); in addDef()
730 coalesceFragments(BB, Before, Var, StartBit, EndBit, Base, VarLoc.DL, in addDef()
760 insertMemLoc(BB, Before, Var, FirstOverlap.start(), StartBit, in addDef()
765 insertMemLoc(BB, Before, Var, EndBit, EndBitOfOverlap, OverlapValue, in addDef()
783 insertMemLoc(BB, Before, Var, FirstOverlap.start(), StartBit, in addDef()
794 insertMemLoc(BB, Before, Var, EndBit, LastOverlap.stop(), *LastOverlap, in addDef()
823 coalesceFragments(BB, Before, Var, StartBit, EndBit, Base, VarLoc.DL, in addDef()
970 *Aggregates[FragMemLoc.Var].first->getSizeInBits()) in run()
975 DebugVariable Var(Aggregates[FragMemLoc.Var].first, Expr, in run() local
977 FnVarLocs->addVarLoc(InsertBefore, Var, Expr, FragMemLoc.DL, in run()
1179 bool isVariableTracked(VariableID Var) const { in isVariableTracked()
1180 return VariableIDsInBlock[static_cast<unsigned>(Var)]; in isVariableTracked()
1183 const Assignment &getAssignment(AssignmentKind Kind, VariableID Var) const { in getAssignment()
1184 assert(isVariableTracked(Var) && "Var not tracked in block"); in getAssignment()
1185 return getAssignmentMap(Kind)[static_cast<unsigned>(Var)]; in getAssignment()
1188 LocKind getLocKind(VariableID Var) const { in getLocKind()
1189 assert(isVariableTracked(Var) && "Var not tracked in block"); in getLocKind()
1190 return LiveLoc[static_cast<unsigned>(Var)]; in getLocKind()
1195 void setLocKind(VariableID Var, LocKind K) { in setLocKind()
1196 VariableIDsInBlock.set(static_cast<unsigned>(Var)); in setLocKind()
1197 LiveLoc[static_cast<unsigned>(Var)] = K; in setLocKind()
1203 void setAssignment(AssignmentKind Kind, VariableID Var, in setAssignment()
1205 VariableIDsInBlock.set(static_cast<unsigned>(Var)); in setAssignment()
1206 getAssignmentMap(Kind)[static_cast<unsigned>(Var)] = AV; in setAssignment()
1212 bool hasAssignment(AssignmentKind Kind, VariableID Var, in hasAssignment()
1214 if (!isVariableTracked(Var)) in hasAssignment()
1216 return AV.isSameSourceAssignment(getAssignment(Kind, Var)); in hasAssignment()
1307 VariableID getVariableID(const DebugVariable &Var) { in getVariableID() argument
1308 return static_cast<VariableID>(FnVarLocs->insertVariable(Var)); in getVariableID()
1361 void addMemDef(BlockInfo *LiveSet, VariableID Var, const Assignment &AV);
1363 void addDbgDef(BlockInfo *LiveSet, VariableID Var, const Assignment &AV);
1367 void setLocKind(BlockInfo *LiveSet, VariableID Var, LocKind K);
1370 LocKind getLocKind(BlockInfo *LiveSet, VariableID Var);
1373 VariableID Var, const Assignment &AV);
1376 ArrayRef<VariableID> getContainedFragments(VariableID Var) const;
1380 void touchFragment(VariableID Var);
1396 AssignmentTrackingLowering::getContainedFragments(VariableID Var) const { in getContainedFragments()
1397 auto R = VarContains.find(Var); in getContainedFragments()
1403 void AssignmentTrackingLowering::touchFragment(VariableID Var) { in touchFragment() argument
1404 VarsTouchedThisFrame.insert(Var); in touchFragment()
1407 void AssignmentTrackingLowering::setLocKind(BlockInfo *LiveSet, VariableID Var, in setLocKind() argument
1409 auto SetKind = [this](BlockInfo *LiveSet, VariableID Var, LocKind K) { in setLocKind() argument
1410 LiveSet->setLocKind(Var, K); in setLocKind()
1411 touchFragment(Var); in setLocKind()
1413 SetKind(LiveSet, Var, K); in setLocKind()
1416 for (VariableID Frag : getContainedFragments(Var)) in setLocKind()
1421 AssignmentTrackingLowering::getLocKind(BlockInfo *LiveSet, VariableID Var) { in getLocKind() argument
1422 return LiveSet->getLocKind(Var); in getLocKind()
1425 void AssignmentTrackingLowering::addMemDef(BlockInfo *LiveSet, VariableID Var, in addMemDef() argument
1427 LiveSet->setAssignment(BlockInfo::Stack, Var, AV); in addMemDef()
1434 for (VariableID Frag : getContainedFragments(Var)) in addMemDef()
1438 void AssignmentTrackingLowering::addDbgDef(BlockInfo *LiveSet, VariableID Var, in addDbgDef() argument
1440 LiveSet->setAssignment(BlockInfo::Debug, Var, AV); in addDbgDef()
1447 for (VariableID Frag : getContainedFragments(Var)) in addDbgDef()
1467 BlockInfo *LiveSet, BlockInfo::AssignmentKind Kind, VariableID Var, in hasVarWithAssignment() argument
1469 if (!LiveSet->hasAssignment(Kind, Var, AV)) in hasVarWithAssignment()
1474 for (VariableID Frag : getContainedFragments(Var)) in hasVarWithAssignment()
1547 VariableID Var = getVariableID(DebugVariable(Source)); in emitDbgValue() local
1549 VarLoc.VariableID = static_cast<VariableID>(Var); in emitDbgValue()
1626 for (auto [Var, Info] : It->second) { in processUntaggedInstruction()
1630 addMemDef(LiveSet, Var, Assignment::makeNoneOrPhi()); in processUntaggedInstruction()
1631 addDbgDef(LiveSet, Var, Assignment::makeNoneOrPhi()); in processUntaggedInstruction()
1632 setLocKind(LiveSet, Var, LocKind::Mem); in processUntaggedInstruction()
1638 DebugVariable V = FnVarLocs->getVariable(Var); in processUntaggedInstruction()
1663 VarLoc.VariableID = static_cast<VariableID>(Var); in processUntaggedInstruction()
1686 VariableID Var = getVariableID(DebugVariable(Assign)); in processTaggedInstruction() local
1693 addMemDef(LiveSet, Var, AV); in processTaggedInstruction()
1696 LLVM_DEBUG(dbgs() << " LiveLoc " << locStr(getLocKind(LiveSet, Var)) in processTaggedInstruction()
1701 if (hasVarWithAssignment(LiveSet, BlockInfo::Debug, Var, AV)) { in processTaggedInstruction()
1707 LiveSet->DebugValue[static_cast<unsigned>(Var)].dump(dbgs()); in processTaggedInstruction()
1709 setLocKind(LiveSet, Var, LocKind::Mem); in processTaggedInstruction()
1719 LocKind PrevLoc = getLocKind(LiveSet, Var); in processTaggedInstruction()
1725 setLocKind(LiveSet, Var, LocKind::Val); in processTaggedInstruction()
1731 Assignment DbgAV = LiveSet->getAssignment(BlockInfo::Debug, Var); in processTaggedInstruction()
1735 setLocKind(LiveSet, Var, LocKind::None); in processTaggedInstruction()
1740 setLocKind(LiveSet, Var, LocKind::Val); in processTaggedInstruction()
1753 setLocKind(LiveSet, Var, LocKind::None); in processTaggedInstruction()
1771 VariableID Var = getVariableID(DebugVariable(DbgAssign)); in processDbgAssign() local
1773 addDbgDef(LiveSet, Var, AV); in processDbgAssign()
1776 LLVM_DEBUG(dbgs() << " LiveLoc " << locStr(getLocKind(LiveSet, Var)) in processDbgAssign()
1781 if (hasVarWithAssignment(LiveSet, BlockInfo::Stack, Var, AV)) { in processDbgAssign()
1795 setLocKind(LiveSet, Var, Kind); in processDbgAssign()
1801 setLocKind(LiveSet, Var, LocKind::Val); in processDbgAssign()
1819 VariableID Var = getVariableID(DebugVariable(DbgValue)); in processDbgValue() local
1827 addDbgDef(LiveSet, Var, AV); in processDbgValue()
1830 LLVM_DEBUG(dbgs() << " LiveLoc " << locStr(getLocKind(LiveSet, Var)) in processDbgValue()
1833 setLocKind(LiveSet, Var, LocKind::Val); in processDbgValue()
1941 for (auto Var : VarsTouchedThisFrame) { in process() local
1942 LocKind Loc = getLocKind(LiveSet, Var); in process()
1951 DebugVariable DbgVar = FnVarLocs->getVariable(Var); in process()
2386 DebugVariable Var = FnVarLocs->getVariable(VarLoc.VariableID); in run() local
2387 DebugAggregate Aggr{Var.getVariable(), Var.getInlinedAt()}; in run()
2416 DebugVariable Var = FnVarLocs->getVariable(VarLoc.VariableID); in run() local
2417 FnVarLocs->addSingleLocVar(Var, VarLoc.Expr, VarLoc.DL, VarLoc.Values); in run()
2427 DebugVariable Var = FnVarLocs->getVariable(VarLoc.VariableID); in run() local
2428 DebugAggregate Aggr{Var.getVariable(), Var.getInlinedAt()}; in run()
2696 DebugVariable Var = FnVarLocs.getVariable(Loc.VariableID); in removeUndefDbgLocsFromEntryBlock() local
2700 if (Loc.Values.isKillLocation(Loc.Expr) && !HasDefinedBits(Aggr, Var)) { in removeUndefDbgLocsFromEntryBlock()
2707 DefineBits(Aggr, Var); in removeUndefDbgLocsFromEntryBlock()