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()
332 static DebugAggregate getAggregate(const DebugVariable &Var) { in getAggregate() argument
333 return DebugAggregate(Var.getVariable(), Var.getInlinedAt()); in getAggregate()
398 unsigned Var; member
623 void insertMemLoc(BasicBlock &BB, VarLocInsertPt Before, unsigned Var, in insertMemLoc() argument
630 Loc.Var = Var; in insertMemLoc()
637 LLVM_DEBUG(dbgs() << "Add mem def for " << Aggregates[Var].first->getName() in insertMemLoc()
645 void coalesceFragments(BasicBlock &BB, VarLocInsertPt Before, unsigned Var, in coalesceFragments() argument
662 insertMemLoc(BB, Before, Var, CoalescedFrag.start(), CoalescedFrag.stop(), in coalesceFragments()
676 unsigned Var = Aggregates.insert( in addDef() local
712 auto FragIt = LiveSet.find(Var); in addDef()
717 auto P = LiveSet.try_emplace(Var, FragsInMemMap(IntervalMapAlloc)); in addDef()
731 coalesceFragments(BB, Before, Var, StartBit, EndBit, Base, VarLoc.DL, in addDef()
761 insertMemLoc(BB, Before, Var, FirstOverlap.start(), StartBit, in addDef()
766 insertMemLoc(BB, Before, Var, EndBit, EndBitOfOverlap, OverlapValue, in addDef()
784 insertMemLoc(BB, Before, Var, FirstOverlap.start(), StartBit, in addDef()
795 insertMemLoc(BB, Before, Var, EndBit, LastOverlap.stop(), *LastOverlap, in addDef()
824 coalesceFragments(BB, Before, Var, StartBit, EndBit, Base, VarLoc.DL, in addDef()
971 *Aggregates[FragMemLoc.Var].first->getSizeInBits()) in run()
976 DebugVariable Var(Aggregates[FragMemLoc.Var].first, Expr, in run() local
978 FnVarLocs->addVarLoc(InsertBefore, Var, Expr, FragMemLoc.DL, in run()
1180 bool isVariableTracked(VariableID Var) const { in isVariableTracked()
1181 return VariableIDsInBlock[static_cast<unsigned>(Var)]; in isVariableTracked()
1184 const Assignment &getAssignment(AssignmentKind Kind, VariableID Var) const { in getAssignment()
1185 assert(isVariableTracked(Var) && "Var not tracked in block"); in getAssignment()
1186 return getAssignmentMap(Kind)[static_cast<unsigned>(Var)]; in getAssignment()
1189 LocKind getLocKind(VariableID Var) const { in getLocKind()
1190 assert(isVariableTracked(Var) && "Var not tracked in block"); in getLocKind()
1191 return LiveLoc[static_cast<unsigned>(Var)]; in getLocKind()
1196 void setLocKind(VariableID Var, LocKind K) { in setLocKind()
1197 VariableIDsInBlock.set(static_cast<unsigned>(Var)); in setLocKind()
1198 LiveLoc[static_cast<unsigned>(Var)] = K; in setLocKind()
1204 void setAssignment(AssignmentKind Kind, VariableID Var, in setAssignment()
1206 VariableIDsInBlock.set(static_cast<unsigned>(Var)); in setAssignment()
1207 getAssignmentMap(Kind)[static_cast<unsigned>(Var)] = AV; in setAssignment()
1213 bool hasAssignment(AssignmentKind Kind, VariableID Var, in hasAssignment()
1215 if (!isVariableTracked(Var)) in hasAssignment()
1217 return AV.isSameSourceAssignment(getAssignment(Kind, Var)); in hasAssignment()
1308 VariableID getVariableID(const DebugVariable &Var) { in getVariableID() argument
1309 return static_cast<VariableID>(FnVarLocs->insertVariable(Var)); in getVariableID()
1363 void addMemDef(BlockInfo *LiveSet, VariableID Var, const Assignment &AV);
1365 void addDbgDef(BlockInfo *LiveSet, VariableID Var, const Assignment &AV);
1369 void setLocKind(BlockInfo *LiveSet, VariableID Var, LocKind K);
1372 LocKind getLocKind(BlockInfo *LiveSet, VariableID Var);
1375 VariableID Var, const Assignment &AV);
1378 ArrayRef<VariableID> getContainedFragments(VariableID Var) const;
1382 void touchFragment(VariableID Var);
1398 AssignmentTrackingLowering::getContainedFragments(VariableID Var) const { in getContainedFragments()
1399 auto R = VarContains.find(Var); in getContainedFragments()
1405 void AssignmentTrackingLowering::touchFragment(VariableID Var) { in touchFragment() argument
1406 VarsTouchedThisFrame.insert(Var); in touchFragment()
1409 void AssignmentTrackingLowering::setLocKind(BlockInfo *LiveSet, VariableID Var, in setLocKind() argument
1411 auto SetKind = [this](BlockInfo *LiveSet, VariableID Var, LocKind K) { in setLocKind() argument
1412 LiveSet->setLocKind(Var, K); in setLocKind()
1413 touchFragment(Var); in setLocKind()
1415 SetKind(LiveSet, Var, K); in setLocKind()
1418 for (VariableID Frag : getContainedFragments(Var)) in setLocKind()
1423 AssignmentTrackingLowering::getLocKind(BlockInfo *LiveSet, VariableID Var) { in getLocKind() argument
1424 return LiveSet->getLocKind(Var); in getLocKind()
1427 void AssignmentTrackingLowering::addMemDef(BlockInfo *LiveSet, VariableID Var, in addMemDef() argument
1429 LiveSet->setAssignment(BlockInfo::Stack, Var, AV); in addMemDef()
1436 for (VariableID Frag : getContainedFragments(Var)) in addMemDef()
1440 void AssignmentTrackingLowering::addDbgDef(BlockInfo *LiveSet, VariableID Var, in addDbgDef() argument
1442 LiveSet->setAssignment(BlockInfo::Debug, Var, AV); in addDbgDef()
1449 for (VariableID Frag : getContainedFragments(Var)) in addDbgDef()
1469 BlockInfo *LiveSet, BlockInfo::AssignmentKind Kind, VariableID Var, in hasVarWithAssignment() argument
1471 if (!LiveSet->hasAssignment(Kind, Var, AV)) in hasVarWithAssignment()
1476 for (VariableID Frag : getContainedFragments(Var)) in hasVarWithAssignment()
1549 VariableID Var = getVariableID(DebugVariable(Source)); in emitDbgValue() local
1551 VarLoc.VariableID = static_cast<VariableID>(Var); in emitDbgValue()
1628 for (auto [Var, Info] : It->second) { in processUntaggedInstruction()
1632 addMemDef(LiveSet, Var, Assignment::makeNoneOrPhi()); in processUntaggedInstruction()
1633 addDbgDef(LiveSet, Var, Assignment::makeNoneOrPhi()); in processUntaggedInstruction()
1634 setLocKind(LiveSet, Var, LocKind::Mem); in processUntaggedInstruction()
1640 DebugVariable V = FnVarLocs->getVariable(Var); in processUntaggedInstruction()
1665 VarLoc.VariableID = static_cast<VariableID>(Var); in processUntaggedInstruction()
1688 VariableID Var = getVariableID(DebugVariable(Assign)); in processTaggedInstruction() local
1695 addMemDef(LiveSet, Var, AV); in processTaggedInstruction()
1698 LLVM_DEBUG(dbgs() << " LiveLoc " << locStr(getLocKind(LiveSet, Var)) in processTaggedInstruction()
1703 if (hasVarWithAssignment(LiveSet, BlockInfo::Debug, Var, AV)) { in processTaggedInstruction()
1709 LiveSet->DebugValue[static_cast<unsigned>(Var)].dump(dbgs()); in processTaggedInstruction()
1711 setLocKind(LiveSet, Var, LocKind::Mem); in processTaggedInstruction()
1721 LocKind PrevLoc = getLocKind(LiveSet, Var); in processTaggedInstruction()
1727 setLocKind(LiveSet, Var, LocKind::Val); in processTaggedInstruction()
1733 Assignment DbgAV = LiveSet->getAssignment(BlockInfo::Debug, Var); in processTaggedInstruction()
1737 setLocKind(LiveSet, Var, LocKind::None); in processTaggedInstruction()
1742 setLocKind(LiveSet, Var, LocKind::Val); in processTaggedInstruction()
1755 setLocKind(LiveSet, Var, LocKind::None); in processTaggedInstruction()
1773 VariableID Var = getVariableID(DebugVariable(DbgAssign)); in processDbgAssign() local
1775 addDbgDef(LiveSet, Var, AV); in processDbgAssign()
1778 LLVM_DEBUG(dbgs() << " LiveLoc " << locStr(getLocKind(LiveSet, Var)) in processDbgAssign()
1783 if (hasVarWithAssignment(LiveSet, BlockInfo::Stack, Var, AV)) { in processDbgAssign()
1797 setLocKind(LiveSet, Var, Kind); in processDbgAssign()
1803 setLocKind(LiveSet, Var, LocKind::Val); in processDbgAssign()
1821 VariableID Var = getVariableID(DebugVariable(DbgValue)); in processDbgValue() local
1829 addDbgDef(LiveSet, Var, AV); in processDbgValue()
1832 LLVM_DEBUG(dbgs() << " LiveLoc " << locStr(getLocKind(LiveSet, Var)) in processDbgValue()
1835 setLocKind(LiveSet, Var, LocKind::Val); in processDbgValue()
1946 for (auto Var : VarsTouchedThisFrame) { in process() local
1947 LocKind Loc = getLocKind(LiveSet, Var); in process()
1956 DebugVariable DbgVar = FnVarLocs->getVariable(Var); in process()
2393 DebugVariable Var = FnVarLocs->getVariable(VarLoc.VariableID); in run() local
2394 DebugAggregate Aggr{Var.getVariable(), Var.getInlinedAt()}; in run()
2423 DebugVariable Var = FnVarLocs->getVariable(VarLoc.VariableID); in run() local
2424 FnVarLocs->addSingleLocVar(Var, VarLoc.Expr, VarLoc.DL, VarLoc.Values); in run()
2434 DebugVariable Var = FnVarLocs->getVariable(VarLoc.VariableID); in run() local
2435 DebugAggregate Aggr{Var.getVariable(), Var.getInlinedAt()}; in run()
2703 DebugVariable Var = FnVarLocs.getVariable(Loc.VariableID); in removeUndefDbgLocsFromEntryBlock() local
2707 if (Loc.Values.isKillLocation(Loc.Expr) && !HasDefinedBits(Aggr, Var)) { in removeUndefDbgLocsFromEntryBlock()
2714 DefineBits(Aggr, Var); in removeUndefDbgLocsFromEntryBlock()