llvm.org GIT mirror llvm / ef7704b
[IRPGO] Set the function entry count metadata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271090 91177308-0d34-0410-b5e6-96231b3b80d8 Sean Silva 3 years ago
2 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
869869 auto *BFI = LookupBFI(F);
870870 PGOUseFunc Func(F, &M, BPI, BFI);
871871 setPGOCountOnFunc(Func, PGOReader.get());
872 F.setEntryCount(Func.EntryCount);
872873 if (!Func.getProfileRecord().Counts.empty())
873874 Builder.addRecord(Func.getProfileRecord());
874875
2020 ; GEN: @__profn_test_br_1 = private constant [9 x i8] c"test_br_1"
2121
2222 define i32 @test_br_1(i32 %i) {
23 ; USE-LABEL: @test_br_1
24 ; USE-SAME: !prof ![[FUNC_ENTRY_COUNT:[0-9]+]]
2325 entry:
2426 ; GEN: entry:
2527 ; GEN-NOT: llvm.instrprof.increment
4345 }
4446 ; USE-DAG: {{![0-9]+}} = !{i32 1, !"ProfileSummary", {{![0-9]+}}}
4547 ; USE-DAG: {{![0-9]+}} = !{!"DetailedSummary", {{![0-9]+}}}
48 ; USE-DAG: ![[FUNC_ENTRY_COUNT]] = !{!"function_entry_count", i64 3}