aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2021-02-23 16:09:05 -0800
committerFangrui Song <i@maskray.me>2021-02-23 16:09:06 -0800
commitef312951fd6b4a255baf3cff27439c9ed8751651 (patch)
tree4b88de287cef66f68fce79ad4497e54763cde88a /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parented02f52d288fb4d8f9049868afa6af84a980cbc3 (diff)
downloadllvm-ef312951fd6b4a255baf3cff27439c9ed8751651.zip
llvm-ef312951fd6b4a255baf3cff27439c9ed8751651.tar.gz
llvm-ef312951fd6b4a255baf3cff27439c9ed8751651.tar.bz2
collectUsedGlobalVariables: migrate SmallPtrSetImpl overload to SmallVecImpl overload after D97128
And delete the SmallPtrSetImpl overload. While here, decrease inline element counts from 8 to 4. See D97128 for the choice. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D97257
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/ModuleSummaryAnalysis.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
index cd21f55..c9afdad 100644
--- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
+++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
@@ -662,12 +662,12 @@ ModuleSummaryIndex llvm::buildModuleSummaryIndex(
// promotion, but we may have opaque uses e.g. in inline asm. We collect them
// here because we use this information to mark functions containing inline
// assembly calls as not importable.
- SmallPtrSet<GlobalValue *, 8> LocalsUsed;
- SmallPtrSet<GlobalValue *, 8> Used;
+ SmallPtrSet<GlobalValue *, 4> LocalsUsed;
+ SmallVector<GlobalValue *, 4> Used;
// First collect those in the llvm.used set.
- collectUsedGlobalVariables(M, Used, /*CompilerUsed*/ false);
+ collectUsedGlobalVariables(M, Used, /*CompilerUsed=*/false);
// Next collect those in the llvm.compiler.used set.
- collectUsedGlobalVariables(M, Used, /*CompilerUsed*/ true);
+ collectUsedGlobalVariables(M, Used, /*CompilerUsed=*/true);
DenseSet<GlobalValue::GUID> CantBePromoted;
for (auto *V : Used) {
if (V->hasLocalLinkage()) {