1
1
; Test remark output for stack-frame-layout
2
2
3
- ; ensure basic output works
4
- ; RUN: llc -mcpu=corei7 -O1 -pass-remarks-analysis=stack-frame-layout < %s 2>&1 >/dev/null | FileCheck %s
5
-
6
- ; check additional slots are displayed when stack is not optimized
7
- ; RUN: llc -mcpu=corei7 -O0 -pass-remarks-analysis=stack-frame-layout < %s 2>&1 >/dev/null | FileCheck %s --check-prefix=NO_COLORING
8
-
9
3
; check more complex cases
10
4
; RUN: llc %s -pass-remarks-analysis=stack-frame-layout -o /dev/null --march=x86 -mcpu=i386 2>&1 | FileCheck %s --check-prefix=BOTH --check-prefix=DEBUG
11
5
12
6
; check output without debug info
13
7
; RUN: opt %s -passes=strip -S | llc -pass-remarks-analysis=stack-frame-layout -o /dev/null --march=x86 -mcpu=i386 2>&1 | FileCheck %s --check-prefix=BOTH --check-prefix=STRIPPED
14
8
15
- target triple = "x86_64 -unknown-linux-gnu"
9
+ target triple = "i386 -unknown-linux-gnu"
16
10
17
11
@.str = private unnamed_addr constant [4 x i8 ] c "%s\0A\00 " , align 1
18
12
declare i32 @printf (ptr , ...)
19
13
20
- ; CHECK: Function: stackSizeWarning
21
- ; CHECK: Offset: [SP-88], Type: Variable, Align: 16, Size: 80
22
- ; CHECK: buffer @ frame-diags.c:30
23
- ; NO_COLORING: Offset: [SP-168], Type: Variable, Align: 16, Size: 80
24
- ; CHECK: buffer2 @ frame-diags.c:33
25
- define void @stackSizeWarning () {
26
- entry:
27
- %buffer = alloca [80 x i8 ], align 16
28
- %buffer2 = alloca [80 x i8 ], align 16
29
- call void @llvm.dbg.declare (metadata ptr %buffer , metadata !25 , metadata !DIExpression ()), !dbg !39
30
- call void @llvm.dbg.declare (metadata ptr %buffer2 , metadata !31 , metadata !DIExpression ()), !dbg !40
31
- ret void
32
- }
33
-
34
14
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
35
15
declare void @llvm.dbg.declare (metadata , metadata , metadata ) #0
36
16
@@ -208,7 +188,7 @@ entry:
208
188
}
209
189
210
190
; uselistorder directives
211
- uselistorder ptr @llvm.dbg.declare , { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 19 , 18 }
191
+ uselistorder ptr @llvm.dbg.declare , { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 17 , 16 }
212
192
213
193
attributes #0 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
214
194
attributes #1 = { "frame-pointer" ="all" }
@@ -222,19 +202,19 @@ attributes #2 = { ssp "stack-protector-buffer-size"="5" "frame-pointer"="all" }
222
202
!2 = distinct !DICompileUnit (language: DW_LANG_C99, file: !3 , isOptimized: false , runtimeVersion: 0 , emissionKind: FullDebug, retainedTypes: !4 , splitDebugInlining: false , nameTableKind: None)
223
203
!3 = !DIFile (filename: "dot.c" , directory: "" )
224
204
!4 = !{!5 , !6 , !10 , !13 }
225
- !5 = !DIDerivedType (tag: DW_TAG_pointer_type, baseType: null , size: 64 )
226
- !6 = !DIDerivedType (tag: DW_TAG_pointer_type, baseType: !7 , size: 64 )
227
- !7 = distinct !DICompositeType (tag: DW_TAG_structure_type, name: "Array" , file: !3 , line: 3 , size: 128 , elements: !8 )
205
+ !5 = !DIDerivedType (tag: DW_TAG_pointer_type, baseType: null , size: 32 )
206
+ !6 = !DIDerivedType (tag: DW_TAG_pointer_type, baseType: !7 , size: 32 )
207
+ !7 = distinct !DICompositeType (tag: DW_TAG_structure_type, name: "Array" , file: !3 , line: 3 , size: 64 , elements: !8 )
228
208
!8 = !{!9 , !12 }
229
- !9 = !DIDerivedType (tag: DW_TAG_member, name: "data" , scope: !7 , file: !3 , line: 4 , baseType: !10 , size: 64 )
230
- !10 = !DIDerivedType (tag: DW_TAG_pointer_type, baseType: !11 , size: 64 )
209
+ !9 = !DIDerivedType (tag: DW_TAG_member, name: "data" , scope: !7 , file: !3 , line: 4 , baseType: !10 , size: 32 )
210
+ !10 = !DIDerivedType (tag: DW_TAG_pointer_type, baseType: !11 , size: 32 )
231
211
!11 = !DIBasicType (name: "int" , size: 32 , encoding: DW_ATE_signed)
232
- !12 = !DIDerivedType (tag: DW_TAG_member, name: "size" , scope: !7 , file: !3 , line: 5 , baseType: !11 , size: 32 , offset: 64 )
233
- !13 = !DIDerivedType (tag: DW_TAG_pointer_type, baseType: !14 , size: 64 )
234
- !14 = distinct !DICompositeType (tag: DW_TAG_structure_type, name: "Result" , file: !3 , line: 8 , size: 128 , elements: !15 )
212
+ !12 = !DIDerivedType (tag: DW_TAG_member, name: "size" , scope: !7 , file: !3 , line: 5 , baseType: !11 , size: 32 , offset: 32 )
213
+ !13 = !DIDerivedType (tag: DW_TAG_pointer_type, baseType: !14 , size: 32 )
214
+ !14 = distinct !DICompositeType (tag: DW_TAG_structure_type, name: "Result" , file: !3 , line: 8 , size: 64 , elements: !15 )
235
215
!15 = !{!16 , !17 }
236
- !16 = !DIDerivedType (tag: DW_TAG_member, name: "data" , scope: !14 , file: !3 , line: 9 , baseType: !6 , size: 64 )
237
- !17 = !DIDerivedType (tag: DW_TAG_member, name: "sum" , scope: !14 , file: !3 , line: 10 , baseType: !11 , size: 32 , offset: 64 )
216
+ !16 = !DIDerivedType (tag: DW_TAG_member, name: "data" , scope: !14 , file: !3 , line: 9 , baseType: !6 , size: 32 )
217
+ !17 = !DIDerivedType (tag: DW_TAG_member, name: "sum" , scope: !14 , file: !3 , line: 10 , baseType: !11 , size: 32 , offset: 32 )
238
218
!18 = !{i32 7 , !"Dwarf Version" , i32 5 }
239
219
!19 = !{i32 2 , !"Debug Info Version" , i32 3 }
240
220
!20 = !{i32 1 , !"wchar_size" , i32 4 }
0 commit comments