aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/StringRef.cpp
diff options
context:
space:
mode:
authorWang Pengcheng <wangpengcheng.pp@bytedance.com>2024-01-12 11:38:05 +0800
committerGitHub <noreply@github.com>2024-01-12 11:38:05 +0800
commita2af3742847899070322f15d6cefb7e9c738f40d (patch)
tree7ea79162f76850960003ee3b72eaea4c1f4dd476 /llvm/lib/Support/StringRef.cpp
parent9e40ba0c2d2cd03f0b99da191b1e6bef8f3d8953 (diff)
downloadllvm-a2af3742847899070322f15d6cefb7e9c738f40d.zip
llvm-a2af3742847899070322f15d6cefb7e9c738f40d.tar.gz
llvm-a2af3742847899070322f15d6cefb7e9c738f40d.tar.bz2
[SelectionDAG] Add space-optimized forms of OPC_CheckPredicate (#77763)
We record the usage of each `Predicate` and sort them by usage. For the top 8 `Predicate`s, we will emit a `PC_CheckPredicateN` to save one byte. Overall this reduces the llc binary size with all in-tree targets by about 61K. This is a recommit of 1a57927, which was reverted in bc98c31. The CI failures occurred when doing expensive checks (with option `LLVM_ENABLE_EXPENSIVE_CHECKS` being ON). The key point here is that we need stable sorting result in the test, but doing expensive checks uncovered the non-determinism of `llvm::sort`. So `llvm::sort` is changed to `llvm::stable_sort` in this revised patch. And we use `llvm::MapVector` to keep insertion order.
Diffstat (limited to 'llvm/lib/Support/StringRef.cpp')
0 files changed, 0 insertions, 0 deletions