File: lto-name-match.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (67 lines) | stat: -rw-r--r-- 1,736 bytes parent folder | download | duplicates (4)
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
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
# RUN: link_fdata %s %t.o %t.fdata
# RUN: llvm-strip --strip-unneeded %t.o
# RUN: %clang %cflags %t.o -o %t.exe
# RUN: llvm-bolt %t.exe --data %t.fdata -o /dev/null | FileCheck %s

## Check that profile is correctly matched by functions with variable suffixes.
## E.g., LTO-generated name foo.llvm.123 should match foo.llvm.*.

# CHECK: 6 out of {{.*}} functions in the binary {{.*}} have non-empty execution profile
# CHECK-NOT: profile for {{.*}} objects was ignored

	.globl _start
_start:

LL_start_0:
# FDATA: 1 _start #LL_start_0# 1 foo.llvm.321 0 0 1
  call foo.llvm.123

LL_start_1:
# FDATA: 1 _start #LL_start_1# 1 foo.constprop.321 0 0 1
  call foo.constprop.123

LL_start_2:
# FDATA: 1 _start #LL_start_2# 1 foo.lto_priv.321 0 0 1
  call foo.lto_priv.123

LL_start_3:
# FDATA: 1 _start #LL_start_3# 1 foo.__uniq.321 0 0 1
  call foo.__uniq.123

LL_start_4:
# FDATA: 1 _start #LL_start_4# 1 foo.__uniq.654.llvm.321 0 0 1
  call foo.__uniq.456.llvm.123

  call exit
  .size _start, .-_start

  .globl foo.llvm.123
  .type foo.llvm.123,@function
foo.llvm.123:
  ret
  .size foo.llvm.123, .-foo.llvm.123

  .globl foo.constprop.123
  .type foo.constprop.123,@function
foo.constprop.123:
  ret
  .size foo.constprop.123, .-foo.constprop.123

  .globl foo.lto_priv.123
  .type foo.lto_priv.123,@function
foo.lto_priv.123:
  ret
  .size foo.lto_priv.123, .-foo.lto_priv.123

  .globl foo.__uniq.123
  .type foo.__uniq.123,@function
foo.__uniq.123:
  ret
  .size foo.__uniq.123, .-foo.__uniq.123

  .globl foo.__uniq.456.llvm.123
  .type foo.__uniq.456.llvm.123,@function
foo.__uniq.456.llvm.123:
  ret
  .size foo.__uniq.456.llvm.123, .-foo.__uniq.456.llvm.123