Skip to content

Instantly share code, notes, and snippets.

@koher
Created November 6, 2018 06:45
Show Gist options
  • Save koher/d5d2c665cf03dcce81e7defd0bd73283 to your computer and use it in GitHub Desktop.
Save koher/d5d2c665cf03dcce81e7defd0bd73283 to your computer and use it in GitHub Desktop.
diff let.ll var.ll
6d5
< %TSi = type <{ i64 }>
14d12
< @"$S3let3FooV3barSivpZ" = hidden global %TSi <{ i64 42 }>, align 8
20,21c18,19
< @0 = private constant [4 x i8] c"let\00"
< @"$S3letMXM" = linkonce_odr hidden constant <{ i32, i32, i32 }> <{ i32 0, i32 0, i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @0 to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32 }>, <{ i32, i32, i32 }>* @"$S3letMXM", i32 0, i32 2) to i64)) to i32) }>, section "__TEXT,__const", align 4
---
> @0 = private constant [4 x i8] c"var\00"
> @"$S3varMXM" = linkonce_odr hidden constant <{ i32, i32, i32 }> <{ i32 0, i32 0, i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @0 to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32 }>, <{ i32, i32, i32 }>* @"$S3varMXM", i32 0, i32 2) to i64)) to i32) }>, section "__TEXT,__const", align 4
23,27c21,25
< @"$S3let3FooVMn" = hidden constant <{ i32, i32, i32, i32, i32, i32 }> <{ i32 262225, i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32, i32 }>* @"$S3letMXM" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32 }>* @"$S3let3FooVMn", i32 0, i32 1) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @1 to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32 }>* @"$S3let3FooVMn", i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (%swift.metadata_response (i64)* @"$S3let3FooVMa" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32 }>* @"$S3let3FooVMn", i32 0, i32 3) to i64)) to i32), i32 0, i32 2 }>, section "__TEXT,__const", align 4
< @"$S3let3FooVMf" = internal constant <{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>* }> <{ i8** @"$SytWV", i64 1, <{ i32, i32, i32, i32, i32, i32 }>* @"$S3let3FooVMn" }>, align 8
< @"symbolic \01____ 3let3FooV" = linkonce_odr hidden constant <{ [1 x i8], i32, i8 }> <{ [1 x i8] c"\01", i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32, i32, i32, i32, i32 }>* @"$S3let3FooVMn" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ [1 x i8], i32, i8 }>, <{ [1 x i8], i32, i8 }>* @"symbolic \01____ 3let3FooV", i32 0, i32 1) to i64)) to i32), i8 0 }>, section "__TEXT,__swift4_typeref, regular, no_dead_strip", align 1
< @"$S3let3FooVMF" = internal constant { i32, i32, i16, i16, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ [1 x i8], i32, i8 }>* @"symbolic \01____ 3let3FooV" to i64), i64 ptrtoint ({ i32, i32, i16, i16, i32 }* @"$S3let3FooVMF" to i64)) to i32), i32 0, i16 0, i16 12, i32 0 }, section "__TEXT,__swift4_fieldmd, regular, no_dead_strip", align 4
< @"\01l_type_metadata_table" = private constant [1 x %swift.type_metadata_record] [%swift.type_metadata_record { i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32, i32, i32, i32, i32 }>* @"$S3let3FooVMn" to i64), i64 ptrtoint ([1 x %swift.type_metadata_record]* @"\01l_type_metadata_table" to i64)) to i32) }], section "__TEXT, __swift4_types, regular, no_dead_strip", align 4
---
> @"$S3var3FooVMn" = hidden constant <{ i32, i32, i32, i32, i32, i32 }> <{ i32 262225, i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32, i32 }>* @"$S3varMXM" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32 }>* @"$S3var3FooVMn", i32 0, i32 1) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @1 to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32 }>* @"$S3var3FooVMn", i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (%swift.metadata_response (i64)* @"$S3var3FooVMa" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32 }>, <{ i32, i32, i32, i32, i32, i32 }>* @"$S3var3FooVMn", i32 0, i32 3) to i64)) to i32), i32 0, i32 2 }>, section "__TEXT,__const", align 4
> @"$S3var3FooVMf" = internal constant <{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>* }> <{ i8** @"$SytWV", i64 1, <{ i32, i32, i32, i32, i32, i32 }>* @"$S3var3FooVMn" }>, align 8
> @"symbolic \01____ 3var3FooV" = linkonce_odr hidden constant <{ [1 x i8], i32, i8 }> <{ [1 x i8] c"\01", i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32, i32, i32, i32, i32 }>* @"$S3var3FooVMn" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ [1 x i8], i32, i8 }>, <{ [1 x i8], i32, i8 }>* @"symbolic \01____ 3var3FooV", i32 0, i32 1) to i64)) to i32), i8 0 }>, section "__TEXT,__swift4_typeref, regular, no_dead_strip", align 1
> @"$S3var3FooVMF" = internal constant { i32, i32, i16, i16, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ [1 x i8], i32, i8 }>* @"symbolic \01____ 3var3FooV" to i64), i64 ptrtoint ({ i32, i32, i16, i16, i32 }* @"$S3var3FooVMF" to i64)) to i32), i32 0, i16 0, i16 12, i32 0 }, section "__TEXT,__swift4_fieldmd, regular, no_dead_strip", align 4
> @"\01l_type_metadata_table" = private constant [1 x %swift.type_metadata_record] [%swift.type_metadata_record { i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32, i32, i32, i32, i32 }>* @"$S3var3FooVMn" to i64), i64 ptrtoint ([1 x %swift.type_metadata_record]* @"\01l_type_metadata_table" to i64)) to i32) }], section "__TEXT, __swift4_types, regular, no_dead_strip", align 4
29c27
< @llvm.used = appending global [3 x i8*] [i8* bitcast ([1 x %swift.type_metadata_record]* @"\01l_type_metadata_table" to i8*), i8* bitcast ({ i32, i32, i16, i16, i32 }* @"$S3let3FooVMF" to i8*), i8* bitcast (i16* @__swift_reflection_version to i8*)], section "llvm.metadata"
---
> @llvm.used = appending global [3 x i8*] [i8* bitcast ([1 x %swift.type_metadata_record]* @"\01l_type_metadata_table" to i8*), i8* bitcast ({ i32, i32, i16, i16, i32 }* @"$S3var3FooVMF" to i8*), i8* bitcast (i16* @__swift_reflection_version to i8*)], section "llvm.metadata"
31c29
< @"$S3let3FooVN" = hidden alias %swift.type, bitcast (i64* getelementptr inbounds (<{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>* }>, <{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>* }>* @"$S3let3FooVMf", i32 0, i32 1) to %swift.type*)
---
> @"$S3var3FooVN" = hidden alias %swift.type, bitcast (i64* getelementptr inbounds (<{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>* }>, <{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>* }>* @"$S3var3FooVMf", i32 0, i32 1) to %swift.type*)
112,118c110
< define hidden swiftcc i8* @"$S3let3FooV3barSivau"() local_unnamed_addr #3 {
< entry:
< ret i8* bitcast (%TSi* @"$S3let3FooV3barSivpZ" to i8*)
< }
<
< ; Function Attrs: norecurse nounwind readnone
< define hidden swiftcc i64 @"$S3let3FooV3barSivgZ"() local_unnamed_addr #3 {
---
> define hidden swiftcc i64 @"$S3var3FooV3barSivgZ"() local_unnamed_addr #3 {
124c116
< define hidden swiftcc void @"$S3let3FooVACycfC"() local_unnamed_addr #3 {
---
> define hidden swiftcc void @"$S3var3FooVACycfC"() local_unnamed_addr #3 {
130c122
< define hidden swiftcc %swift.metadata_response @"$S3let3FooVMa"(i64) #3 {
---
> define hidden swiftcc %swift.metadata_response @"$S3var3FooVMa"(i64) #3 {
132c124
< ret %swift.metadata_response { %swift.type* bitcast (i64* getelementptr inbounds (<{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>* }>, <{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>* }>* @"$S3let3FooVMf", i32 0, i32 1) to %swift.type*), i64 0 }
---
> ret %swift.metadata_response { %swift.type* bitcast (i64* getelementptr inbounds (<{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>* }>, <{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>* }>* @"$S3var3FooVMf", i32 0, i32 1) to %swift.type*), i64 0 }
145,148c137,140
< !0 = !{<{ i32, i32, i32 }>* @"$S3letMXM", null, null, i1 false, i1 true}
< !1 = !{<{ i32, i32, i32, i32, i32, i32 }>* @"$S3let3FooVMn", null, null, i1 false, i1 true}
< !2 = !{<{ [1 x i8], i32, i8 }>* @"symbolic \01____ 3let3FooV", null, null, i1 false, i1 true}
< !3 = !{{ i32, i32, i16, i16, i32 }* @"$S3let3FooVMF", null, null, i1 false, i1 true}
---
> !0 = !{<{ i32, i32, i32 }>* @"$S3varMXM", null, null, i1 false, i1 true}
> !1 = !{<{ i32, i32, i32, i32, i32, i32 }>* @"$S3var3FooVMn", null, null, i1 false, i1 true}
> !2 = !{<{ [1 x i8], i32, i8 }>* @"symbolic \01____ 3var3FooV", null, null, i1 false, i1 true}
> !3 = !{{ i32, i32, i16, i16, i32 }* @"$S3var3FooVMF", null, null, i1 false, i1 true}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment