Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ModuleID = 'code.ll'
- source_filename = "code.ll"
- target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
- target triple = "wasm32"
- %swift.type = type { i64 }
- %swift.type_metadata_record = type { i32, i32 }
- %T4code5StrctV = type <{ %TSi, %TSi }>
- %TSi = type <{ i64 }>
- @_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
- @0 = private constant [13 x i8] c"4code5StrctV\00"
- @1 = private constant [5 x i8] c"a\00b\00\00"
- @_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
- @_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
- @2 = private constant [13 x i8] c"4code5StrctV\00", section "__TEXT,__swift3_typeref, regular, no_dead_strip"
- @3 = private constant [3 x i8] c"Si\00", section "__TEXT,__swift3_typeref, regular, no_dead_strip"
- @4 = private constant [2 x i8] c"a\00", section "__TEXT,__swift3_reflstr, regular, no_dead_strip"
- @5 = private constant [2 x i8] c"b\00", section "__TEXT,__swift3_reflstr, regular, no_dead_strip"
- @_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
- @field_type_vector_Strct = private global %swift.type** null
- @_swift_slowAlloc = external global i8* (i64, i64)*
- @_T0SiN = external global %swift.type, align 8
- @_swift_slowDealloc = external global void (i8*, i64, i64)*
- @"\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
- @__swift_reflection_version = linkonce_odr hidden constant i16 3
- @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
- @_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*)
- define i32 @main(i32, i8**) #0 {
- entry:
- %2 = bitcast i8** %1 to i8*
- call void @_T04code4mainyyF()
- ret i32 0
- }
- define hidden i64 @_T04code5StrctV1aSivfi() #0 {
- entry:
- ret i64 12
- }
- define hidden i64 @_T04code5StrctV1aSifg(i64, i64) #0 {
- entry:
- ret i64 %0
- }
- define hidden i64 @_T04code5StrctV1bSivfi() #0 {
- entry:
- ret i64 32
- }
- define hidden i64 @_T04code5StrctV1bSifg(i64, i64) #0 {
- entry:
- ret i64 %1
- }
- define hidden void @_T04code5StrctV1bSifs(i64, %T4code5StrctV* nocapture swiftself dereferenceable(16)) #0 {
- entry:
- %.b = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %1, i32 0, i32 1
- %.b._value = getelementptr inbounds %TSi, %TSi* %.b, i32 0, i32 0
- store i64 %0, i64* %.b._value, align 8
- ret void
- }
- define hidden { i8*, i64 } @_T04code5StrctV1bSifm(i8*, [24 x i8]* nocapture dereferenceable(24), %T4code5StrctV* nocapture swiftself dereferenceable(16)) #0 {
- entry:
- %.b = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %2, i32 0, i32 1
- %3 = bitcast %TSi* %.b to i8*
- %4 = insertvalue { i8*, i64 } undef, i8* %3, 0
- %5 = insertvalue { i8*, i64 } %4, i64 0, 1
- ret { i8*, i64 } %5
- }
- define hidden { i64, i64 } @_T04code5StrctVACSi1b_tcfC(i64) #0 {
- entry:
- %1 = insertvalue { i64, i64 } { i64 12, i64 undef }, i64 %0, 1
- ret { i64, i64 } %1
- }
- define hidden { i64, i64 } @_T04code5StrctVACycfC() #0 {
- entry:
- %0 = alloca %T4code5StrctV, align 8
- %1 = bitcast %T4code5StrctV* %0 to i8*
- call void @llvm.lifetime.start(i64 16, i8* %1)
- %.a = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %0, i32 0, i32 0
- %.a._value = getelementptr inbounds %TSi, %TSi* %.a, i32 0, i32 0
- store i64 12, i64* %.a._value, align 8
- %.b = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %0, i32 0, i32 1
- %.b._value = getelementptr inbounds %TSi, %TSi* %.b, i32 0, i32 0
- store i64 32, i64* %.b._value, align 8
- %2 = bitcast %T4code5StrctV* %0 to i8*
- call void @llvm.lifetime.end(i64 16, i8* %2)
- ret { i64, i64 } { i64 12, i64 32 }
- }
- ; Function Attrs: argmemonly nounwind
- declare void @llvm.lifetime.start(i64, i8* nocapture) #1
- ; Function Attrs: argmemonly nounwind
- declare void @llvm.lifetime.end(i64, i8* nocapture) #1
- define hidden { i64, i64 } @_T04code4methAA5StrctVyF() #0 {
- entry:
- %0 = alloca %T4code5StrctV, align 8
- %1 = bitcast %T4code5StrctV* %0 to i8*
- call void @llvm.lifetime.start(i64 16, i8* %1)
- %2 = call { i64, i64 } @_T04code5StrctVACycfC()
- %3 = extractvalue { i64, i64 } %2, 0
- %4 = extractvalue { i64, i64 } %2, 1
- %.a = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %0, i32 0, i32 0
- %.a._value = getelementptr inbounds %TSi, %TSi* %.a, i32 0, i32 0
- store i64 %3, i64* %.a._value, align 8
- %.b = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %0, i32 0, i32 1
- %.b._value = getelementptr inbounds %TSi, %TSi* %.b, i32 0, i32 0
- store i64 %4, i64* %.b._value, align 8
- %.b1 = getelementptr inbounds %T4code5StrctV, %T4code5StrctV* %0, i32 0, i32 1
- %.b1._value = getelementptr inbounds %TSi, %TSi* %.b1, i32 0, i32 0
- store i64 11, i64* %.b1._value, align 8
- %5 = bitcast %T4code5StrctV* %0 to i8*
- call void @llvm.lifetime.end(i64 16, i8* %5)
- %6 = insertvalue { i64, i64 } undef, i64 %3, 0
- %7 = insertvalue { i64, i64 } %6, i64 11, 1
- ret { i64, i64 } %7
- }
- define hidden void @_T04code4mainyyF() #0 {
- entry:
- %0 = call { i64, i64 } @_T04code4methAA5StrctVyF()
- %1 = extractvalue { i64, i64 } %0, 0
- %2 = extractvalue { i64, i64 } %0, 1
- ret void
- }
- ; Function Attrs: nounwind
- define linkonce_odr hidden void @__swift_noop_void_return(i8*, %swift.type*) #2 {
- entry:
- ret void
- }
- ; Function Attrs: nounwind
- define linkonce_odr hidden i8* @__swift_memcpy16_8(i8*, i8*, %swift.type*) #2 {
- entry:
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* %1, i64 16, i32 8, i1 false)
- ret i8* %0
- }
- ; Function Attrs: argmemonly nounwind
- declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) #1
- ; Function Attrs: nounwind
- define linkonce_odr hidden i8* @__swift_noop_self_return(i8*, %swift.type*) #2 {
- entry:
- ret i8* %0
- }
- ; Function Attrs: nounwind
- define linkonce_odr hidden i8* @__swift_memcpy_array16_8(i8*, i8*, i64, %swift.type*) #2 {
- entry:
- %4 = mul nuw i64 %2, 16
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* %1, i64 %4, i32 8, i1 false)
- ret i8* %0
- }
- ; Function Attrs: nounwind
- define linkonce_odr hidden i8* @__swift_memmove_array16_8(i8*, i8*, i64, %swift.type*) #2 {
- entry:
- %4 = mul nuw i64 %2, 16
- call void @llvm.memmove.p0i8.p0i8.i64(i8* %0, i8* %1, i64 %4, i32 8, i1 false)
- ret i8* %0
- }
- ; Function Attrs: argmemonly nounwind
- declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #1
- define private %swift.type** @get_field_types_Strct(%swift.type* %Strct) #0 {
- entry:
- %0 = load %swift.type**, %swift.type*** @field_type_vector_Strct, align 8
- %1 = icmp eq %swift.type** %0, null
- br i1 %1, label %build_field_types, label %done
- build_field_types: ; preds = %entry
- %2 = call noalias i8* @swift_rt_swift_slowAlloc(i64 16, i64 7) #2
- %3 = bitcast i8* %2 to %swift.type**
- %4 = getelementptr inbounds %swift.type*, %swift.type** %3, i32 0
- store %swift.type* @_T0SiN, %swift.type** %4, align 8
- %5 = getelementptr inbounds %swift.type*, %swift.type** %3, i32 1
- store %swift.type* @_T0SiN, %swift.type** %5, align 8
- %6 = ptrtoint %swift.type** %3 to i64
- %7 = cmpxchg i64* bitcast (%swift.type*** @field_type_vector_Strct to i64*), i64 0, i64 %6 seq_cst seq_cst
- %8 = extractvalue { i64, i1 } %7, 1
- %9 = extractvalue { i64, i1 } %7, 0
- br i1 %8, label %done, label %race_lost
- race_lost: ; preds = %build_field_types
- call void @swift_rt_swift_slowDealloc(i8* %2, i64 16, i64 7) #2
- %10 = inttoptr i64 %9 to %swift.type**
- br label %done
- done: ; preds = %race_lost, %build_field_types, %entry
- %11 = phi %swift.type** [ %0, %entry ], [ %3, %build_field_types ], [ %10, %race_lost ]
- ret %swift.type** %11
- }
- ; Function Attrs: nounwind readnone
- define hidden %swift.type* @_T04code5StrctVMa() #3 {
- entry:
- 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*)
- }
- ; Function Attrs: noinline nounwind
- define linkonce_odr hidden i8* @swift_rt_swift_slowAlloc(i64, i64) #4 {
- entry:
- %load = load i8* (i64, i64)*, i8* (i64, i64)** @_swift_slowAlloc
- %2 = tail call i8* %load(i64 %0, i64 %1)
- ret i8* %2
- }
- ; Function Attrs: noinline nounwind
- define linkonce_odr hidden void @swift_rt_swift_slowDealloc(i8*, i64, i64) #4 {
- entry:
- %load = load void (i8*, i64, i64)*, void (i8*, i64, i64)** @_swift_slowDealloc
- tail call void %load(i8* %0, i64 %1, i64 %2)
- ret void
- }
- 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" }
- attributes #1 = { argmemonly nounwind }
- attributes #2 = { nounwind }
- 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" }
- attributes #4 = { noinline nounwind }
- !llvm.module.flags = !{!0, !1, !2, !3, !4, !10, !11}
- !0 = !{i32 1, !"Objective-C Version", i32 2}
- !1 = !{i32 1, !"Objective-C Image Info Version", i32 0}
- !2 = !{i32 1, !"Objective-C Image Info Section", !"__DATA, __objc_imageinfo, regular, no_dead_strip"}
- !3 = !{i32 4, !"Objective-C Garbage Collection", i32 1280}
- !4 = !{i32 1, !"Objective-C Class Properties", i32 64}
- !10 = !{i32 1, !"PIC Level", i32 2}
- !11 = !{i32 1, !"Swift Version", i32 5}
Add Comment
Please, Sign In to add comment