brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 6c5c667 Raw
59 lines · plain
1; RUN: opt -module-summary %s -o %t1.bc2; RUN: llvm-lto2 run -print-summary-global-ids -dump-thin-cg-sccs %t1.bc -o %t.index.bc \3; RUN:     -r %t1.bc,external,px -r %t1.bc,l2,pl -r %t1.bc,l1,pl \4; RUN:     -r %t1.bc,simple,pl -r %t1.bc,root,pl 2>&1 | FileCheck %s5 6; CHECK: 5224464028922159466{{.*}} is external7; CHECK: 765152853862302398{{.*}} is l28; CHECK: 17000277804057984823{{.*}} is l19; CHECK: 15440740835768581517{{.*}} is simple10; CHECK: 5800840261926955363{{.*}} is root11 12; CHECK: SCC (2 nodes) {13; CHECK-NEXT: {{^}} 17000277804057984823 (has cycle)14; CHECK-NEXT: {{^}} 765152853862302398 (has cycle)15; CHECK-NEXT: }16 17; CHECK: SCC (1 node) {18; CHECK-NEXT: {{^}} 15440740835768581517{{$}}19; CHECK-NEXT: }20 21; CHECK: SCC (1 node) {22; CHECK-NEXT: External 5224464028922159466{{$}}23; CHECK-NEXT: }24 25; CHECK: SCC (1 node) {26; CHECK-NEXT: {{^}} 5800840261926955363{{$}}27; CHECK-NEXT: }28 29; Dummy call graph root that points at all roots of the callgraph.30; CHECK: SCC (1 node) {31; CHECK-NEXT: {{^}} 0{{$}}32; CHECK-NEXT: }33 34target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"35target triple = "x86_64-unknown-linux-gnu"36 37declare void @external()38 39define void @l2() {40  call void @l1()41  ret void42}43 44define void @l1() {45  call void @l2()46  ret void47}48 49define i32 @simple() {50  ret i32 2351}52 53define void @root() {54  call void @l1()55  call i32 @simple()56  call void @external()57  ret void58}59