Attach maximum function count to Module when using PGO mode
This sets the maximum entry count among all functions in the program to the module using module flags. This allows the optimizer to use this information. Differential Revision: http://reviews.llvm.org/D15163 llvm-svn: 255397
This commit is contained in:
@@ -376,6 +376,9 @@ void CodeGenModule::Release() {
|
||||
}
|
||||
if (PGOReader && PGOStats.hasDiagnostics())
|
||||
PGOStats.reportDiagnostics(getDiags(), getCodeGenOpts().MainFileName);
|
||||
// In PGO mode, attach maximum function count to the module.
|
||||
if (PGOReader)
|
||||
getModule().setMaximumFunctionCount(PGOReader->getMaximumFunctionCount());
|
||||
EmitCtorList(GlobalCtors, "llvm.global_ctors");
|
||||
EmitCtorList(GlobalDtors, "llvm.global_dtors");
|
||||
EmitGlobalAnnotations();
|
||||
|
||||
Reference in New Issue
Block a user