File: machine-outliner-overlap.mir

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 (84 lines) | stat: -rw-r--r-- 3,141 bytes parent folder | download | duplicates (3)
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
80
81
82
83
84
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --include-generated-funcs
# RUN: llc %s -mtriple aarch64 -debug-only=machine-outliner -run-pass=machine-outliner -o - 2>&1 | FileCheck %s
# REQUIRES: asserts

# CHECK: *** Discarding overlapping candidates ***
# CHECK-NEXT:Searching for overlaps in all repeated sequences...
# CHECK-DAG:  Sequence length: 7
# CHECK-NEXT:    Candidates discarded: 0
# CHECK-NEXT:    Candidates kept: 2
# CHECK-DAG:  Sequence length: 8
# CHECK-NEXT:    .. DISCARD candidate @ [5, 12]; overlaps with candidate @ [12, 19]
# CHECK-NEXT:    Candidates discarded: 1
# CHECK-NEXT:    Candidates kept: 1
# CHECK-DAG:   Sequence length: 9
# CHECK-NEXT:    .. DISCARD candidate @ [4, 12]; overlaps with candidate @ [11, 19]
# CHECK-NEXT:    Candidates discarded: 1
# CHECK-NEXT:    Candidates kept: 1
# CHECK-DAG:   Sequence length: 10
# CHECK-NEXT:    .. DISCARD candidate @ [3, 12]; overlaps with candidate @ [10, 19]
# CHECK-NEXT:    Candidates discarded: 1
# CHECK-NEXT:    Candidates kept: 1
# CHECK-DAG:   Sequence length: 11
# CHECK-NEXT:    .. DISCARD candidate @ [2, 12]; overlaps with candidate @ [9, 19]
# CHECK-NEXT:    Candidates discarded: 1
# CHECK-NEXT:    Candidates kept: 1
# CHECK-DAG:   Sequence length: 12
# CHECK-NEXT:    .. DISCARD candidate @ [1, 12]; overlaps with candidate @ [8, 19]
# CHECK-NEXT:    Candidates discarded: 1
# CHECK-NEXT:    Candidates kept: 1
# CHECK-DAG:   Sequence length: 13
# CHECK-NEXT:    .. DISCARD candidate @ [0, 12]; overlaps with candidate @ [7, 19]
# CHECK-NEXT:    Candidates discarded: 1
# CHECK-NEXT:    Candidates kept: 1

...
---
name:           overlap
tracksRegLiveness: true
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    liveins: $x0, $x9
    ; CHECK-LABEL: name: overlap
    ; CHECK: liveins: $x0, $x9
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: $x9 = ADDXri $x9, 16, 0
    ; CHECK-NEXT: BL @OUTLINED_FUNCTION_0, implicit-def $lr, implicit $sp, implicit-def $lr, implicit-def $x8, implicit-def $x9, implicit $sp, implicit $x0, implicit $x9
    ; CHECK-NEXT: BL @OUTLINED_FUNCTION_0, implicit-def $lr, implicit $sp, implicit-def $lr, implicit-def $x8, implicit-def $x9, implicit $sp, implicit $x0, implicit $x9
    ; CHECK-NEXT: RET undef $x9

    ; fixme: outline!
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0

    $x8 = ADDXri $x0, 3, 0

    ; outline
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0

    $x8 = ADDXri $x0, 3, 0

    ; outline
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    $x9 = ADDXri $x9, 16, 0
    RET undef $x9