annotate test/Verifier/fnarg-nodebug.ll @ 146:3fc4d5c3e21e

set tail call flag for code segment in CGCAll
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 19:23:36 +0900
parents 803732b1fca8
children c2174574ed3a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 ; RUN: llvm-as < %s -o %t
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 ; RUN: llvm-dis < %t -o - | FileCheck %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 ; Created at -O1 from:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 ; int sink(int);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 ; __attribute__((always_inline)) int f(int i) { return sink(i); }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 ; __attribute__((always_inline)) int g(int j) { return sink(j); }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 ; __attribute__((nodebug)) int nodebug(int k) { return f(k)+g(k); }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 source_filename = "t.c"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 target triple = "x86_64-apple-macosx10.12.0"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 declare i32 @sink(i32) local_unnamed_addr
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 define i32 @nodebug(i32 %k) local_unnamed_addr #2 {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 entry:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 ; This should not set off the FnArg Verifier. The two variables are in differrent scopes.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 tail call void @llvm.dbg.value(metadata i32 %k, i64 0, metadata !12, metadata !13) #4, !dbg !14
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 %call.k = tail call i32 @sink(i32 %k) #4, !dbg !15
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 tail call void @llvm.dbg.value(metadata i32 %k, i64 0, metadata !19, metadata !13) #4, !dbg !20
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 %call.k3 = tail call i32 @sink(i32 %k) #4, !dbg !21
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 %add = add nsw i32 %call.k3, %call.k
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 ret i32 %add
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 ; Function Attrs: nounwind readnone
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #3
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 attributes #2 = { nounwind ssp uwtable }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 attributes #3 = { nounwind readnone }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31 !llvm.dbg.cu = !{!0}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32 !llvm.module.flags = !{!3, !4, !5}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33 !llvm.ident = !{!6}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 5.0.0 (trunk 297153) (llvm/trunk 297155)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 !1 = !DIFile(filename: "t.c", directory: "/tmp")
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37 !2 = !{}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38 !3 = !{i32 2, !"Dwarf Version", i32 4}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39 !4 = !{i32 2, !"Debug Info Version", i32 3}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40 !5 = !{i32 1, !"PIC Level", i32 2}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41 !6 = !{!"clang version 5.0.0 (trunk 297153) (llvm/trunk 297155)"}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42 !7 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !8, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !11)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43 !8 = !DISubroutineType(types: !9)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 !9 = !{!10, !10}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
45 !10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
46 !11 = !{!12}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
47 ; CHECK: !DILocalVariable(name: "i", arg: 1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
48 !12 = !DILocalVariable(name: "i", arg: 1, scope: !7, file: !1, line: 2, type: !10)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
49 !13 = !DIExpression()
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
50 !14 = !DILocation(line: 2, column: 42, scope: !7)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
51 !15 = !DILocation(line: 2, column: 54, scope: !7)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
52 !16 = !DILocation(line: 2, column: 47, scope: !7)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
53 !17 = distinct !DISubprogram(name: "g", scope: !1, file: !1, line: 3, type: !8, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !18)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
54 !18 = !{!19}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
55 ; CHECK: !DILocalVariable(name: "j", arg: 1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
56 !19 = !DILocalVariable(name: "j", arg: 1, scope: !17, file: !1, line: 3, type: !10)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
57 !20 = !DILocation(line: 3, column: 42, scope: !17)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
58 !21 = !DILocation(line: 3, column: 54, scope: !17)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
59 !22 = !DILocation(line: 3, column: 47, scope: !17)