Lines Matching full:assignment

987 /// that interprets assignment tracking debug info metadata and stores in IR to
1016 /// An abstraction of the assignment of a value to a variable or memory
1019 /// An Assignment is Known or NoneOrPhi. A Known Assignment means we have a
1021 /// can't) know the ID of the last assignment that took place.
1023 /// The Status of the Assignment (Known or NoneOrPhi) is another
1031 struct Assignment {
1033 /// ID of the assignment. nullptr if Status is not Known.
1039 bool isSameSourceAssignment(const Assignment &Other) const {
1061 static Assignment make(DIAssignID *ID, DbgAssignIntrinsic *Source) {
1062 return Assignment(Known, ID, Source);
1064 static Assignment make(DIAssignID *ID, DbgVariableRecord *Source) {
1066 "Cannot make an assignment from a non-assign DbgVariableRecord");
1067 return Assignment(Known, ID, Source);
1069 static Assignment make(DIAssignID *ID, AssignRecord Source) {
1070 return Assignment(Known, ID, Source);
1072 static Assignment makeFromMemDef(DIAssignID *ID) {
1073 return Assignment(Known, ID);
1075 static Assignment makeNoneOrPhi() { return Assignment(NoneOrPhi, nullptr); }
1077 Assignment() : Status(NoneOrPhi), ID(nullptr) {} // Can we delete this?
1078 Assignment(S Status, DIAssignID *ID) : Status(Status), ID(ID) {
1079 // If the Status is Known then we expect there to be an assignment ID.
1082 Assignment(S Status, DIAssignID *ID, DbgAssignIntrinsic *Source)
1084 // If the Status is Known then we expect there to be an assignment ID.
1087 Assignment(S Status, DIAssignID *ID, DbgVariableRecord *Source)
1089 // If the Status is Known then we expect there to be an assignment ID.
1092 Assignment(S Status, DIAssignID *ID, AssignRecord Source)
1094 // If the Status is Known then we expect there to be an assignment ID.
1099 using AssignmentMap = SmallVector<Assignment>;
1147 /// Dominating assignment to memory for each variable, indexed by
1153 /// dominating assignment in StackHomeValue (LocKind::Mem), DebugValue
1157 /// Assignment (the class) between whether an assignment is unknown or a
1184 const Assignment &getAssignment(AssignmentKind Kind, VariableID Var) const {
1201 /// Set the assignment in the \p Kind assignment map for \p Var only: does
1202 /// not set the assignment for VariableIDs of fragments contained win \p
1205 const Assignment &AV) {
1210 /// Return true if there is an assignment matching \p AV in the \p Kind
1211 /// assignment map. Does consider assignments for VariableIDs of fragments
1214 const Assignment &AV) const {
1242 Assignment::makeNoneOrPhi());
1244 Assignment::makeNoneOrPhi());
1334 /// (⊤) in this case (unknown location / assignment).
1337 static Assignment joinAssignment(const Assignment &A, const Assignment &B);
1362 /// Add an assignment to memory for the variable /p Var.
1363 void addMemDef(BlockInfo *LiveSet, VariableID Var, const Assignment &AV);
1364 /// Add an assignment to the variable /p Var.
1365 void addDbgDef(BlockInfo *LiveSet, VariableID Var, const Assignment &AV);
1373 /// Return true if \p Var has an assignment in \p M matching \p AV.
1375 VariableID Var, const Assignment &AV);
1428 const Assignment &AV) {
1434 Assignment FragAV = AV;
1441 const Assignment &AV) {
1447 Assignment FragAV = AV;
1467 /// Return true if \p Var has an assignment in \p M matching \p AV.
1470 const Assignment &AV) {
1608 // Interpret stack stores that are not tagged as an assignment in memory for
1614 // prevents us missing an assignment and therefore incorrectly maintaining
1629 // This instruction is treated as both a debug and memory assignment,
1630 // meaning the memory location should be used. We don't have an assignment
1631 // ID though so use Assignment::makeNoneOrPhi() to create an imaginary one.
1632 addMemDef(LiveSet, Var, Assignment::makeNoneOrPhi());
1633 addDbgDef(LiveSet, Var, Assignment::makeNoneOrPhi());
1659 // Get DILocation for this unrecorded assignment.
1694 Assignment AV = Assignment::makeFromMemDef(getIDFromInst(I));
1701 // The last assignment to the stack is now AV. Check if the last debug
1702 // assignment has a matching Assignment.
1730 // There's been an assignment to memory that we were using as a
1731 // location for this variable, and the Assignment doesn't match what
1733 Assignment DbgAV = LiveSet->getAssignment(BlockInfo::Debug, Var);
1734 if (DbgAV.Status == Assignment::NoneOrPhi) {
1752 // There's been an assignment to memory and we currently are
1774 Assignment AV = Assignment::make(getIDFromMarker(*DbgAssign), DbgAssign);
1782 // Assignment.
1785 // state that an assignment happened here, and we know that specific
1786 // assignment was the last one to take place in memory for this variable.
1800 // The last assignment to the memory location isn't the one that we want
1822 // We have no ID to create an Assignment with so we mark this assignment as
1824 // the assignment responsible for setting this value.
1828 Assignment AV = Assignment::makeNoneOrPhi();
1972 AssignmentTrackingLowering::Assignment
1973 AssignmentTrackingLowering::joinAssignment(const Assignment &A,
1974 const Assignment &B) {
1982 return Assignment::makeNoneOrPhi();
1983 if (A.Status == Assignment::NoneOrPhi)
1984 return Assignment::makeNoneOrPhi();
1996 // Here the same assignment (!1) was performed in both preds in the source,
2017 assert(A.Status == B.Status && A.Status == Assignment::Known);
2019 return Assignment::make(A.ID, Source);
2192 // Skip this assignment if the affected bits are outside of the
2331 // Assignment, and the various join methods, which show that all the elements
2853 "Assignment Tracking Analysis", false, true)