mirror of
https://github.com/RPCSX/llvm.git
synced 2026-01-31 01:05:23 +01:00
IR: Function summary representation for type tests.
Each function summary has an attached list of type identifier GUIDs. The idea is that during the regular LTO phase we would match these GUIDs to type identifiers defined by the regular LTO module and store the resolutions in a top-level "type identifier summary" (which will be implemented separately). Differential Revision: https://reviews.llvm.org/D27967 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290280 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3286,6 +3286,9 @@ void ModuleBitcodeWriter::writePerModuleFunctionSummaryRecord(
|
||||
NameVals.push_back(ValueID);
|
||||
|
||||
FunctionSummary *FS = cast<FunctionSummary>(Summary);
|
||||
if (!FS->type_tests().empty())
|
||||
Stream.EmitRecord(bitc::FS_TYPE_TESTS, FS->type_tests());
|
||||
|
||||
NameVals.push_back(getEncodedGVSummaryFlags(FS->flags()));
|
||||
NameVals.push_back(FS->instCount());
|
||||
NameVals.push_back(FS->refs().size());
|
||||
@@ -3544,6 +3547,9 @@ void IndexBitcodeWriter::writeCombinedGlobalValueSummary() {
|
||||
}
|
||||
|
||||
auto *FS = cast<FunctionSummary>(S);
|
||||
if (!FS->type_tests().empty())
|
||||
Stream.EmitRecord(bitc::FS_TYPE_TESTS, FS->type_tests());
|
||||
|
||||
NameVals.push_back(ValueId);
|
||||
NameVals.push_back(Index.getModuleId(FS->modulePath()));
|
||||
NameVals.push_back(getEncodedGVSummaryFlags(FS->flags()));
|
||||
|
||||
Reference in New Issue
Block a user