aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ModuleSummaryIndex.cpp
diff options
context:
space:
mode:
authorMircea Trofin <mtrofin@google.com>2023-04-26 14:41:25 -0700
committerMircea Trofin <mtrofin@google.com>2023-04-27 12:21:50 -0700
commit460ea850148b10dfd30cce32b2ac600b313324c4 (patch)
treed3827ef3bf0e4a5039853a83867c4b2be8129c07 /llvm/lib/IR/ModuleSummaryIndex.cpp
parent1176d97598a9b46573213d2d75e0c6d90226ada0 (diff)
downloadllvm-460ea850148b10dfd30cce32b2ac600b313324c4.zip
llvm-460ea850148b10dfd30cce32b2ac600b313324c4.tar.gz
llvm-460ea850148b10dfd30cce32b2ac600b313324c4.tar.bz2
[nfc][thinlto] Handle global constant importing separately
This makes the logic for referenced globals reusable for import criteria that don't use thresholds - in fact, we currently didn't consider any thresholds when importing. Differential Revision: https://reviews.llvm.org/D149298
Diffstat (limited to 'llvm/lib/IR/ModuleSummaryIndex.cpp')
-rw-r--r--llvm/lib/IR/ModuleSummaryIndex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/ModuleSummaryIndex.cpp b/llvm/lib/IR/ModuleSummaryIndex.cpp
index 2d14407..99e5044 100644
--- a/llvm/lib/IR/ModuleSummaryIndex.cpp
+++ b/llvm/lib/IR/ModuleSummaryIndex.cpp
@@ -317,7 +317,7 @@ void ModuleSummaryIndex::propagateAttributes(
}
}
-bool ModuleSummaryIndex::canImportGlobalVar(GlobalValueSummary *S,
+bool ModuleSummaryIndex::canImportGlobalVar(const GlobalValueSummary *S,
bool AnalyzeRefs) const {
auto HasRefsPreventingImport = [this](const GlobalVarSummary *GVS) {
// We don't analyze GV references during attribute propagation, so