Advertisement
Guest User

with -O2

a guest
Oct 14th, 2015
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 4.51 KB | None | 0 0
  1. ; ModuleID = 'test.c'
  2. target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
  3. target triple = "x86_64-unknown-linux-gnu"
  4.  
  5. ; Function Attrs: nounwind uwtable
  6. define i32 @main(i32 %argc, i8** nocapture readonly %argv) #0 {
  7. entry:
  8.   tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !12, metadata !18), !dbg !19
  9.   tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !13, metadata !18), !dbg !20
  10.   tail call void @llvm.dbg.value(metadata i8* null, i64 0, metadata !14, metadata !18), !dbg !21
  11.   %cmp = icmp eq i32 %argc, 2, !dbg !22
  12.   br i1 %cmp, label %if.then, label %if.end, !dbg !24
  13.  
  14. if.then:                                          ; preds = %entry
  15.   %arrayidx = getelementptr inbounds i8*, i8** %argv, i64 1, !dbg !25
  16.   %0 = load i8*, i8** %arrayidx, align 8, !dbg !25, !tbaa !27
  17.   %call = tail call noalias i8* @__strdup(i8* %0) #3, !dbg !25
  18.   tail call void @llvm.dbg.value(metadata i8* %call, i64 0, metadata !14, metadata !18), !dbg !21
  19.   br label %if.end, !dbg !31
  20.  
  21. if.end:                                           ; preds = %if.then, %entry
  22.   ret i32 0, !dbg !32
  23.  
  24. ; uselistorder directives
  25.   uselistorder void (metadata, i64, metadata, metadata)* @llvm.dbg.value, { 0, 1, 3, 2 }
  26.   uselistorder i64 0, { 0, 1, 3, 2 }
  27. }
  28.  
  29. ; Function Attrs: nounwind
  30. declare noalias i8* @__strdup(i8* nocapture readonly) #1
  31.  
  32. ; Function Attrs: nounwind readnone
  33. declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2
  34.  
  35. attributes #0 = { nounwind uwtable "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"="+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
  36. attributes #1 = { nounwind "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"="+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
  37. attributes #2 = { nounwind readnone }
  38. attributes #3 = { nounwind }
  39.  
  40. !llvm.dbg.cu = !{!0}
  41. !llvm.module.flags = !{!15, !16}
  42. !llvm.ident = !{!17}
  43.  
  44. !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (git@github.com:llvm-mirror/clang.git 33e8a9bf1ce3556c395d94c66ea83f6f5f06f2bf) (git@github.com:llvm-mirror/llvm.git 9dd7e2da2a6e6e68c04162ecc9df00e3fd84dc61)", isOptimized: true, runtimeVersion: 0, emissionKind: 1, enums: !2, subprograms: !3)
  45. !1 = !DIFile(filename: "test.c", directory: "/home/carr27/dataconf-workspace2/data-integrity-tests/simple-types/strdup")
  46. !2 = !{}
  47. !3 = !{!4}
  48. !4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, function: i32 (i32, i8**)* @main, variables: !11)
  49. !5 = !DISubroutineType(types: !6)
  50. !6 = !{!7, !7, !8}
  51. !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
  52. !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64)
  53. !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, align: 64)
  54. !10 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
  55. !11 = !{!12, !13, !14}
  56. !12 = !DILocalVariable(name: "argc", arg: 1, scope: !4, file: !1, line: 3, type: !7)
  57. !13 = !DILocalVariable(name: "argv", arg: 2, scope: !4, file: !1, line: 3, type: !8)
  58. !14 = !DILocalVariable(name: "dup", scope: !4, file: !1, line: 4, type: !9)
  59. !15 = !{i32 2, !"Dwarf Version", i32 4}
  60. !16 = !{i32 2, !"Debug Info Version", i32 3}
  61. !17 = !{!"clang version 3.8.0 (git@github.com:llvm-mirror/clang.git 33e8a9bf1ce3556c395d94c66ea83f6f5f06f2bf) (git@github.com:llvm-mirror/llvm.git 9dd7e2da2a6e6e68c04162ecc9df00e3fd84dc61)"}
  62. !18 = !DIExpression()
  63. !19 = !DILocation(line: 3, column: 14, scope: !4)
  64. !20 = !DILocation(line: 3, column: 27, scope: !4)
  65. !21 = !DILocation(line: 4, column: 9, scope: !4)
  66. !22 = !DILocation(line: 5, column: 12, scope: !23)
  67. !23 = distinct !DILexicalBlock(scope: !4, file: !1, line: 5, column: 7)
  68. !24 = !DILocation(line: 5, column: 7, scope: !4)
  69. !25 = !DILocation(line: 6, column: 11, scope: !26)
  70. !26 = distinct !DILexicalBlock(scope: !23, file: !1, line: 5, column: 18)
  71. !27 = !{!28, !28, i64 0}
  72. !28 = !{!"any pointer", !29, i64 0}
  73. !29 = !{!"omnipotent char", !30, i64 0}
  74. !30 = !{!"Simple C/C++ TBAA"}
  75. !31 = !DILocation(line: 7, column: 3, scope: !26)
  76. !32 = !DILocation(line: 8, column: 3, scope: !4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement