File: module_summary_graph_traits.ll

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (58 lines) | stat: -rw-r--r-- 1,433 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
; RUN: opt -module-summary %s -o %t1.bc
; RUN: llvm-lto2 run -print-summary-global-ids -dump-thin-cg-sccs %t1.bc -o %t.index.bc \
; RUN:     -r %t1.bc,external,px -r %t1.bc,l2,pl -r %t1.bc,l1,pl \
; RUN:     -r %t1.bc,simple,pl -r %t1.bc,root,pl 2>&1 | FileCheck %s

; CHECK: 5224464028922159466{{.*}} is external
; CHECK: 765152853862302398{{.*}} is l2
; CHECK: 17000277804057984823{{.*}} is l1
; CHECK: 15440740835768581517{{.*}} is simple
; CHECK: 5800840261926955363{{.*}} is root

; CHECK: SCC (2 nodes) {
; CHECK-NEXT: {{^}} 17000277804057984823 (has cycle)
; CHECK-NEXT: {{^}} 765152853862302398 (has cycle)
; CHECK-NEXT: }

; CHECK: SCC (1 node) {
; CHECK-NEXT: {{^}} 15440740835768581517{{$}}
; CHECK-NEXT: }

; CHECK: SCC (1 node) {
; CHECK-NEXT: External 5224464028922159466{{$}}
; CHECK-NEXT: }

; CHECK: SCC (1 node) {
; CHECK-NEXT: {{^}} 5800840261926955363{{$}}
; CHECK-NEXT: }

; Dummy call graph root that points at all roots of the callgraph.
; CHECK: SCC (1 node) {
; CHECK-NEXT: {{^}} 0{{$}}
; CHECK-NEXT: }

target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

declare void @external()

define void @l2() {
  call void @l1()
  ret void
}

define void @l1() {
  call void @l2()
  ret void
}

define i32 @simple() {
  ret i32 23
}

define void @root() {
  call void @l1()
  call i32 @simple()
  call void @external()
  ret void
}