[all-commits] [llvm/llvm-project] c28ddf: [Analysis] Use BitVector::test in areInlineCompati...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Sun Jul 14 02:35:38 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c28ddf900051760e3ae8cef33b26da3c37f5627e
https://github.com/llvm/llvm-project/commit/c28ddf900051760e3ae8cef33b26da3c37f5627e
Author: Kazu Hirata <kazu at google.com>
Date: 2024-07-14 (Sun, 14 Jul 2024)
Changed paths:
M llvm/include/llvm/Analysis/TargetLibraryInfo.h
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list