File: frame-26.mir

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (198 lines) | stat: -rw-r--r-- 8,521 bytes parent folder | download | duplicates (7)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# RUN: llc -mtriple=s390x-linux-gnu -start-before=prologepilog %s -o - -print-after=prologepilog \
# RUN:  -verify-machineinstrs 2>&1 | FileCheck %s
#
# Test that R6 when used for an argument is modelled as being live throughout
# the function when not saved in the prologue..

# CHECK:      # *** IR Dump After Prologue/Epilogue Insertion & Frame Finalization (prologepilog) ***:
# CHECK-NEXT: # Machine code for function fun0:
# CHECK-LABEL: bb.0:
# CHECK: liveins:{{.*}} $r6d
# CHECK: STMG killed $r7d, killed $r15d
# CHECK: STG renamable $r6d
# CHECK: End machine code for function fun0.


--- |

  @g_181 = external dso_local global i32, align 4
  @g_1390 = external dso_local constant ptr, align 8

  define internal i8 @fun0(i8 %arg, i8 %arg1, i32 %arg2, i8 %arg3, ptr %arg4, float %F0, float %F1) #0 {
    ret i8 0
  }

  ; Same function but in a single block which will make the verifier complain
  ; if R6 is killed by the original store before the point where the
  ; RegScavenger inserts its (killing) store of R6.
  define internal i8 @fun1(i8 %arg, i8 %arg1, i32 %arg2, i8 %arg3, ptr %arg4) #0 {
    ret i8 0
  }

  attributes #0 = { "frame-pointer"="all" }

...
---
name:            fun0
alignment:       16
tracksRegLiveness: true
liveins:
  - { reg: '$r6d' }
  - { reg: '$f0s' }
  - { reg: '$f2s' }
frameInfo:
  maxAlignment:    8
stack:
  - { id: 0, size: 96, alignment: 8 }
  - { id: 1, size: 1960, alignment: 8 }
  - { id: 2, size: 8, alignment: 8 }
  - { id: 3, size: 320, alignment: 8 }
  - { id: 4, size: 4, alignment: 4 }
  - { id: 5, size: 8, alignment: 8 }
  - { id: 6, size: 8, alignment: 8 }
  - { id: 7, size: 4, alignment: 4 }
  - { id: 8, size: 8, alignment: 8 }
  - { id: 9, size: 4, alignment: 4 }
  - { id: 10, size: 8, alignment: 8 }
  - { id: 11, size: 8, alignment: 8 }
  - { id: 12, size: 8, alignment: 8 }
  - { id: 13, size: 8, alignment: 8 }
  - { id: 14, size: 24, alignment: 4 }
  - { id: 15, size: 4, alignment: 4 }
  - { id: 16, size: 1792, alignment: 8 }
  - { id: 17, size: 8, alignment: 8 }
  - { id: 18, size: 8, alignment: 8 }
  - { id: 19, size: 8, alignment: 8 }
  - { id: 20, size: 1, alignment: 2 }
  - { id: 21, size: 672, alignment: 8 }
  - { id: 22, size: 4, alignment: 4 }
  - { id: 23, size: 4, alignment: 4 }
  - { id: 24, size: 4, alignment: 4 }
  - { id: 25, size: 64, alignment: 8 }
machineFunctionInfo: {}
body:             |
  bb.0:
    liveins: $f0s, $f2s, $r6d

    STG killed renamable $r6d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    renamable $r0d = LARL @g_181
    nofpexcept CEBR renamable $f0s, renamable $f2s, implicit-def $cc, implicit $fpc
    STG renamable $r0d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    BRC 15, 4, %bb.2, implicit killed $cc

  bb.1:
    liveins: $f2s, $r0d

    renamable $f0s = COPY killed renamable $f2s

  bb.2:
    liveins: $f0s, $r0d

    STE killed renamable $f0s, undef renamable $r1d, 0, $noreg :: (volatile store (s32) into `ptr undef`)
    renamable $r1d = nuw LA %stack.0, 16, $noreg
    renamable $r2d = nuw LA %stack.0, 24, $noreg
    renamable $r3d = LA %stack.0, 40, $noreg
    renamable $r4d = LARL @g_1390
    STG renamable $r4d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    renamable $r5d = nuw LA %stack.0, 48, $noreg
    renamable $r14d = LA %stack.0, 72, $noreg
    renamable $r13d = LA %stack.0, 80, $noreg
    renamable $r12d = LA %stack.0, 56, $noreg
    renamable $r10d = LA %stack.0, 0, $noreg
    STG renamable $r10d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    renamable $r9d = LA %stack.0, 64, $noreg
    renamable $r8d = LA %stack.0, 88, $noreg
    renamable $r7d = nuw LA %stack.0, 8, $noreg
    MVGHI %stack.1, 904, 0
    STG killed renamable $r9d, $noreg, 0, $noreg :: (store (s64) into `ptr null`)
    STG killed renamable $r3d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r14d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r7d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r1d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r4d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r2d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r5d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r8d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r12d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r13d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r10d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    $r2l = LHI 0
    STG killed renamable $r0d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    Return implicit $r2l

...
---
name:            fun1
alignment:       16
tracksRegLiveness: true
liveins:
  - { reg: '$r6d' }
frameInfo:
  maxAlignment:    8
stack:
  - { id: 0, size: 96, alignment: 8 }
  - { id: 1, size: 1960, alignment: 8 }
  - { id: 2, size: 8, alignment: 8 }
  - { id: 3, size: 320, alignment: 8 }
  - { id: 4, size: 4, alignment: 4 }
  - { id: 5, size: 8, alignment: 8 }
  - { id: 6, size: 8, alignment: 8 }
  - { id: 7, size: 4, alignment: 4 }
  - { id: 8, size: 8, alignment: 8 }
  - { id: 9, size: 4, alignment: 4 }
  - { id: 10, size: 8, alignment: 8 }
  - { id: 11, size: 8, alignment: 8 }
  - { id: 12, size: 8, alignment: 8 }
  - { id: 13, size: 8, alignment: 8 }
  - { id: 14, size: 24, alignment: 4 }
  - { id: 15, size: 4, alignment: 4 }
  - { id: 16, size: 1792, alignment: 8 }
  - { id: 17, size: 8, alignment: 8 }
  - { id: 18, size: 8, alignment: 8 }
  - { id: 19, size: 8, alignment: 8 }
  - { id: 20, size: 1, alignment: 2 }
  - { id: 21, size: 672, alignment: 8 }
  - { id: 22, size: 4, alignment: 4 }
  - { id: 23, size: 4, alignment: 4 }
  - { id: 24, size: 4, alignment: 4 }
  - { id: 25, size: 64, alignment: 8 }
machineFunctionInfo: {}
body:             |
  bb.0:
    liveins: $r6d

    STG killed renamable $r6d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    renamable $r0d = LARL @g_181
    STG renamable $r0d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    renamable $r1d = nuw LA %stack.0, 16, $noreg
    renamable $r2d = nuw LA %stack.0, 24, $noreg
    renamable $r3d = LA %stack.0, 40, $noreg
    renamable $r4d = LARL @g_1390
    STG renamable $r4d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    renamable $r5d = nuw LA %stack.0, 48, $noreg
    renamable $r14d = LA %stack.0, 72, $noreg
    renamable $r13d = LA %stack.0, 80, $noreg
    renamable $r12d = LA %stack.0, 56, $noreg
    renamable $r10d = LA %stack.0, 0, $noreg
    STG renamable $r10d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    renamable $r9d = LA %stack.0, 64, $noreg
    renamable $r8d = LA %stack.0, 88, $noreg
    renamable $r7d = nuw LA %stack.0, 8, $noreg
    MVGHI %stack.1, 904, 0
    STG killed renamable $r9d, $noreg, 0, $noreg :: (store (s64) into `ptr null`)
    STG killed renamable $r3d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r14d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r7d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r1d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r4d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r2d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r5d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r8d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r12d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r13d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    STG killed renamable $r10d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    $r2l = LHI 0
    STG killed renamable $r0d, undef renamable $r1d, 0, $noreg :: (store (s64) into `ptr undef`)
    Return implicit $r2l

...