File: icf-options.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-- 2,366 bytes parent folder | download | duplicates (15)
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
# REQUIRES: x86
# RUN: rm -rf %t; mkdir %t

# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/main.o
# RUN: %lld -lSystem --icf=all -o %t/all %t/main.o 2>&1 \
# RUN:     | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty
# RUN: %lld -lSystem --icf=none -o %t/none %t/main.o 2>&1 \
# RUN:     | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty
# RUN: %lld -lSystem -no_deduplicate -o %t/no_dedup %t/main.o 2>&1 \
# RUN:     | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty
# RUN: %lld -lSystem --icf=safe -o %t/safe %t/main.o 2>&1 \
# RUN:     | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty
# RUN: not %lld -lSystem --icf=junk -o %t/junk %t/main.o 2>&1 \
# RUN:     | FileCheck %s --check-prefix=DIAG-JUNK
# RUN: %lld -lSystem --icf=all -no_deduplicate -o %t/none2 %t/main.o 2>&1 \
# RUN:     | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty
# RUN: %lld -lSystem -no_deduplicate --icf=all -o %t/all2 %t/main.o 2>&1 \
# RUN:     | FileCheck %s --check-prefix=DIAG-EMPTY --allow-empty

# DIAG-EMPTY-NOT: {{.}}
# DIAG-JUNK: unknown --icf=OPTION `junk', defaulting to `none'

# RUN: llvm-objdump -d --syms %t/all | FileCheck %s --check-prefix=FOLD
# RUN: llvm-objdump -d --syms %t/all2 | FileCheck %s --check-prefix=FOLD
# RUN: llvm-objdump -d --syms %t/none | FileCheck %s --check-prefix=NOOP
# RUN: llvm-objdump -d --syms %t/none2 | FileCheck %s --check-prefix=NOOP
# RUN: llvm-objdump -d --syms %t/no_dedup | FileCheck %s --check-prefix=NOOP

# FOLD-LABEL: SYMBOL TABLE:
# FOLD:       [[#%x,MAIN:]] g   F __TEXT,__text _main
# FOLD:       [[#%x,F:]]    g   F __TEXT,__text _f1
# FOLD:       [[#%x,F]]     g   F __TEXT,__text _f2

# FOLD-LABEL: Disassembly of section __TEXT,__text:
# FOLD:       [[#%x,MAIN]] <_main>:
# FOLD-NEXT:  callq 0x[[#%x,F]]  <_f2>
# FOLD-NEXT:  callq 0x[[#%x,F]]  <_f2>

# NOOP-LABEL: SYMBOL TABLE:
# NOOP:       [[#%x,MAIN:]] g   F __TEXT,__text _main
# NOOP:       [[#%x,F1:]]   g   F __TEXT,__text _f1
# NOOP:       [[#%x,F2:]]   g   F __TEXT,__text _f2

# NOOP-LABEL: Disassembly of section __TEXT,__text:
# NOOP:       [[#%x,MAIN]] <_main>:
# NOOP-NEXT:  callq 0x[[#%x,F1]]  <_f1>
# NOOP-NEXT:  callq 0x[[#%x,F2]]  <_f2>

.subsections_via_symbols
.text
.p2align 2

.globl _f1
_f1:
  movl $0, %eax
  ret

.globl _f2
_f2:
  movl $0, %eax
  ret

.globl _main
_main:
  callq _f1
  callq _f2
  ret