brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · becbc4a Raw
57 lines · plain
1; Test to check the callgraph in summary2; RUN: opt -module-summary %s -o %t.o3; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s4 5; RUN: opt -module-summary %p/Inputs/thinlto-function-summary-callgraph.ll -o %t2.o6; RUN: llvm-lto -thinlto -o %t3 %t.o %t2.o7; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED8 9; Check parsing for old summary versions generated from this file.10; RUN: llvm-lto -thinlto-index-stats %p/Inputs/thinlto-function-summary-callgraph.1.bc  | FileCheck %s --check-prefix=OLD11; RUN: llvm-lto -thinlto-index-stats %p/Inputs/thinlto-function-summary-callgraph-combined.1.bc  | FileCheck %s --check-prefix=OLD-COMBINED12 13; CHECK: <SOURCE_FILENAME14; CHECK-NEXT: <GLOBALVAR15; CHECK-NEXT: <FUNCTION16; "func"17; CHECK-NEXT: <FUNCTION op0=17 op1=418; CHECK:       <GLOBALVAL_SUMMARY_BLOCK19; CHECK-NEXT:    <VERSION20; CHECK-NEXT:    <FLAGS21; See if the call to func is registered22; CHECK-NEXT:    <PERMODULE_PROFILE {{.*}} op4=123; CHECK-NEXT:  </GLOBALVAL_SUMMARY_BLOCK>24; CHECK: <STRTAB_BLOCK25; CHECK-NEXT: blob data = 'undefinedglobmainfunc{{.*}}'26 27 28; COMBINED:       <GLOBALVAL_SUMMARY_BLOCK29; COMBINED-NEXT:    <VERSION30; COMBINED-NEXT:    <FLAGS31; Only 2 VALUE_GUID since reference to undefinedglob should not be included in32; combined index.33; COMBINED-NEXT:    <VALUE_GUID {{.*}} op0=[[FUNCID:[0-9]+]] op1=1697143370 op2=1603531901/>34; COMBINED-NEXT:    <VALUE_GUID35; COMBINED-NEXT:    <COMBINED_PROFILE36; See if the call to func is registered.37; COMBINED-NEXT:    <COMBINED_PROFILE {{.*}} op9=[[FUNCID]]38; COMBINED-NEXT:  </GLOBALVAL_SUMMARY_BLOCK>39 40; ModuleID = 'thinlto-function-summary-callgraph.ll'41target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"42target triple = "x86_64-unknown-linux-gnu"43 44; Function Attrs: nounwind uwtable45define i32 @main() #0 {46entry:47    call void (...) @func()48    %u = load i32, i32* @undefinedglob49    ret i32 %u50}51 52declare void @func(...) #153@undefinedglob = external global i3254 55; OLD: Index {{.*}} contains 1 nodes (1 functions, 0 alias, 0 globals) and 1 edges (0 refs and 1 calls)56; OLD-COMBINED: Index {{.*}} contains 2 nodes (2 functions, 0 alias, 0 globals) and 1 edges (0 refs and 1 calls)57