60 lines · plain
1; RUN: opt < %s -disable-output -passes=print-profile-summary -S 2>&1 | FileCheck %s2; RUN: opt < %s -disable-output -profile-summary-hot-count=500 -passes=print-profile-summary -S 2>&1 | FileCheck %s -check-prefixes=OVERRIDE-HOT3; RUN: opt < %s -disable-output -profile-summary-cold-count=0 -passes=print-profile-summary -S 2>&1 | FileCheck %s -check-prefixes=OVERRIDE-COLD4; RUN: opt < %s -disable-output -profile-summary-cold-count=200 -profile-summary-hot-count=1000 -passes=print-profile-summary -S 2>&1 | FileCheck %s -check-prefixes=OVERRIDE-BOTH5; RUN: opt < %s -disable-output -profile-summary-cutoff-hot=0 -passes=print-profile-summary -S 2>&1 | FileCheck %s -check-prefixes=HOT-CUTOFF-06; RUN: opt < %s -disable-output -profile-summary-cutoff-cold=0 -profile-summary-hot-count=18446744073709551615 -passes=print-profile-summary -S 2>&1 | FileCheck %s -check-prefixes=COLD-CUTOFF-07 8define void @f1() !prof !20 {9; CHECK-LABEL: f1 :hot10; OVERRIDE-HOT-LABEL: f1{{$}}11; OVERRIDE-COLD-LABEL: f1 :hot12; OVERRIDE-BOTH-LABEL: f1{{$}}13; HOT-CUTOFF-0-LABEL: f1{{$}}14; COLD-CUTOFF-0-LABEL: f1 :cold15 16 ret void17}18 19define void @f2() !prof !21 {20; CHECK-LABEL: f2 :cold21; OVERRIDE-HOT-LABEL: f2 :cold22; OVERRIDE-COLD-LABEL: f2{{$}}23; OVERRIDE-BOTH-LABEL: f2 :cold24; HOT-CUTOFF-0-LABEL: f2 :cold25; COLD-CUTOFF-0-LABEL: f2 :cold26 27 ret void28}29 30define void @f3() !prof !22 {31; CHECK-LABEL: f3 :hot32; OVERRIDE-HOT-LABEL: f3{{$}}33; OVERRIDE-COLD-LABEL: f3 :hot34; OVERRIDE-BOTH-LABEL: f3 :cold35; HOT-CUTOFF-0-LABEL: f3{{$}}36; COLD-CUTOFF-0-LABEL: f3 :cold37 38 ret void39}40 41!llvm.module.flags = !{!1}42!20 = !{!"function_entry_count", i64 400}43!21 = !{!"function_entry_count", i64 1}44!22 = !{!"function_entry_count", i64 100}45 46!1 = !{i32 1, !"ProfileSummary", !2}47!2 = !{!3, !4, !5, !6, !7, !8, !9, !10}48!3 = !{!"ProfileFormat", !"InstrProf"}49!4 = !{!"TotalCount", i64 10000}50!5 = !{!"MaxCount", i64 10}51!6 = !{!"MaxInternalCount", i64 1}52!7 = !{!"MaxFunctionCount", i64 1000}53!8 = !{!"NumCounts", i64 3}54!9 = !{!"NumFunctions", i64 3}55!10 = !{!"DetailedSummary", !11}56!11 = !{!12, !13, !14}57!12 = !{i32 10000, i64 100, i32 1}58!13 = !{i32 999000, i64 100, i32 1}59!14 = !{i32 999999, i64 1, i32 2}60