EmitMCountInstrumentation();
PGO.assignRegionCounters(GD);
- if (CGM.getPGOData()) {
- if (D) {
- // Turn on InlineHint attribute for hot functions.
- if (CGM.getPGOData()->isHotFunction(CGM.getMangledName(GD)))
- Fn->addFnAttr(llvm::Attribute::InlineHint);
- // Turn on Cold attribute for cold functions.
- else if (CGM.getPGOData()->isColdFunction(CGM.getMangledName(GD)))
- Fn->addFnAttr(llvm::Attribute::Cold);
- }
+ if (CGM.getPGOData() && D) {
+ // Turn on InlineHint attribute for hot functions.
+ if (CGM.getPGOData()->isHotFunction(CGM.getMangledName(GD)))
+ Fn->addFnAttr(llvm::Attribute::InlineHint);
+ // Turn on Cold attribute for cold functions.
+ else if (CGM.getPGOData()->isColdFunction(CGM.getMangledName(GD)))
+ Fn->addFnAttr(llvm::Attribute::Cold);
}
if (RetTy->isVoidType()) {