aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/X86/cse-add-with-overflow.ll
diff options
context:
space:
mode:
authorDingdWang <wdd12358@gmail.com>2025-07-25 22:45:01 +0800
committerGitHub <noreply@github.com>2025-07-25 16:45:01 +0200
commit0c6784c9514d0ddb257bf0fd797969e0ae602882 (patch)
tree31b9455d60c01bb02f387b8a288359386cf6e50f /llvm/test/CodeGen/X86/cse-add-with-overflow.ll
parent74502168c4408404b2205838d742b930a4e59f90 (diff)
downloadllvm-0c6784c9514d0ddb257bf0fd797969e0ae602882.zip
llvm-0c6784c9514d0ddb257bf0fd797969e0ae602882.tar.gz
llvm-0c6784c9514d0ddb257bf0fd797969e0ae602882.tar.bz2
[MemDep] Optimize SortNonLocalDepInfoCache sorting strategy for large caches with few unsorted entries (#143107)
During compilation of large files with many branches, I observed that the function `SortNonLocalDepInfoCache` in `MemoryDependenceAnalysis` becomes a significant performance bottleneck. This is because `Cache.size()` can be very large (around 20,000), but only a small number of entries (approximately 5 to 8) actually need sorting. The original implementation performs a full sort in all cases, which is inefficient. This patch introduces a lightweight heuristic to quickly estimate the number of unsorted entries and choose a more efficient sorting method accordingly. As a result, the GVN pass runtime on a large file is reduced from approximately 26.3 minutes to 16.5 minutes.
Diffstat (limited to 'llvm/test/CodeGen/X86/cse-add-with-overflow.ll')
0 files changed, 0 insertions, 0 deletions