Mercurial > hg > CbC > CbC_llvm
comparison test/Transforms/AddDiscriminators/no-discriminators.ll @ 100:7d135dc70f03 LLVM 3.9
LLVM 3.9
author | Miyagi Mitsuki <e135756@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Jan 2016 22:53:40 +0900 |
parents | afa8332a0e37 |
children | 1172e4bd9c6f |
comparison
equal
deleted
inserted
replaced
96:6418606d0ead | 100:7d135dc70f03 |
---|---|
10 ; | 10 ; |
11 ; None of the !dbg nodes associated with the if() statement should be | 11 ; None of the !dbg nodes associated with the if() statement should be |
12 ; altered. If they are, it means that the discriminators pass added a | 12 ; altered. If they are, it means that the discriminators pass added a |
13 ; new lexical scope. | 13 ; new lexical scope. |
14 | 14 |
15 define i32 @foo(i64 %i) #0 { | 15 define i32 @foo(i64 %i) #0 !dbg !4 { |
16 entry: | 16 entry: |
17 %retval = alloca i32, align 4 | 17 %retval = alloca i32, align 4 |
18 %i.addr = alloca i64, align 8 | 18 %i.addr = alloca i64, align 8 |
19 store i64 %i, i64* %i.addr, align 8 | 19 store i64 %i, i64* %i.addr, align 8 |
20 call void @llvm.dbg.declare(metadata i64* %i.addr, metadata !13, metadata !DIExpression()), !dbg !14 | 20 call void @llvm.dbg.declare(metadata i64* %i.addr, metadata !13, metadata !DIExpression()), !dbg !14 |
42 declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 | 42 declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 |
43 | 43 |
44 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } | 44 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } |
45 attributes #1 = { nounwind readnone } | 45 attributes #1 = { nounwind readnone } |
46 | 46 |
47 ; We should be able to add discriminators even in the absence of llvm.dbg.cu. | |
48 ; When using sample profiles, the front end will generate line tables but it | |
49 ; does not generate llvm.dbg.cu to prevent codegen from emitting debug info | |
50 ; to the final binary. | |
47 !llvm.dbg.cu = !{!0} | 51 !llvm.dbg.cu = !{!0} |
48 !llvm.module.flags = !{!10, !11} | 52 !llvm.module.flags = !{!10, !11} |
49 !llvm.ident = !{!12} | 53 !llvm.ident = !{!12} |
50 | 54 |
51 !0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) | 55 !0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) |
52 !1 = !DIFile(filename: "no-discriminators", directory: ".") | 56 !1 = !DIFile(filename: "no-discriminators", directory: ".") |
53 !2 = !{} | 57 !2 = !{} |
54 !3 = !{!4} | 58 !3 = !{!4} |
55 !4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, function: i32 (i64)* @foo, variables: !2) | 59 !4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) |
56 ; CHECK: ![[FOO:[0-9]+]] = distinct !DISubprogram(name: "foo" | 60 ; CHECK: ![[FOO:[0-9]+]] = distinct !DISubprogram(name: "foo" |
57 !5 = !DIFile(filename: "no-discriminators", directory: ".") | 61 !5 = !DIFile(filename: "no-discriminators", directory: ".") |
58 !6 = !DISubroutineType(types: !7) | 62 !6 = !DISubroutineType(types: !7) |
59 !7 = !{!8, !9} | 63 !7 = !{!8, !9} |
60 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) | 64 !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |