File: split-random.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 (50 lines) | stat: -rw-r--r-- 1,316 bytes parent folder | download | duplicates (5)
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
# Test random function splitting option

# RUN: llvm-mc --filetype=obj --triple x86_64-unknown-unknown %s -o %t.o
# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
# RUN: llvm-bolt %t.exe -o %t.random2 --split-functions \
# RUN:         --split-strategy=random2 --print-finalized \
# RUN:         --print-only=two_block --bolt-seed=7 2>&1 | \
# RUN:     FileCheck %s
# RUN: llvm-bolt %t.exe -o %t.randomN --split-functions \
# RUN:         --split-strategy=randomN --print-finalized \
# RUN:         --print-only=two_block --bolt-seed=7 2>&1 | \
# RUN:     FileCheck %s

# CHECK: Binary Function "two_block"
# CHECK:   IsSplit     :
# CHECK-SAME: {{ 1$}}

        .text
        .globl  single_block
        .type   single_block, @function
single_block:
        ret
        .size   single_block, .-single_block


        .globl  two_block
        .type   two_block, @function
two_block:
.L3:
        subl    $1, %edi
        testl   %edi, %edi
        jg      .L3
        jmp     .L4
.L4:
        subl    $1, %edi
        subl    $1, %edi
        subl    $1, %edi
        subl    $1, %edi
        ret
        .size   two_block, .-two_block


        .globl  main
        .type   main, @function
main:
        call    single_block
        movl    $10, %edi
        call    two_block
        ret
        .size   main, .-main