llvm-project
9eac38a0 - [MemProf] Remove context id set from nodes and recompute on demand (#94415)

Commit
1 year ago
[MemProf] Remove context id set from nodes and recompute on demand (#94415) The ContextIds set on the ContextNode struct is not technically needed as we can compute it from either the callee or caller edge context ids. Remove it and add a helper to recompute from the edges on demand. Also add helpers to compute the node allocation type and whether the context ids are empty from the edges without needing to first compute the node's context id set, to minimize the runtime cost increase. This yielded a 20% reduction in peak memory for a large thin link, for about a 2% time increase (which is more than offset by some other recent time efficiency improvements).
Author
Parents
Loading