aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2024-09-10 10:11:33 -0700
committerGitHub <noreply@github.com>2024-09-10 10:11:33 -0700
commit524a028f69cdf25503912c396ebda7ebf0065ed2 (patch)
tree7205ea7c11d62b599d70621b087403326a2741b8 /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
parentce9f9872950090eae9104ff49b77469e3dc0a3c5 (diff)
downloadllvm-524a028f69cdf25503912c396ebda7ebf0065ed2.zip
llvm-524a028f69cdf25503912c396ebda7ebf0065ed2.tar.gz
llvm-524a028f69cdf25503912c396ebda7ebf0065ed2.tar.bz2
[MemProf] Streamline and avoid unnecessary context id duplication (#107918)
Sort the list of calls such that those with the same stack ids are also sorted by function. This allows processing of all matching calls (that can share a context node) in bulk as they are all adjacent. This has 2 benefits: 1. It reduces unnecessary work, specifically the handling to intersect the context ids with those along the graph edges for the stack ids, for calls that we know can share a node. 2. It simplifies detecting when we have matching stack ids but don't need to duplicate context ids. Specifically, we were previously still duplicating context ids whenever we saw another call with the same stack ids, but that isn't necessary if they will share a context node. With this change we now only duplicate context ids if we see some that not only have the same ids but also are in different functions. This change reduced the amount of context id duplication and provided reductions in both both peak memory (~8%) and time (~%5) for a large target.
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions