Advertisement
Guest User

Untitled

a guest
Sep 19th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 4.85 KB | None | 0 0
  1. ; ModuleID = 'llvm-link'
  2. source_filename = "llvm-link"
  3. target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
  4. target triple = "x86_64-apple-macosx10.13.0"
  5.  
  6. @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
  7.  
  8. ; Function Attrs: noinline nounwind ssp uwtable
  9. define i32 @main(i32 %argc, i8** %argv) #0 !dbg !8 {
  10. entry:
  11.   call void @llvm.dbg.value(metadata i32 %argc, metadata !15, metadata !DIExpression()), !dbg !16
  12.   call void @llvm.dbg.value(metadata i8** %argv, metadata !17, metadata !DIExpression()), !dbg !18
  13.   %arrayidx = getelementptr inbounds i8*, i8** %argv, i64 0, !dbg !19
  14.   %0 = load i8*, i8** %arrayidx, align 8, !dbg !19
  15.   %1 = ptrtoint i8* %0 to i32, !dbg !19
  16.   call void @llvm.dbg.value(metadata i32 %1, metadata !20, metadata !DIExpression()), !dbg !21
  17.   %arrayidx1 = getelementptr inbounds i8*, i8** %argv, i64 2, !dbg !22
  18.   %2 = load i8*, i8** %arrayidx1, align 8, !dbg !22
  19.   %call = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %2), !dbg !23
  20.   call void @llvm.dbg.value(metadata i32 %call, metadata !24, metadata !DIExpression()), !dbg !25
  21.   %add = add nsw i32 %call, %1, !dbg !26
  22.   call void @llvm.dbg.value(metadata i32 %add, metadata !24, metadata !DIExpression()), !dbg !25
  23.   %add2 = add nsw i32 %1, %add, !dbg !27
  24.   call void @llvm.dbg.value(metadata i32 %add2, metadata !20, metadata !DIExpression()), !dbg !21
  25.   %call3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %add2), !dbg !28
  26.   ret i32 0, !dbg !29
  27. }
  28.  
  29. ; Function Attrs: nounwind readnone speculatable
  30. declare void @llvm.dbg.value(metadata, metadata, metadata) #1
  31.  
  32. declare i32 @atoi(...) #2
  33.  
  34. declare i32 @printf(i8*, ...) #2
  35.  
  36. attributes #0 = { noinline nounwind ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  37. attributes #1 = { nounwind readnone speculatable }
  38. attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "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" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  39.  
  40. !llvm.dbg.cu = !{!0}
  41. !llvm.ident = !{!3}
  42. !llvm.module.flags = !{!4, !5, !6, !7}
  43.  
  44. !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 6.0.1 (tags/RELEASE_601/final 342391) (llvm/tags/RELEASE_601/final 342390)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
  45. !1 = !DIFile(filename: "t1.c", directory: "/Users/guilhermeleobas/Documents/GitHub/tf/Benchs/test")
  46. !2 = !{}
  47. !3 = !{!"clang version 6.0.1 (tags/RELEASE_601/final 342391) (llvm/tags/RELEASE_601/final 342390)"}
  48. !4 = !{i32 2, !"Dwarf Version", i32 4}
  49. !5 = !{i32 2, !"Debug Info Version", i32 3}
  50. !6 = !{i32 1, !"wchar_size", i32 4}
  51. !7 = !{i32 7, !"PIC Level", i32 2}
  52. !8 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !9, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
  53. !9 = !DISubroutineType(types: !10)
  54. !10 = !{!11, !11, !12}
  55. !11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
  56. !12 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !13, size: 64)
  57. !13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !14, size: 64)
  58. !14 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
  59. !15 = !DILocalVariable(name: "argc", arg: 1, scope: !8, file: !1, line: 3, type: !11)
  60. !16 = !DILocation(line: 3, column: 14, scope: !8)
  61. !17 = !DILocalVariable(name: "argv", arg: 2, scope: !8, file: !1, line: 3, type: !12)
  62. !18 = !DILocation(line: 3, column: 26, scope: !8)
  63. !19 = !DILocation(line: 5, column: 11, scope: !8)
  64. !20 = !DILocalVariable(name: "a", scope: !8, file: !1, line: 5, type: !11)
  65. !21 = !DILocation(line: 5, column: 7, scope: !8)
  66. !22 = !DILocation(line: 7, column: 16, scope: !8)
  67. !23 = !DILocation(line: 7, column: 11, scope: !8)
  68. !24 = !DILocalVariable(name: "b", scope: !8, file: !1, line: 7, type: !11)
  69. !25 = !DILocation(line: 7, column: 7, scope: !8)
  70. !26 = !DILocation(line: 16, column: 9, scope: !8)
  71. !27 = !DILocation(line: 18, column: 9, scope: !8)
  72. !28 = !DILocation(line: 20, column: 3, scope: !8)
  73. !29 = !DILocation(line: 22, column: 3, scope: !8)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement