aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/XCOFFObjectFile.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-07-14 02:35:17 -0700
committerGitHub <noreply@github.com>2024-07-14 02:35:17 -0700
commitc28ddf900051760e3ae8cef33b26da3c37f5627e (patch)
tree32d001dc1c71193ed9f82edf6e0be58545a8747c /llvm/lib/Object/XCOFFObjectFile.cpp
parent181e4c6291c94a38c0ee89d2128f8d70b15d2d23 (diff)
downloadllvm-c28ddf900051760e3ae8cef33b26da3c37f5627e.zip
llvm-c28ddf900051760e3ae8cef33b26da3c37f5627e.tar.gz
llvm-c28ddf900051760e3ae8cef33b26da3c37f5627e.tar.bz2
[Analysis] Use BitVector::test in areInlineCompatible (NFC) (#98776)
areInlineCompatible checks to see if CalleeTLI.OverrideAsUnavailable is a subset of OverrideAsUnavailable by computing a union of the two and comparing the union and OverrideAsUnavailable. The problem is that computing a union involves memory allocations. This patch removes the need for memory allocations by switching to BitVector::test. Note that A.test(B) returns true if A - B is non-empty. That is, !A.test(B) is true if A if a subset of B. The use of BitVector::test here saves 0.20% of heap allocations during the compilation of X86ISelLowering.cpp.ii, a preprocessed version of X86ISelLowering.cpp.
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions