diff options
author | Jonas Paulsson <paulson1@linux.ibm.com> | 2025-04-28 07:04:07 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-28 15:04:07 +0200 |
commit | 98b895da30c03b7061b8740d91c0e7998e69d091 (patch) | |
tree | 80568997d65eb25ee31019a5454e74067d4c62b5 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 1a32613dacac8de3f41be5e75ea1f70cba87dd0f (diff) | |
download | llvm-98b895da30c03b7061b8740d91c0e7998e69d091.zip llvm-98b895da30c03b7061b8740d91c0e7998e69d091.tar.gz llvm-98b895da30c03b7061b8740d91c0e7998e69d091.tar.bz2 |
[SystemZ] Fix compile time regression in adjustInliningThreshold(). (#137527)
Instead of always iterating over all GlobalVariable:s in the Module to
find the case where both Caller and Callee is using the same GV heavily,
first scan Callee (only if less than 200 instructions) for all GVs used
more than 10 times, and then do the counting for the Caller for just
those relevant GVs.
The limit of 200 instructions makes sense as this aims to inline a
relatively small function using a GV +10 times.
This resolves the compile time problem with zig where it is on main
(compared to removing the heuristic) a 380% increase, but with this
change <0.5% increase (total user compile time with opt).
Fixes #134714.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions