Lines Matching full:ids

151 /// and nodes in the graph are decorated with the context ids they carry. This
270 // such as the context ids and allocation type of this node.
286 // Compute the context ids for this node from the union of its edge context
287 // ids.
321 // The context ids set for this node is empty if its edge context ids are
377 // it should have an allocation type of None and empty context ids.
403 // The set of IDs for contexts including this edge.
423 /// carrying any context ids) after transformations.
430 /// Get a list of nodes corresponding to the stack ids in the given callsite
436 /// Adds nodes for the given allocation and any stack ids on its memprof MIB
440 /// Adds nodes for the given MIB stack ids.
479 /// Duplicates the given set of context ids, updating the provided
480 /// map from each original id with the newly generated context ids,
486 /// Propagates all duplicated context ids across the graph.
492 /// ids moved to the newly created edge.
524 /// Get a list of nodes corresponding to the stack ids in the given
570 /// Computes the alloc type corresponding to the given context ids, by
589 /// subset of Edge's ids are moved to an edge to the new callee.
599 /// subset of Edge's ids are moved to an edge to the new callee.
608 /// allocation given its context. The context ids of the allocation being
622 /// trying to assign the corresponding callsites with those stack ids to these
841 // exist for those context ids. in allocTypesMatch()
1043 // Update alloc type and context ids for this MIB. in addStackNodesForMIB()
1047 // Later when processing the stack ids on non-alloc callsites we will adjust in addStackNodesForMIB()
1088 // up the size. Assume that if we are able to duplicate context ids that we in duplicateContextIds()
1099 // Build a set of duplicated context ids corresponding to the input id set. in propagateDuplicateContextIds()
1109 // Recursively update context ids sets along caller edges. in propagateDuplicateContextIds()
1120 // it resulted in any added ids to NextNode. in propagateDuplicateContextIds()
1139 // as ids are moved. in connectNewNode()
1146 // Remove any matching context ids from Edge, return set that were found and in connectNewNode()
1147 // removed, these are the new edge's context ids. Also update the remaining in connectNewNode()
1148 // (not found ids). in connectNewNode()
1153 // If no matching context ids for this edge, skip it. in connectNewNode()
1171 // Remove old edge if context ids empty. in connectNewNode()
1201 // Compute node's context ids once for use in asserts. in checkNode()
1204 // Node's context ids should be the union of both its callee and caller edge in checkNode()
1205 // context ids. in checkNode()
1214 // Node can have more context ids than callers if some contexts terminate at in checkNode()
1254 // associated context ids over to the new nodes. in assignStackNodesPostOrder()
1267 auto &[Call, Ids, Func, SavedContextIds] = Calls[0]; in assignStackNodesPostOrder()
1268 if (Ids.size() == 1) { in assignStackNodesPostOrder()
1271 assert(Node == getNodeForStackId(Ids[0])); in assignStackNodesPostOrder()
1285 // We should only have kept stack ids that had nodes. in assignStackNodesPostOrder()
1289 auto &[Call, Ids, Func, SavedContextIds] = Calls[I]; in assignStackNodesPostOrder()
1290 // Skip any for which we didn't assign any ids, these don't get a node in in assignStackNodesPostOrder()
1295 assert(LastId == Ids.back()); in assignStackNodesPostOrder()
1297 ContextNode *FirstNode = getNodeForStackId(Ids[0]); in assignStackNodesPostOrder()
1300 // Recompute the context ids for this stack id sequence (the in assignStackNodesPostOrder()
1301 // intersection of the context ids of the corresponding nodes). in assignStackNodesPostOrder()
1302 // Start with the ids we saved in the map for this call, which could be in assignStackNodesPostOrder()
1303 // duplicated context ids. We have to recompute as we might have overlap in assignStackNodesPostOrder()
1304 // overlap between the saved context ids for different last nodes, and in assignStackNodesPostOrder()
1308 for (auto Id : Ids) { in assignStackNodesPostOrder()
1310 // We should only have kept stack ids that had nodes and weren't in assignStackNodesPostOrder()
1326 // If we now have no context ids for clone, skip this call. in assignStackNodesPostOrder()
1342 // This updates context ids for FirstNode's callee's to reflect those in assignStackNodesPostOrder()
1347 // This updates context ids for FirstNode's caller's to reflect those in assignStackNodesPostOrder()
1351 // Now we need to remove context ids from edges/nodes between First and in assignStackNodesPostOrder()
1354 for (auto Id : Ids) { in assignStackNodesPostOrder()
1356 // We should only have kept stack ids that had nodes. in assignStackNodesPostOrder()
1359 // Remove the context ids moved to NewNode from CurNode, and the in assignStackNodesPostOrder()
1380 for (auto Id : Ids) { in assignStackNodesPostOrder()
1382 // We should only have kept stack ids that had nodes. in assignStackNodesPostOrder()
1395 // The CallContextInfo contains the Call and a list of its stack ids with in updateStackNodes()
1396 // ContextNodes, the function containing Call, and the set of context ids in updateStackNodes()
1411 // Otherwise, record this Call along with the list of ids for the last in updateStackNodes()
1418 // First make a pass through all stack ids that correspond to a call, in updateStackNodes()
1419 // as identified in the above loop. Compute the context ids corresponding to in updateStackNodes()
1420 // each of these calls when they correspond to multiple stack ids due to in updateStackNodes()
1421 // due to inlining. Perform any duplication of context ids required when in updateStackNodes()
1422 // there is more than one call with the same stack ids. Their (possibly newly in updateStackNodes()
1423 // duplicated) context ids are saved in the StackIdToMatchingCalls map. in updateStackNodes()
1429 auto &Ids = std::get<1>(Calls[0]); in updateStackNodes() local
1430 if (Ids.size() == 1) in updateStackNodes()
1434 // node sequences we will sort the vectors of stack ids in descending order in updateStackNodes()
1452 // We should only have kept stack ids that had nodes. in updateStackNodes()
1458 // Initialize the context ids with the last node's. We will subsequently in updateStackNodes()
1459 // refine the context ids by computing the intersection along all edges. in updateStackNodes()
1464 auto &[Call, Ids, Func, SavedContextIds] = Calls[I]; in updateStackNodes()
1466 assert(LastId == Ids.back()); in updateStackNodes()
1468 // First compute the context ids for this stack id sequence (the in updateStackNodes()
1469 // intersection of the context ids of the corresponding nodes). in updateStackNodes()
1470 // Start with the remaining saved ids for the last node. in updateStackNodes()
1478 // Iterate backwards through the stack Ids, starting after the last Id in updateStackNodes()
1480 for (auto IdIter = Ids.rbegin() + 1; IdIter != Ids.rend(); IdIter++) { in updateStackNodes()
1483 // We should only have kept stack ids that had nodes. in updateStackNodes()
1494 // particular inlined context may include stack ids A->B, and we may in updateStackNodes()
1507 // Update the context ids, which is the intersection of the ids along in updateStackNodes()
1511 // If we now have no context ids for clone, skip this call. in updateStackNodes()
1520 // If some of this call's stack ids did not have corresponding nodes (due in updateStackNodes()
1521 // to pruning), don't include any context ids for contexts that extend in updateStackNodes()
1523 // not fully matching stack contexts. To do this, subtract any context ids in updateStackNodes()
1525 if (Ids.back() != getLastStackId(Call)) { in updateStackNodes()
1531 // If we now have no context ids for clone, skip this call. in updateStackNodes()
1536 // Check if the next set of stack ids is the same (since the Calls vector in updateStackNodes()
1537 // of tuples is sorted by the stack ids we can just look at the next one). in updateStackNodes()
1541 DuplicateContextIds = Ids == NextIds; in updateStackNodes()
1544 // If we don't have duplicate context ids, then we can assign all the in updateStackNodes()
1545 // context ids computed for the original node sequence to this call. in updateStackNodes()
1546 // If there are duplicate calls with the same stack ids then we synthesize in updateStackNodes()
1547 // new context ids that are duplicates of the originals. These are in updateStackNodes()
1549 // for this call, allowing us to access these ids later on. in updateStackNodes()
1559 // Update saved last node's context ids to remove those that are in updateStackNodes()
1569 // Propagate the duplicate context ids over the graph. in updateStackNodes()
1579 // associated context ids over to the new nodes. in updateStackNodes()
1763 // stack ids on the allocation call during ModuleSummaryAnalysis. in IndexCallsiteContextGraph()
2230 // Make a copy of the computed context ids that we can sort for stability. in print()
2438 IdString += (" (" + Twine(ContextIds.size()) + " ids)").str(); in getContextIds()
2505 // edge. Copy in Edge's ids for simplicity. in moveEdgeToExistingCalleeClone()
2509 // If we are moving all of Edge's ids, then just move the whole Edge. in moveEdgeToExistingCalleeClone()
2518 // Since we already have an edge to NewCallee, simply move the ids in moveEdgeToExistingCalleeClone()
2531 // Don't need to update Edge's context ids since we are simply in moveEdgeToExistingCalleeClone()
2537 // Only moving a subset of Edge's ids. in moveEdgeToExistingCalleeClone()
2540 // Compute the alloc type of the subset of ids being moved. in moveEdgeToExistingCalleeClone()
2543 // Since we already have an edge to NewCallee, simply move the ids in moveEdgeToExistingCalleeClone()
2549 // Otherwise, create a new edge to NewCallee for the ids being moved. in moveEdgeToExistingCalleeClone()
2556 // those ids and update the alloc type on the original Edge. in moveEdgeToExistingCalleeClone()
2561 // Now walk the old callee node's callee edges and move Edge's context ids in moveEdgeToExistingCalleeClone()
2565 // The context ids moving to the new callee are the subset of this edge's in moveEdgeToExistingCalleeClone()
2566 // context ids and the context ids on the caller edge being moved. in moveEdgeToExistingCalleeClone()
2573 // Update context ids / alloc type on corresponding edge to NewCallee. in moveEdgeToExistingCalleeClone()
2724 // Nodes with non-empty context ids should be sorted before in identifyClones()
2725 // those with empty context ids. in identifyClones()
2758 // Only need to process the ids along this edge pertaining to the given in identifyClones()
2768 // Compute the node callee edge alloc types corresponding to the context ids in identifyClones()
2786 // disambiguated by splitting out different context ids. in identifyClones()
2826 // We should still have some context ids on the original Node. in identifyClones()
2997 // Skip call if we do not have a node for it (all uses of its stack ids in assignFunctions()
3369 // Skip if either no call to update, or if we ended up with no context ids in assignFunctions()
3630 // stack ids. in applyImport()
3638 // matching the stack ids. in applyImport()
3687 // Sanity check that the MIB stack ids match between the summary and in applyImport()
3709 // entries, to be consistent with how the summary ids were in applyImport()
3783 // Sanity check that the stack ids match between the summary and in applyImport()