brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · aeda971 Raw
52 lines · plain
1; REQUIRES: have_tflite2; REQUIRES: x86_64-linux3;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 < %s8; RUN: FileCheck --input-file %t1 %s9 10; RUN: rm -rf %t %t_savedmodel11; RUN: %python %S/../../../lib/Analysis/models/gen-regalloc-eviction-test-model.py %t_savedmodel12; RUN: %python %S/../../../lib/Analysis/models/saved-model-to-tflite.py %t_savedmodel %t13; RUN: llc -mtriple=x86_64-linux-unknown -regalloc=greedy -regalloc-enable-advisor=development \14; RUN:   -regalloc-training-log=%t2 -regalloc-model=%t < %s15; RUN: FileCheck --input-file %t2 %s16 17declare void @f();18 19define void @f1(i64 %lhs, i64 %rhs, i64* %addr) !prof !15 {20  %sum = add i64 %lhs, %rhs21  call void @f();22  store i64 %sum, i64* %addr23  ret void24}25 26define void @f2(i64 %lhs, i64 %rhs, i64* %addr) !prof !16 {27  %sum = add i64 %lhs, %rhs28  store i64 %sum, i64* %addr29  ret void30}31 32; CHECK:  {"context":"f1"}33; CHECK:  {"context":"f2"}34 35!llvm.module.flags = !{!1}36!1 = !{i32 1, !"ProfileSummary", !2}37!2 = !{!3, !4, !5, !6, !7, !8, !9, !10}38!3 = !{!"ProfileFormat", !"InstrProf"}39!4 = !{!"TotalCount", i64 10000}40!5 = !{!"MaxCount", i64 10}41!6 = !{!"MaxInternalCount", i64 1}42!7 = !{!"MaxFunctionCount", i64 1000}43!8 = !{!"NumCounts", i64 3}44!9 = !{!"NumFunctions", i64 3}45!10 = !{!"DetailedSummary", !11}46!11 = !{!12, !13, !14}47!12 = !{i32 10000, i64 100, i32 1}48!13 = !{i32 999000, i64 100, i32 1}49!14 = !{i32 999999, i64 1, i32 2}50!15 = !{!"function_entry_count", i64 1}51!16 = !{!"function_entry_count", i64 1000}52