annotate test/Transforms/AddDiscriminators/call-nested.ll @ 120:1172e4bd9c6f

update 4.0.0
author mir3636
date Fri, 25 Nov 2016 19:14:25 +0900
parents
children 803732b1fca8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
120
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
1 ; RUN: opt < %s -add-discriminators -S | FileCheck %s
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
2 ; RUN: opt < %s -passes=add-discriminators -S | FileCheck %s
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
3
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
4 ; Discriminator support for calls that are defined in one line:
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
5 ; #1 int foo(int, int);
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
6 ; #2 int bar();
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
7 ; #3 int baz() {
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
8 ; #4 return foo(bar(),
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
9 ; #5 bar());
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
10 ; #6 }
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
11
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
12 ; Function Attrs: uwtable
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
13 define i32 @_Z3bazv() #0 !dbg !4 {
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
14 %1 = call i32 @_Z3barv(), !dbg !11
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
15 ; CHECK: %1 = call i32 @_Z3barv(), !dbg ![[CALL0:[0-9]+]]
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
16 %2 = call i32 @_Z3barv(), !dbg !12
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
17 ; CHECK: %2 = call i32 @_Z3barv(), !dbg ![[CALL1:[0-9]+]]
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
18 %3 = call i32 @_Z3fooii(i32 %1, i32 %2), !dbg !13
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
19 ; CHECK: %3 = call i32 @_Z3fooii(i32 %1, i32 %2), !dbg ![[CALL2:[0-9]+]]
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
20 ret i32 %3, !dbg !14
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
21 }
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
22
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
23 declare i32 @_Z3fooii(i32, i32) #1
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
24
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
25 declare i32 @_Z3barv() #1
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
26
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
27 attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
28 attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
29
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
30 !llvm.dbg.cu = !{!0}
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
31 !llvm.module.flags = !{!8, !9}
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
32 !llvm.ident = !{!10}
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
33
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
34 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 266269)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
35 !1 = !DIFile(filename: "test.cc", directory: "")
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
36 !2 = !{}
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
37 !4 = distinct !DISubprogram(name: "baz", linkageName: "_Z3bazv", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2)
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
38 !5 = !DISubroutineType(types: !6)
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
39 !6 = !{!7}
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
40 !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
41 !8 = !{i32 2, !"Dwarf Version", i32 4}
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
42 !9 = !{i32 2, !"Debug Info Version", i32 3}
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
43 !10 = !{!"clang version 3.9.0 (trunk 266269)"}
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
44 !11 = !DILocation(line: 4, column: 14, scope: !4)
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
45 !12 = !DILocation(line: 5, column: 14, scope: !4)
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
46 !13 = !DILocation(line: 4, column: 10, scope: !4)
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
47 !14 = !DILocation(line: 4, column: 3, scope: !4)
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
48
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
49 ; CHECK: ![[CALL2]] = !DILocation(line: 4, column: 10, scope: ![[CALL2BLOCK:[0-9]+]])
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
50 ; CHECK: ![[CALL2BLOCK]] = !DILexicalBlockFile({{.*}} discriminator: 1)