File: initial.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (79 lines) | stat: -rw-r--r-- 1,862 bytes parent folder | download | duplicates (14)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
; RUN: opt -passes=synthetic-counts-propagation -S < %s | FileCheck %s

; CHECK-LABEL: define void @foo()
; CHECK: !prof ![[COUNT1:[0-9]+]]
define void @foo() {
  ret void
}

; CHECK-LABEL: define void @foo_inline() #0
; CHECK: !prof ![[COUNT2:[0-9]+]]
define void @foo_inline() #0 {
  ret void
}

; CHECK-LABEL: define void @foo_always_inline() #1
; CHECK: !prof ![[COUNT2]]
define void @foo_always_inline() #1 {
  ret void
}

; CHECK-LABEL: define void @foo_cold() #2
; CHECK: !prof ![[COUNT3:[0-9]+]]
define void @foo_cold() #2 {
  ret void
}

; CHECK-LABEL: define void @foo_noinline() #3
; CHECK: !prof ![[COUNT3]]
define void @foo_noinline() #3 {
  ret void
}

; CHECK-LABEL: define internal void @foo_local()
; CHECK: !prof ![[COUNT4:[0-9]+]]
define internal void @foo_local() {
  ret void
}

; CHECK-LABEL: define internal void @foo_local_escaped()
; CHECK: !prof ![[COUNT1]]
define internal void @foo_local_escaped() {
  ret void
}

declare void @ext(void ()*)

define void @bar() {
  call void @ext(void ()* nonnull @foo_local_escaped)
  ret void
}

; CHECK-LABEL: define internal void @foo_local_inline() #0
; CHECK: !prof ![[COUNT2]]
define internal void @foo_local_inline() #0 {
  ret void
}

; CHECK-LABEL: define internal void @foo_local_cold() #2
; CHECK: !prof ![[COUNT4]]
define internal void @foo_local_cold() #2 {
  ret void
}

; CHECK-LABEL: define linkonce void @foo_linkonce()
; CHECK: !prof ![[COUNT1]]
define linkonce void @foo_linkonce() {
  ret void
}

; CHECK: ![[COUNT1]] = !{!"synthetic_function_entry_count", i64 10}
; CHECK: ![[COUNT2]] = !{!"synthetic_function_entry_count", i64 15}
; CHECK: ![[COUNT3]] = !{!"synthetic_function_entry_count", i64 5}
; CHECK: ![[COUNT4]] = !{!"synthetic_function_entry_count", i64 0}

attributes #0 = {inlinehint}
attributes #1 = {alwaysinline}
attributes #2 = {cold}
attributes #3 = {noinline}