Guest User

Untitled

a guest
Feb 23rd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.18 KB | None | 0 0
  1. ; ModuleID = 'code.ll'
  2. source_filename = "code.ll"
  3. target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
  4. target triple = "wasm32"
  5.  
  6. %swift.type = type { i64 }
  7. %swift.type_metadata_record = type { i32, i32 }
  8. %T4code5StrctV = type <{ %TSi, %TSi }>
  9. %TSi = type <{ i64 }>
  10.  
  11. @_T04code5StrctVWV = internal constant [20 x i8*] [i8* bitcast (void (i8*, %swift.type*)* @__swift_noop_void_return to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy16_8 to i8*), i8* bitcast (i8* (i8*, %swift.type*)* @__swift_noop_self_return to i8*), i8* bitcast (void (i8*, %swift.type*)* @__swift_noop_void_return to i8*), i8* bitcast (void (i8*, %swift.type*)* @__swift_noop_void_return to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy16_8 to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy16_8 to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy16_8 to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy16_8 to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy16_8 to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy16_8 to i8*), i8* bitcast (i8* (i8*, %swift.type*)* @__swift_noop_self_return to i8*), i8* bitcast (i8* (i8*, i8*, %swift.type*)* @__swift_memcpy16_8 to i8*), i8* bitcast (void (i8*, %swift.type*)* @__swift_noop_void_return to i8*), i8* bitcast (i8* (i8*, i8*, i64, %swift.type*)* @__swift_memcpy_array16_8 to i8*), i8* bitcast (i8* (i8*, i8*, i64, %swift.type*)* @__swift_memmove_array16_8 to i8*), i8* bitcast (i8* (i8*, i8*, i64, %swift.type*)* @__swift_memmove_array16_8 to i8*), i8* inttoptr (i64 16 to i8*), i8* inttoptr (i64 7 to i8*), i8* inttoptr (i64 16 to i8*)], align 8
  12. @0 = private constant [13 x i8] c"4code5StrctV\00"
  13. @1 = private constant [5 x i8] c"a\00b\00\00"
  14. @_T04code5StrctVMn = hidden constant <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }> <{ i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @0 to i64), i64 ptrtoint (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>* @_T04code5StrctVMn to i64)) to i32), i32 2, i32 3, i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @1 to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>* @_T04code5StrctVMn, i32 0, i32 3) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (%swift.type** (%swift.type*)* @get_field_types_Strct to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>* @_T04code5StrctVMn, i32 0, i32 4) to i64)) to i32), i32 1, i32 trunc (i64 sub (i64 ptrtoint (%swift.type* ()* @_T04code5StrctVMa to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>* @_T04code5StrctVMn, i32 0, i32 6) to i64)) to i32), i32 5, i32 0, i32 0, i32 0 }>, section "__TEXT,__const", align 8
  15. @_T04code5StrctVMf = internal constant <{ i8**, i64, i64, %swift.type*, i64, i64 }> <{ i8** getelementptr inbounds ([20 x i8*], [20 x i8*]* @_T04code5StrctVWV, i32 0, i32 0), i64 1, i64 sub (i64 ptrtoint (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>* @_T04code5StrctVMn to i64), i64 ptrtoint (i64* getelementptr inbounds (<{ i8**, i64, i64, %swift.type*, i64, i64 }>, <{ i8**, i64, i64, %swift.type*, i64, i64 }>* @_T04code5StrctVMf, i32 0, i32 2) to i64)), %swift.type* null, i64 0, i64 8 }>, align 8
  16. @2 = private constant [13 x i8] c"4code5StrctV\00", section "__TEXT,__swift3_typeref, regular, no_dead_strip"
  17. @3 = private constant [3 x i8] c"Si\00", section "__TEXT,__swift3_typeref, regular, no_dead_strip"
  18. @4 = private constant [2 x i8] c"a\00", section "__TEXT,__swift3_reflstr, regular, no_dead_strip"
  19. @5 = private constant [2 x i8] c"b\00", section "__TEXT,__swift3_reflstr, regular, no_dead_strip"
  20. @_T04code5StrctVMF = internal constant { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @2 to i64), i64 ptrtoint ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32 }* @_T04code5StrctVMF to i64)) to i32), i32 0, i16 0, i16 12, i32 2, i32 0, i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @3 to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32 }* @_T04code5StrctVMF, i32 0, i32 6) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @4 to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32 }* @_T04code5StrctVMF, i32 0, i32 7) to i64)) to i32), i32 0, i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @3 to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32 }* @_T04code5StrctVMF, i32 0, i32 9) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @5 to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32 }* @_T04code5StrctVMF, i32 0, i32 10) to i64)) to i32) }, section "__TEXT,__swift3_fieldmd, regular, no_dead_strip", align 4
  21. @field_type_vector_Strct = private global %swift.type** null
  22. @_swift_slowAlloc = external global i8* (i64, i64)*
  23. @_T0SiN = external global %swift.type, align 8
  24. @_swift_slowDealloc = external global void (i8*, i64, i64)*
  25. @"\01l_type_metadata_table" = private constant [1 x %swift.type_metadata_record] [%swift.type_metadata_record { i32 trunc (i64 sub (i64 ptrtoint (i64* getelementptr inbounds (<{ i8**, i64, i64, %swift.type*, i64, i64 }>, <{ i8**, i64, i64, %swift.type*, i64, i64 }>* @_T04code5StrctVMf, i32 0, i32 1) to i64), i64 ptrtoint ([1 x %swift.type_metadata_record]* @"\01l_type_metadata_table" to i64)) to i32), i32 1 }], section "__TEXT, __swift2_types, regular, no_dead_strip", align 8
  26. @__swift_reflection_version = linkonce_odr hidden constant i16 3
  27. @llvm.used = appending global [3 x i8*] [i8* bitcast ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32 }* @_T04code5StrctVMF to i8*), i8* bitcast ([1 x %swift.type_metadata_record]* @"\01l_type_metadata_table" to i8*), i8* bitcast (i16* @__swift_reflection_version to i8*)], section "llvm.metadata", align 8
  28.  
  29. @_T04code5StrctVN = hidden alias %swift.type, bitcast (i64* getelementptr inbounds (<{ i8**, i64, i64, %swift.type*, i64, i64 }>, <{ i8**, i64, i64, %swift.type*, i64, i64 }>* @_T04code5StrctVMf, i32 0, i32 1) to %swift.type*)
  30.  
  31. define i32 @main(i32, i8**) #0 {
  32. entry:
  33. %2 = bitcast i8** %1 to i8*
  34. call void @_T04code4mainyyF()
  35. ret i32 0
  36. }
  37.  
  38. define hidden i64 @_T04code5StrctV1aSivfi() #0 {
  39. entry:
  40. ret i64 12
  41. }
  42.  
  43. define hidden i64 @_T04code5StrctV1aSifg(i64, i64) #0 {
  44. entry:
  45. ret i64 %0
  46. }
  47.  
  48. define hidden i64 @_T04code5StrctV1bSivfi() #0 {
  49. entry:
  50. ret i64 32
  51. }
  52.  
  53. define hidden i64 @_T04code5StrctV1bSifg(i64, i64) #0 {
  54. entry:
  55. ret i64 %1
  56. }
  57.  
  58. define hidden void @_T04code5StrctV1bSifs(i64, %T4code5StrctV* nocapture swiftself dereferenceable(16)) #0 {
  59. entry:
  60. %.b = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %1, i32 0, i32 1
  61. %.b._value = getelementptr inbounds %TSi, %TSi* %.b, i32 0, i32 0
  62. store i64 %0, i64* %.b._value, align 8
  63. ret void
  64. }
  65.  
  66. define hidden { i8*, i64 } @_T04code5StrctV1bSifm(i8*, [24 x i8]* nocapture dereferenceable(24), %T4code5StrctV* nocapture swiftself dereferenceable(16)) #0 {
  67. entry:
  68. %.b = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %2, i32 0, i32 1
  69. %3 = bitcast %TSi* %.b to i8*
  70. %4 = insertvalue { i8*, i64 } undef, i8* %3, 0
  71. %5 = insertvalue { i8*, i64 } %4, i64 0, 1
  72. ret { i8*, i64 } %5
  73. }
  74.  
  75. define hidden { i64, i64 } @_T04code5StrctVACSi1b_tcfC(i64) #0 {
  76. entry:
  77. %1 = insertvalue { i64, i64 } { i64 12, i64 undef }, i64 %0, 1
  78. ret { i64, i64 } %1
  79. }
  80.  
  81. define hidden { i64, i64 } @_T04code5StrctVACycfC() #0 {
  82. entry:
  83. %0 = alloca %T4code5StrctV, align 8
  84. %1 = bitcast %T4code5StrctV* %0 to i8*
  85. call void @llvm.lifetime.start(i64 16, i8* %1)
  86. %.a = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %0, i32 0, i32 0
  87. %.a._value = getelementptr inbounds %TSi, %TSi* %.a, i32 0, i32 0
  88. store i64 12, i64* %.a._value, align 8
  89. %.b = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %0, i32 0, i32 1
  90. %.b._value = getelementptr inbounds %TSi, %TSi* %.b, i32 0, i32 0
  91. store i64 32, i64* %.b._value, align 8
  92. %2 = bitcast %T4code5StrctV* %0 to i8*
  93. call void @llvm.lifetime.end(i64 16, i8* %2)
  94. ret { i64, i64 } { i64 12, i64 32 }
  95. }
  96.  
  97. ; Function Attrs: argmemonly nounwind
  98. declare void @llvm.lifetime.start(i64, i8* nocapture) #1
  99.  
  100. ; Function Attrs: argmemonly nounwind
  101. declare void @llvm.lifetime.end(i64, i8* nocapture) #1
  102.  
  103. define hidden { i64, i64 } @_T04code4methAA5StrctVyF() #0 {
  104. entry:
  105. %0 = alloca %T4code5StrctV, align 8
  106. %1 = bitcast %T4code5StrctV* %0 to i8*
  107. call void @llvm.lifetime.start(i64 16, i8* %1)
  108. %2 = call { i64, i64 } @_T04code5StrctVACycfC()
  109. %3 = extractvalue { i64, i64 } %2, 0
  110. %4 = extractvalue { i64, i64 } %2, 1
  111. %.a = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %0, i32 0, i32 0
  112. %.a._value = getelementptr inbounds %TSi, %TSi* %.a, i32 0, i32 0
  113. store i64 %3, i64* %.a._value, align 8
  114. %.b = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %0, i32 0, i32 1
  115. %.b._value = getelementptr inbounds %TSi, %TSi* %.b, i32 0, i32 0
  116. store i64 %4, i64* %.b._value, align 8
  117. %.b1 = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %0, i32 0, i32 1
  118. %.b1._value = getelementptr inbounds %TSi, %TSi* %.b1, i32 0, i32 0
  119. store i64 11, i64* %.b1._value, align 8
  120. %5 = bitcast %T4code5StrctV* %0 to i8*
  121. call void @llvm.lifetime.end(i64 16, i8* %5)
  122. %6 = insertvalue { i64, i64 } undef, i64 %3, 0
  123. %7 = insertvalue { i64, i64 } %6, i64 11, 1
  124. ret { i64, i64 } %7
  125. }
  126.  
  127. define hidden void @_T04code4mainyyF() #0 {
  128. entry:
  129. %0 = call { i64, i64 } @_T04code4methAA5StrctVyF()
  130. %1 = extractvalue { i64, i64 } %0, 0
  131. %2 = extractvalue { i64, i64 } %0, 1
  132. ret void
  133. }
  134.  
  135. ; Function Attrs: nounwind
  136. define linkonce_odr hidden void @__swift_noop_void_return(i8*, %swift.type*) #2 {
  137. entry:
  138. ret void
  139. }
  140.  
  141. ; Function Attrs: nounwind
  142. define linkonce_odr hidden i8* @__swift_memcpy16_8(i8*, i8*, %swift.type*) #2 {
  143. entry:
  144. call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* %1, i64 16, i32 8, i1 false)
  145. ret i8* %0
  146. }
  147.  
  148. ; Function Attrs: argmemonly nounwind
  149. declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) #1
  150.  
  151. ; Function Attrs: nounwind
  152. define linkonce_odr hidden i8* @__swift_noop_self_return(i8*, %swift.type*) #2 {
  153. entry:
  154. ret i8* %0
  155. }
  156.  
  157. ; Function Attrs: nounwind
  158. define linkonce_odr hidden i8* @__swift_memcpy_array16_8(i8*, i8*, i64, %swift.type*) #2 {
  159. entry:
  160. %4 = mul nuw i64 %2, 16
  161. call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* %1, i64 %4, i32 8, i1 false)
  162. ret i8* %0
  163. }
  164.  
  165. ; Function Attrs: nounwind
  166. define linkonce_odr hidden i8* @__swift_memmove_array16_8(i8*, i8*, i64, %swift.type*) #2 {
  167. entry:
  168. %4 = mul nuw i64 %2, 16
  169. call void @llvm.memmove.p0i8.p0i8.i64(i8* %0, i8* %1, i64 %4, i32 8, i1 false)
  170. ret i8* %0
  171. }
  172.  
  173. ; Function Attrs: argmemonly nounwind
  174. declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #1
  175.  
  176. define private %swift.type** @get_field_types_Strct(%swift.type* %Strct) #0 {
  177. entry:
  178. %0 = load %swift.type**, %swift.type*** @field_type_vector_Strct, align 8
  179. %1 = icmp eq %swift.type** %0, null
  180. br i1 %1, label %build_field_types, label %done
  181.  
  182. build_field_types: ; preds = %entry
  183. %2 = call noalias i8* @swift_rt_swift_slowAlloc(i64 16, i64 7) #2
  184. %3 = bitcast i8* %2 to %swift.type**
  185. %4 = getelementptr inbounds %swift.type*, %swift.type** %3, i32 0
  186. store %swift.type* @_T0SiN, %swift.type** %4, align 8
  187. %5 = getelementptr inbounds %swift.type*, %swift.type** %3, i32 1
  188. store %swift.type* @_T0SiN, %swift.type** %5, align 8
  189. %6 = ptrtoint %swift.type** %3 to i64
  190. %7 = cmpxchg i64* bitcast (%swift.type*** @field_type_vector_Strct to i64*), i64 0, i64 %6 seq_cst seq_cst
  191. %8 = extractvalue { i64, i1 } %7, 1
  192. %9 = extractvalue { i64, i1 } %7, 0
  193. br i1 %8, label %done, label %race_lost
  194.  
  195. race_lost: ; preds = %build_field_types
  196. call void @swift_rt_swift_slowDealloc(i8* %2, i64 16, i64 7) #2
  197. %10 = inttoptr i64 %9 to %swift.type**
  198. br label %done
  199.  
  200. done: ; preds = %race_lost, %build_field_types, %entry
  201. %11 = phi %swift.type** [ %0, %entry ], [ %3, %build_field_types ], [ %10, %race_lost ]
  202. ret %swift.type** %11
  203. }
  204.  
  205. ; Function Attrs: nounwind readnone
  206. define hidden %swift.type* @_T04code5StrctVMa() #3 {
  207. entry:
  208. ret %swift.type* bitcast (i64* getelementptr inbounds (<{ i8**, i64, i64, %swift.type*, i64, i64 }>, <{ i8**, i64, i64, %swift.type*, i64, i64 }>* @_T04code5StrctVMf, i32 0, i32 1) to %swift.type*)
  209. }
  210.  
  211. ; Function Attrs: noinline nounwind
  212. define linkonce_odr hidden i8* @swift_rt_swift_slowAlloc(i64, i64) #4 {
  213. entry:
  214. %load = load i8* (i64, i64)*, i8* (i64, i64)** @_swift_slowAlloc
  215. %2 = tail call i8* %load(i64 %0, i64 %1)
  216. ret i8* %2
  217. }
  218.  
  219. ; Function Attrs: noinline nounwind
  220. define linkonce_odr hidden void @swift_rt_swift_slowDealloc(i8*, i64, i64) #4 {
  221. entry:
  222. %load = load void (i8*, i64, i64)*, void (i8*, i64, i64)** @_swift_slowDealloc
  223. tail call void %load(i8* %0, i64 %1, i64 %2)
  224. ret void
  225. }
  226.  
  227. attributes #0 = { "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "target-cpu"="core2" "target-features"="+cx16,+fxsr,+mmx,+sse,+sse2,+sse3,+ssse3,+x87" }
  228. attributes #1 = { argmemonly nounwind }
  229. attributes #2 = { nounwind }
  230. attributes #3 = { nounwind readnone "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "target-cpu"="core2" "target-features"="+cx16,+fxsr,+mmx,+sse,+sse2,+sse3,+ssse3,+x87" }
  231. attributes #4 = { noinline nounwind }
  232.  
  233. !llvm.module.flags = !{!0, !1, !2, !3, !4, !10, !11}
  234.  
  235. !0 = !{i32 1, !"Objective-C Version", i32 2}
  236. !1 = !{i32 1, !"Objective-C Image Info Version", i32 0}
  237. !2 = !{i32 1, !"Objective-C Image Info Section", !"__DATA, __objc_imageinfo, regular, no_dead_strip"}
  238. !3 = !{i32 4, !"Objective-C Garbage Collection", i32 1280}
  239. !4 = !{i32 1, !"Objective-C Class Properties", i32 64}
  240. !10 = !{i32 1, !"PIC Level", i32 2}
  241. !11 = !{i32 1, !"Swift Version", i32 5}
Add Comment
Please, Sign In to add comment