Summary: This change makes the sample profile's behavior consistent with instr profile.
Reviewers: davidxl, eraman, dnovillo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17522
llvm-svn: 261587
}
bool SampleProfileLoader::runOnFunction(Function &F) {
+ F.setEntryCount(0);
Samples = Reader->getSamplesFor(F);
if (!Samples->empty())
return emitAnnotations(F);
ret void, !dbg !9
}
+; This function does not have profile, check if function_entry_count is 0
+; CHECK: {{.*}} = !{!"function_entry_count", i64 0}
+define void @no_profile() {
+entry:
+ ret void
+}
+
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!6, !7}
!llvm.ident = !{!8}