brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.5 KiB · 7deb2d8 Raw
64 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; RUN: opt -module-summary %p/Inputs/thinlto-alias.ll -o %t2.o5; RUN: llvm-dis -o - %t2.o | FileCheck %s --check-prefix=DIS6; Round trip it through llvm-as7; RUN: llvm-dis -o - %t2.o | llvm-as -o - | llvm-dis -o - | FileCheck %s --check-prefix=DIS8; RUN: llvm-lto -thinlto -o %t3 %t.o %t2.o9; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED10; RUN: llvm-dis -o - %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED-DIS11; Round trip it through llvm-as12; RUN: llvm-dis -o - %t3.thinlto.bc | llvm-as -o - | llvm-dis -o - | FileCheck %s --check-prefix=COMBINED-DIS13 14; CHECK: <SOURCE_FILENAME15; "main"16; CHECK-NEXT: <FUNCTION op0=0 op1=417; "analias"18; CHECK-NEXT: <FUNCTION op0=4 op1=719; CHECK:       <GLOBALVAL_SUMMARY_BLOCK20; CHECK-NEXT:    <VERSION21; CHECK-NEXT:    <FLAGS22; See if the call to func is registered.23; The value id 1 matches the second FUNCTION record above.24; CHECK-NEXT:    <PERMODULE_PROFILE {{.*}} op7=125; CHECK-NEXT:  </GLOBALVAL_SUMMARY_BLOCK>26 27; CHECK: <STRTAB_BLOCK28; CHECK-NEXT: blob data = 'mainanalias{{.*}}'29 30; COMBINED:       <GLOBALVAL_SUMMARY_BLOCK31; COMBINED-NEXT:    <VERSION32; COMBINED-NEXT:    <FLAGS33; See if the call to analias is registered, using the expected value id.34; COMBINED-NEXT:    <VALUE_GUID {{.*}} op0=[[ALIASID:[0-9]+]] op1=2955807229 op2=886945438/>35; COMBINED-NEXT:    <VALUE_GUID36; COMBINED-NEXT:    <VALUE_GUID {{.*}} op0=[[ALIASEEID:[0-9]+]] op1=4053019222 op2=46484856/>37; COMBINED-NEXT:    <COMBINED_PROFILE {{.*}} op9=[[ALIASID]]38; COMBINED-NEXT:    <COMBINED_PROFILE {{.*}}39; COMBINED-NEXT:    <COMBINED_ALIAS  {{.*}} op3=[[ALIASEEID]]40; COMBINED-NEXT:  </GLOBALVAL_SUMMARY_BLOCK41 42; ModuleID = 'thinlto-function-summary-callgraph.ll'43target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"44target triple = "x86_64-unknown-linux-gnu"45 46; Function Attrs: nounwind uwtable47define i32 @main() {48entry:49    call void (...) @analias()50    ret i32 051}52 53declare void @analias(...)54 55; DIS: ^0 = module: (path: "{{.*}}", hash: (0, 0, 0, 0, 0))56; DIS: ^1 = gv: (name: "analias", summaries: (alias: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0, importType: definition), aliasee: ^2))) ; guid = 1269509538272232822257; DIS: ^2 = gv: (name: "aliasee", summaries: (function: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0, importType: definition), insts: 1))) ; guid = 1740758500859584856858 59; COMBINED-DIS: ^0 = module: (path: "{{.*}}thinlto-alias.ll.tmp.o", hash: (0, 0, 0, 0, 0))60; COMBINED-DIS: ^1 = module: (path: "{{.*}}thinlto-alias.ll.tmp2.o", hash: (0, 0, 0, 0, 0))61; COMBINED-DIS: ^2 = gv: (guid: 12695095382722328222, summaries: (alias: (module: ^1, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0, importType: definition), aliasee: ^4)))62; COMBINED-DIS: ^3 = gv: (guid: 15822663052811949562, summaries: (function: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0, importType: definition), insts: 2, calls: ((callee: ^2)))))63; COMBINED-DIS: ^4 = gv: (guid: 17407585008595848568, summaries: (function: (module: ^1, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0, importType: definition), insts: 1)))64