1; Test to check the callgraph in summary 2; RUN: opt -module-summary %s -o %t.o 3; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s 4; RUN: opt -module-summary %p/Inputs/thinlto-alias.ll -o %t2.o 5; RUN: llvm-lto -thinlto -o %t3 %t.o %t2.o 6; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED 7 8; CHECK: <SOURCE_FILENAME 9; "main" 10; CHECK-NEXT: <FUNCTION op0=0 op1=4 11; "analias" 12; CHECK-NEXT: <FUNCTION op0=4 op1=7 13; CHECK: <GLOBALVAL_SUMMARY_BLOCK 14; CHECK-NEXT: <VERSION 15; See if the call to func is registered. 16; The value id 1 matches the second FUNCTION record above. 17; CHECK-NEXT: <PERMODULE {{.*}} op5=1/> 18; CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK> 19 20; CHECK: <STRTAB_BLOCK 21; CHECK-NEXT: blob data = 'mainanalias{{.*}}' 22 23; COMBINED: <GLOBALVAL_SUMMARY_BLOCK 24; COMBINED-NEXT: <VERSION 25; COMBINED-NEXT: <FLAGS 26; See if the call to analias is registered, using the expected value id. 27; COMBINED-NEXT: <VALUE_GUID op0=[[ALIASID:[0-9]+]] op1=-5751648690987223394/> 28; COMBINED-NEXT: <VALUE_GUID 29; COMBINED-NEXT: <VALUE_GUID op0=[[ALIASEEID:[0-9]+]] op1=-1039159065113703048/> 30; COMBINED-NEXT: <COMBINED {{.*}} op6=[[ALIASID]]/> 31; COMBINED-NEXT: <COMBINED {{.*}} 32; COMBINED-NEXT: <COMBINED_ALIAS {{.*}} op3=[[ALIASEEID]] 33; COMBINED-NEXT: </GLOBALVAL_SUMMARY_BLOCK 34 35; ModuleID = 'thinlto-function-summary-callgraph.ll' 36target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 37target triple = "x86_64-unknown-linux-gnu" 38 39; Function Attrs: nounwind uwtable 40define i32 @main() { 41entry: 42 call void (...) @analias() 43 ret i32 0 44} 45 46declare void @analias(...) 47