diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-05-19 00:00:17 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-05-25 21:03:33 +0200 |
commit | 6300c37a461bf245c58bf2a6a24b618282c0a92b (patch) | |
tree | a772055a87dd492ceeb275e8d4adba7c96ba605e /llvm/lib/Object/MachOObjectFile.cpp | |
parent | 9ba21911db304f0536c38a7180aad89c82ee6ad1 (diff) | |
download | llvm-6300c37a461bf245c58bf2a6a24b618282c0a92b.zip llvm-6300c37a461bf245c58bf2a6a24b618282c0a92b.tar.gz llvm-6300c37a461bf245c58bf2a6a24b618282c0a92b.tar.bz2 |
[SCEV] Cache operands used in BEInfo (NFC)
When memoized values for a SCEV expressions are dropped, we also
drop all BECounts that make use of the SCEV expression. This is done
by iterating over all the ExitNotTaken counts and (recursively)
checking whether they use the SCEV expression. If there are many
exits, this will take a lot of time.
This patch improves the situation by pre-computing a set of all
used operands, so that we can determine whether a certain BEInfo
needs to be invalidated using a simple set lookup. Will still need
to loop over all BEInfos though.
This makes for a mild improvement on non-degenerate cases:
https://llvm-compile-time-tracker.com/compare.php?from=b661a55a253f4a1cf5a0fbcb86e5ba7b9fb1387b&to=be1393f450e594c53f0ad7e62339a6bc831b16f6&stat=instructions
For the degenerate case from https://bugs.llvm.org/show_bug.cgi?id=50384,
for n=128 I'm seeing run time drop from 1.6s to 1.1s.
Differential Revision: https://reviews.llvm.org/D102796
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions