1; REQUIRES: have_tf_api 2; REQUIRES: x86_64-linux 3; 4; Check that we can log more than 1 function. 5; 6; RUN: llc -mtriple=x86_64-linux-unknown -regalloc=greedy -regalloc-enable-advisor=development \ 7; RUN: -regalloc-training-log=%t1 -tfutils-text-log < %s 8; RUN: sed -i 's/ \+/ /g' %t1 9; RUN: sed -i 's/\\n key:/\n key:/g' %t1 10; RUN: sed -i 's/\\n feature/\n feature/g' %t1 11; RUN: sed -i 's/\\n/ /g' %t1 12; RUN: FileCheck --input-file %t1 %s 13 14; RUN: rm -rf %t && mkdir %t 15; RUN: %python %S/../../../lib/Analysis/models/gen-regalloc-eviction-test-model.py %t 16; RUN: llc -mtriple=x86_64-linux-unknown -regalloc=greedy -regalloc-enable-advisor=development \ 17; RUN: -regalloc-training-log=%t2 -tfutils-text-log -regalloc-model=%t < %s 18; RUN: sed -i 's/ \+/ /g' %t2 19; RUN: sed -i 's/\\n key:/\n key:/g' %t2 20; RUN: sed -i 's/\\n feature/\n feature/g' %t2 21; RUN: sed -i 's/\\n/ /g' %t2 22; RUN: FileCheck --input-file %t2 %s 23 24declare void @f(); 25 26define void @f1(i64 %lhs, i64 %rhs, i64* %addr) !prof !15 { 27 %sum = add i64 %lhs, %rhs 28 call void @f(); 29 store i64 %sum, i64* %addr 30 ret void 31} 32 33define void @f2(i64 %lhs, i64 %rhs, i64* %addr) !prof !16 { 34 %sum = add i64 %lhs, %rhs 35 store i64 %sum, i64* %addr 36 ret void 37} 38 39; CHECK: key: "f1" 40; CHECK: key: "f2" 41 42!llvm.module.flags = !{!1} 43!1 = !{i32 1, !"ProfileSummary", !2} 44!2 = !{!3, !4, !5, !6, !7, !8, !9, !10} 45!3 = !{!"ProfileFormat", !"InstrProf"} 46!4 = !{!"TotalCount", i64 10000} 47!5 = !{!"MaxCount", i64 10} 48!6 = !{!"MaxInternalCount", i64 1} 49!7 = !{!"MaxFunctionCount", i64 1000} 50!8 = !{!"NumCounts", i64 3} 51!9 = !{!"NumFunctions", i64 3} 52!10 = !{!"DetailedSummary", !11} 53!11 = !{!12, !13, !14} 54!12 = !{i32 10000, i64 100, i32 1} 55!13 = !{i32 999000, i64 100, i32 1} 56!14 = !{i32 999999, i64 1, i32 2} 57!15 = !{!"function_entry_count", i64 1} 58!16 = !{!"function_entry_count", i64 1000} 59