[ThinLTO] Renaming of function index to module summary index (NFC)
(Resubmitting after fixing missing file issue)
With the changes in r263275, there are now more than just functions in
the summary. Completed the renaming of data structures (started in
r263275) to reflect the wider scope. In particular, changed the
FunctionIndex* data structures to ModuleIndex*, and renamed related
variables and comments. Also renamed the files to reflect the changes.
A companion clang patch will immediately succeed this patch to reflect
this renaming.
llvm-svn: 263513
diff --git a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
index 73069b2..eceb085 100644
--- a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
+++ b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
@@ -68,7 +68,7 @@
// For now we are conservative in determining which variables are not
// address taken by checking the unnamed addr flag. To be more aggressive,
// the address taken information must be checked earlier during parsing
- // of the module and recorded in the function index for use when importing
+ // of the module and recorded in the summary index for use when importing
// from that module.
auto *GVar = dyn_cast<GlobalVariable>(SGV);
if (GVar && GVar->isConstant() && GVar->hasUnnamedAddr())
@@ -76,7 +76,7 @@
// Eventually we only need to promote functions in the exporting module that
// are referenced by a potentially exported function (i.e. one that is in the
- // function index).
+ // summary index).
return true;
}
@@ -88,7 +88,7 @@
// avoid naming conflicts between locals imported from different modules.
if (SGV->hasLocalLinkage() &&
(doPromoteLocalToGlobal(SGV) || isPerformingImport()))
- return FunctionInfoIndex::getGlobalNameForLocal(
+ return ModuleSummaryIndex::getGlobalNameForLocal(
SGV->getName(),
ImportIndex.getModuleId(SGV->getParent()->getModuleIdentifier()));
return SGV->getName();
@@ -231,7 +231,7 @@
return false;
}
-bool llvm::renameModuleForThinLTO(Module &M, const FunctionInfoIndex &Index) {
+bool llvm::renameModuleForThinLTO(Module &M, const ModuleSummaryIndex &Index) {
FunctionImportGlobalProcessing ThinLTOProcessing(M, Index);
return ThinLTOProcessing.run();
}