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