summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/FunctionIndexObjectFile.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2016-03-11 18:52:24 +0000
committerTeresa Johnson <tejohnson@google.com>2016-03-11 18:52:24 +0000
commit76a1c1d0ba05993f3e57f935698ec0fd09b66c8c (patch)
treee89825099cc401c2546bbfa7e0ac83c2e1d98644 /llvm/lib/Object/FunctionIndexObjectFile.cpp
parentc134810cfb91716554177992c4bbbf2543545a1a (diff)
downloadbcm5719-llvm-76a1c1d0ba05993f3e57f935698ec0fd09b66c8c.tar.gz
bcm5719-llvm-76a1c1d0ba05993f3e57f935698ec0fd09b66c8c.zip
[ThinLTO] Support for reference graph in per-module and combined summary.
Summary: This patch adds support for including a full reference graph including call graph edges and other GV references in the summary. The reference graph edges can be used to make importing decisions without materializing any source modules, can be used in the plugin to make file staging decisions for distributed build systems, and is expected to have other uses. The call graph edges are recorded in each function summary in the bitcode via a list of <CalleeValueIds, StaticCount> tuples when no PGO data exists, or <CalleeValueId, StaticCount, ProfileCount> pairs when there is PGO, where the ValueId can be mapped to the function GUID via the ValueSymbolTable. In the function index in memory, the call graph edges reference the target via the CalleeGUID instead of the CalleeValueId. The reference graph edges are recorded in each summary record with a list of referenced value IDs, which can be mapped to value GUID via the ValueSymbolTable. Addtionally, a new summary record type is added to record references from global variable initializers. A number of bitcode records and data structures have been renamed to reflect the newly expanded scope of the summary beyond functions. More cleanup will follow. Reviewers: joker.eph, davidxl Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D17212 llvm-svn: 263275
Diffstat (limited to 'llvm/lib/Object/FunctionIndexObjectFile.cpp')
-rw-r--r--llvm/lib/Object/FunctionIndexObjectFile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Object/FunctionIndexObjectFile.cpp b/llvm/lib/Object/FunctionIndexObjectFile.cpp
index 927fd1409a6..9347988cf3d 100644
--- a/llvm/lib/Object/FunctionIndexObjectFile.cpp
+++ b/llvm/lib/Object/FunctionIndexObjectFile.cpp
@@ -66,15 +66,15 @@ FunctionIndexObjectFile::findBitcodeInMemBuffer(MemoryBufferRef Object) {
}
}
-// Looks for function index in the given memory buffer.
+// Looks for module summary index in the given memory buffer.
// returns true if found, else false.
-bool FunctionIndexObjectFile::hasFunctionSummaryInMemBuffer(
+bool FunctionIndexObjectFile::hasGlobalValueSummaryInMemBuffer(
MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler) {
ErrorOr<MemoryBufferRef> BCOrErr = findBitcodeInMemBuffer(Object);
if (!BCOrErr)
return false;
- return hasFunctionSummary(BCOrErr.get(), DiagnosticHandler);
+ return hasGlobalValueSummary(BCOrErr.get(), DiagnosticHandler);
}
// Parse function index in the given memory buffer.
OpenPOWER on IntegriCloud