1*9880d681SAndroid Build Coastguard Worker; Test to check the callgraph in summary 2*9880d681SAndroid Build Coastguard Worker; RUN: opt -module-summary %s -o %t.o 3*9880d681SAndroid Build Coastguard Worker; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s 4*9880d681SAndroid Build Coastguard Worker; RUN: opt -module-summary %p/Inputs/thinlto-alias.ll -o %t2.o 5*9880d681SAndroid Build Coastguard Worker; RUN: llvm-lto -thinlto -o %t3 %t.o %t2.o 6*9880d681SAndroid Build Coastguard Worker; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker; CHECK: <GLOBALVAL_SUMMARY_BLOCK 9*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: <VERSION 10*9880d681SAndroid Build Coastguard Worker; See if the call to func is registered, using the expected callsite count 11*9880d681SAndroid Build Coastguard Worker; and value id matching the subsequent value symbol table. 12*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: <PERMODULE {{.*}} op4=[[FUNCID:[0-9]+]] op5=1/> 13*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK> 14*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: <VALUE_SYMTAB 15*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: <FNENTRY {{.*}} record string = 'main' 16*9880d681SAndroid Build Coastguard Worker; External function analias should have entry with value id FUNCID 17*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: <ENTRY {{.*}} op0=[[FUNCID]] {{.*}} record string = 'analias' 18*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: </VALUE_SYMTAB> 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Worker; COMBINED: <GLOBALVAL_SUMMARY_BLOCK 21*9880d681SAndroid Build Coastguard Worker; COMBINED-NEXT: <VERSION 22*9880d681SAndroid Build Coastguard Worker; See if the call to analias is registered, using the expected callsite count 23*9880d681SAndroid Build Coastguard Worker; and value id matching the subsequent value symbol table. 24*9880d681SAndroid Build Coastguard Worker; COMBINED-NEXT: <COMBINED {{.*}} op5=[[ALIASID:[0-9]+]] op6=1/> 25*9880d681SAndroid Build Coastguard Worker; Followed by the alias and aliasee 26*9880d681SAndroid Build Coastguard Worker; COMBINED-NEXT: <COMBINED {{.*}} 27*9880d681SAndroid Build Coastguard Worker; COMBINED-NEXT: <COMBINED_ALIAS {{.*}} op3=[[ALIASEEID:[0-9]+]] 28*9880d681SAndroid Build Coastguard Worker; COMBINED-NEXT: </GLOBALVAL_SUMMARY_BLOCK 29*9880d681SAndroid Build Coastguard Worker; COMBINED-NEXT: <VALUE_SYMTAB 30*9880d681SAndroid Build Coastguard Worker; Entry for function func should have entry with value id ALIASID 31*9880d681SAndroid Build Coastguard Worker; COMBINED-NEXT: <COMBINED_ENTRY {{.*}} op0=[[ALIASID]] op1=-5751648690987223394/> 32*9880d681SAndroid Build Coastguard Worker; COMBINED-NEXT: <COMBINED 33*9880d681SAndroid Build Coastguard Worker; COMBINED-NEXT: <COMBINED_ENTRY {{.*}} op0=[[ALIASEEID]] op1=-1039159065113703048/> 34*9880d681SAndroid Build Coastguard Worker; COMBINED-NEXT: </VALUE_SYMTAB> 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Worker; ModuleID = 'thinlto-function-summary-callgraph.ll' 37*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 38*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-unknown-linux-gnu" 39*9880d681SAndroid Build Coastguard Worker 40*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind uwtable 41*9880d681SAndroid Build Coastguard Workerdefine i32 @main() { 42*9880d681SAndroid Build Coastguard Workerentry: 43*9880d681SAndroid Build Coastguard Worker call void (...) @analias() 44*9880d681SAndroid Build Coastguard Worker ret i32 0 45*9880d681SAndroid Build Coastguard Worker} 46*9880d681SAndroid Build Coastguard Worker 47*9880d681SAndroid Build Coastguard Workerdeclare void @analias(...) 48