brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · d4a3f9b Raw
74 lines · plain
1;; Test that we get hinted size reporting for just the subset of MIBs that2;; contain context size info in the metadata.3 4;; Generate the bitcode including ThinLTO summary. Specify5;; -memprof-min-percent-max-cold-size (value doesn't matter) to indicate to6;; the bitcode writer that it should expect and optimize for partial context7;; size info.8; RUN: opt -thinlto-bc -memprof-min-percent-max-cold-size=50 %s >%t.o9 10; RUN: llvm-lto2 run %t.o -enable-memprof-context-disambiguation \11; RUN:	-supports-hot-cold-new \12; RUN:	-r=%t.o,main,plx \13; RUN:	-r=%t.o,_Znam, \14; RUN:	-memprof-report-hinted-sizes \15; RUN:	-o %t.out 2>&1 | FileCheck %s --check-prefix=SIZES16 17;; We should only get these two messages from -memprof-report-hinted-sizes18;; as they are the only MIBs with recorded context size info.19; SIZES-NOT: full allocation context20; SIZES: Cold full allocation context 456 with total size 200 is Cold after cloning (context id 2)21; SIZES: Cold full allocation context 789 with total size 300 is Cold after cloning (context id 2)22; SIZES-NOT: full allocation context23 24source_filename = "memprof-report-hinted-partial.ll"25target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"26target triple = "x86_64-unknown-linux-gnu"27 28define i32 @main() #0 {29entry:30  %call = call ptr @_Z3foov(), !callsite !031  %call1 = call ptr @_Z3foov(), !callsite !132  ret i32 033}34 35define internal ptr @_Z3barv() #0 {36entry:37  %call = call ptr @_Znam(i64 0), !memprof !2, !callsite !738  ret ptr null39}40 41declare ptr @_Znam(i64)42 43define internal ptr @_Z3bazv() #0 {44entry:45  %call = call ptr @_Z3barv(), !callsite !846  ret ptr null47}48 49define internal ptr @_Z3foov() #0 {50entry:51  %call = call ptr @_Z3bazv(), !callsite !952  ret ptr null53}54 55; uselistorder directives56uselistorder ptr @_Z3foov, { 1, 0 }57 58attributes #0 = { noinline optnone }59 60!0 = !{i64 8632435727821051414}61!1 = !{i64 -3421689549917153178}62!2 = !{!3, !5, !13}63!3 = !{!4, !"notcold"}64!4 = !{i64 9086428284934609951, i64 -5964873800580613432, i64 2732490490862098848, i64 8632435727821051414}65!5 = !{!6, !"cold", !11, !12}66!6 = !{i64 9086428284934609951, i64 -5964873800580613432, i64 2732490490862098848, i64 -3421689549917153178}67!7 = !{i64 9086428284934609951}68!8 = !{i64 -5964873800580613432}69!9 = !{i64 2732490490862098848}70!11 = !{i64 456, i64 200}71!12 = !{i64 789, i64 300}72!13 = !{!14, !"cold"}73!14 = !{i64 9086428284934609951, i64 12345}74