[ThinLTO] Remove unused/incomplete lazy summary reading support (NFC)

This removes the interfaces added (and not yet complete) to support
lazy reading of summaries. This support is not expected to be needed
since we are moving to a model where the full index is only being
traversed in the thin link step, instead of the back ends.

(The second part of this that I plan to do next is remove the
GlobalValueInfo from the ModuleSummaryIndex - it was mostly needed to
support lazy parsing of summaries. The index can instead reference the
summary structures directly.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267097 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Teresa Johnson
2016-04-22 01:52:00 +00:00
parent 14eb0b531d
commit acfba51b27
5 changed files with 16 additions and 110 deletions

View File

@@ -83,8 +83,7 @@ bool ModuleSummaryIndexObjectFile::hasGlobalValueSummaryInMemBuffer(
// module summary/index.
ErrorOr<std::unique_ptr<ModuleSummaryIndexObjectFile>>
ModuleSummaryIndexObjectFile::create(
MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler,
bool IsLazy) {
MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler) {
std::unique_ptr<ModuleSummaryIndex> Index;
ErrorOr<MemoryBufferRef> BCOrErr = findBitcodeInMemBuffer(Object);
@@ -92,7 +91,7 @@ ModuleSummaryIndexObjectFile::create(
return BCOrErr.getError();
ErrorOr<std::unique_ptr<ModuleSummaryIndex>> IOrErr =
getModuleSummaryIndex(BCOrErr.get(), DiagnosticHandler, IsLazy);
getModuleSummaryIndex(BCOrErr.get(), DiagnosticHandler);
if (std::error_code EC = IOrErr.getError())
return EC;
@@ -103,23 +102,6 @@ ModuleSummaryIndexObjectFile::create(
std::move(Index));
}
// Parse the summary information for value with the
// given name out of the given buffer. Parsed information is
// stored on the index object saved in this object.
std::error_code ModuleSummaryIndexObjectFile::findGlobalValueSummaryInMemBuffer(
MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler,
StringRef ValueName) {
sys::fs::file_magic Type = sys::fs::identify_magic(Object.getBuffer());
switch (Type) {
case sys::fs::file_magic::bitcode: {
return readGlobalValueSummary(Object, DiagnosticHandler, ValueName,
std::move(Index));
}
default:
return object_error::invalid_file_type;
}
}
// Parse the module summary index out of an IR file and return the summary
// index object if found, or nullptr if not.
ErrorOr<std::unique_ptr<ModuleSummaryIndex>> llvm::getModuleSummaryIndexForFile(