gentests
This commit is contained in:
@@ -3,8 +3,7 @@ source_filename = "main"
|
|||||||
|
|
||||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/abi.Name", ptr, i64 }
|
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||||
%"github.com/goplus/llgo/internal/abi.Name" = type { ptr }
|
|
||||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||||
|
|
||||||
@"main.init$guard" = global ptr null
|
@"main.init$guard" = global ptr null
|
||||||
@@ -270,78 +269,74 @@ _llgo_0:
|
|||||||
%7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %5, i32 0, i32 1
|
%7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %5, i32 0, i32 1
|
||||||
store i64 0, ptr %7, align 4
|
store i64 0, ptr %7, align 4
|
||||||
%8 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %5, align 8
|
%8 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %5, align 8
|
||||||
%9 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %3, ptr %4, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %8, i1 false, i1 false)
|
%9 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %3, ptr %4, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %8, i1 false)
|
||||||
%10 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
%10 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
%11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %10, i32 0, i32 0
|
%11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %10, i32 0, i32 0
|
||||||
store ptr @5, ptr %11, align 8
|
store ptr @5, ptr %11, align 8
|
||||||
%12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %10, i32 0, i32 1
|
%12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %10, i32 0, i32 1
|
||||||
store i64 4, ptr %12, align 4
|
store i64 4, ptr %12, align 4
|
||||||
%13 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %10, align 8
|
%13 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %10, align 8
|
||||||
%14 = call %"github.com/goplus/llgo/internal/abi.Name" @"github.com/goplus/llgo/internal/runtime.NewPkgName"(%"github.com/goplus/llgo/internal/runtime.String" %13)
|
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56)
|
||||||
%15 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
%15 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %14, i64 0
|
||||||
%16 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %15, i64 0
|
store %"github.com/goplus/llgo/internal/abi.StructField" %9, ptr %15, align 8
|
||||||
store %"github.com/goplus/llgo/internal/abi.StructField" %9, ptr %16, align 8
|
%16 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
||||||
%17 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
%17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %16, i32 0, i32 0
|
||||||
%18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %17, i32 0, i32 0
|
store ptr %14, ptr %17, align 8
|
||||||
store ptr %15, ptr %18, align 8
|
%18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %16, i32 0, i32 1
|
||||||
%19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %17, i32 0, i32 1
|
store i64 1, ptr %18, align 4
|
||||||
|
%19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %16, i32 0, i32 2
|
||||||
store i64 1, ptr %19, align 4
|
store i64 1, ptr %19, align 4
|
||||||
%20 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %17, i32 0, i32 2
|
%20 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %16, align 8
|
||||||
store i64 1, ptr %20, align 4
|
%21 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %13, i64 8, %"github.com/goplus/llgo/internal/runtime.Slice" %20)
|
||||||
%21 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %17, align 8
|
store ptr %21, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
|
||||||
%22 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/abi.Name" %14, i64 8, %"github.com/goplus/llgo/internal/runtime.Slice" %21)
|
%22 = load ptr, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
|
||||||
store ptr %22, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
|
%23 = icmp eq ptr %22, null
|
||||||
%23 = load ptr, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
|
br i1 %23, label %_llgo_1, label %_llgo_2
|
||||||
%24 = icmp eq ptr %23, null
|
|
||||||
br i1 %24, label %_llgo_1, label %_llgo_2
|
|
||||||
|
|
||||||
_llgo_1: ; preds = %_llgo_0
|
_llgo_1: ; preds = %_llgo_0
|
||||||
%25 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
%24 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
%26 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %25, i32 0, i32 0
|
%25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %24, i32 0, i32 0
|
||||||
store ptr @6, ptr %26, align 8
|
store ptr @6, ptr %25, align 8
|
||||||
%27 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %25, i32 0, i32 1
|
%26 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %24, i32 0, i32 1
|
||||||
store i64 1, ptr %27, align 4
|
store i64 1, ptr %26, align 4
|
||||||
%28 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %25, align 8
|
%27 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %24, align 8
|
||||||
%29 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2)
|
%28 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2)
|
||||||
%30 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
%29 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
%31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %30, i32 0, i32 0
|
%30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %29, i32 0, i32 0
|
||||||
store ptr @7, ptr %31, align 8
|
store ptr @7, ptr %30, align 8
|
||||||
%32 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %30, i32 0, i32 1
|
%31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %29, i32 0, i32 1
|
||||||
store i64 0, ptr %32, align 4
|
store i64 0, ptr %31, align 4
|
||||||
%33 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %30, align 8
|
%32 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %29, align 8
|
||||||
%34 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %28, ptr %29, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %33, i1 true, i1 false)
|
%33 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %27, ptr %28, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %32, i1 false)
|
||||||
%35 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
%34 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
%36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %35, i32 0, i32 0
|
%35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %34, i32 0, i32 0
|
||||||
store ptr @8, ptr %36, align 8
|
store ptr @8, ptr %35, align 8
|
||||||
%37 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %35, i32 0, i32 1
|
%36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %34, i32 0, i32 1
|
||||||
store i64 4, ptr %37, align 4
|
store i64 4, ptr %36, align 4
|
||||||
%38 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %35, align 8
|
%37 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %34, align 8
|
||||||
%39 = call %"github.com/goplus/llgo/internal/abi.Name" @"github.com/goplus/llgo/internal/runtime.NewPkgName"(%"github.com/goplus/llgo/internal/runtime.String" %38)
|
%38 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56)
|
||||||
%40 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
%39 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %38, i64 0
|
||||||
%41 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %40, i64 0
|
store %"github.com/goplus/llgo/internal/abi.StructField" %33, ptr %39, align 8
|
||||||
store %"github.com/goplus/llgo/internal/abi.StructField" %34, ptr %41, align 8
|
%40 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
||||||
%42 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
%41 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, i32 0, i32 0
|
||||||
%43 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %42, i32 0, i32 0
|
store ptr %38, ptr %41, align 8
|
||||||
store ptr %40, ptr %43, align 8
|
%42 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, i32 0, i32 1
|
||||||
%44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %42, i32 0, i32 1
|
store i64 1, ptr %42, align 4
|
||||||
store i64 1, ptr %44, align 4
|
%43 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, i32 0, i32 2
|
||||||
%45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %42, i32 0, i32 2
|
store i64 1, ptr %43, align 4
|
||||||
store i64 1, ptr %45, align 4
|
%44 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, align 8
|
||||||
%46 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %42, align 8
|
%45 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %37, i64 8, %"github.com/goplus/llgo/internal/runtime.Slice" %44)
|
||||||
%47 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/abi.Name" %39, i64 8, %"github.com/goplus/llgo/internal/runtime.Slice" %46)
|
store ptr %45, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
|
||||||
store ptr %47, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
|
|
||||||
br label %_llgo_2
|
br label %_llgo_2
|
||||||
|
|
||||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/abi.Name", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||||
|
|
||||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1, i1)
|
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||||
|
|
||||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||||
|
|
||||||
declare %"github.com/goplus/llgo/internal/abi.Name" @"github.com/goplus/llgo/internal/runtime.NewPkgName"(%"github.com/goplus/llgo/internal/runtime.String")
|
|
||||||
|
|
||||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||||
|
|||||||
@@ -1,77 +1,104 @@
|
|||||||
; ModuleID = 'main'
|
; ModuleID = 'main'
|
||||||
source_filename = "main"
|
source_filename = "main"
|
||||||
|
|
||||||
%main.bar = type { ptr, float }
|
%"github.com/goplus/llgo/cl/internal/foo.Foo" = type { ptr, float }
|
||||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||||
|
%main.bar = type { ptr, float }
|
||||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||||
|
|
||||||
@"main.init$guard" = global ptr null
|
@"main.init$guard" = global ptr null
|
||||||
@0 = private unnamed_addr constant [4 x i8] c"Foo\00", align 1
|
@"github.com/goplus/llgo/cl/internal/foo.Foo" = linkonce global ptr null
|
||||||
@main.bar = global ptr null
|
@main.bar = global ptr null
|
||||||
@1 = private unnamed_addr constant [9 x i8] c"Foo done\00", align 1
|
|
||||||
@__llgo_argc = global ptr null
|
@__llgo_argc = global ptr null
|
||||||
@__llgo_argv = global ptr null
|
@__llgo_argv = global ptr null
|
||||||
@2 = private unnamed_addr constant [5 x i8] c"main\00", align 1
|
@0 = private unnamed_addr constant [7 x i8] c"notOk:\00", align 1
|
||||||
@3 = private unnamed_addr constant [7 x i8] c"notOk:\00", align 1
|
@1 = private unnamed_addr constant [3 x i8] c"pb\00", align 1
|
||||||
@4 = private unnamed_addr constant [3 x i8] c"pb\00", align 1
|
|
||||||
@"*_llgo_byte" = linkonce global ptr null
|
@"*_llgo_byte" = linkonce global ptr null
|
||||||
@5 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
@2 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
||||||
@6 = private unnamed_addr constant [2 x i8] c"f\00", align 1
|
@3 = private unnamed_addr constant [2 x i8] c"F\00", align 1
|
||||||
@7 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
@4 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
||||||
@8 = private unnamed_addr constant [5 x i8] c"main\00", align 1
|
@5 = private unnamed_addr constant [5 x i8] c"main\00", align 1
|
||||||
@9 = private unnamed_addr constant [9 x i8] c"main.bar\00", align 1
|
@6 = private unnamed_addr constant [5 x i8] c"main\00", align 1
|
||||||
|
@7 = private unnamed_addr constant [43 x i8] c"github.com/goplus/llgo/cl/internal/foo.Foo\00", align 1
|
||||||
|
@8 = private unnamed_addr constant [3 x i8] c"pb\00", align 1
|
||||||
|
@9 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
||||||
|
@10 = private unnamed_addr constant [2 x i8] c"f\00", align 1
|
||||||
|
@11 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
||||||
|
@12 = private unnamed_addr constant [5 x i8] c"main\00", align 1
|
||||||
|
@13 = private unnamed_addr constant [5 x i8] c"main\00", align 1
|
||||||
|
@14 = private unnamed_addr constant [9 x i8] c"main.bar\00", align 1
|
||||||
|
|
||||||
define { %main.bar, i1 } @main.Foo(%"github.com/goplus/llgo/internal/runtime.eface" %0) {
|
define { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } @main.Bar(%"github.com/goplus/llgo/internal/runtime.eface" %0) {
|
||||||
_llgo_0:
|
_llgo_0:
|
||||||
%1 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
%1 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 0
|
||||||
%2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %1, i32 0, i32 0
|
%2 = load ptr, ptr @"github.com/goplus/llgo/cl/internal/foo.Foo", align 8
|
||||||
store ptr @0, ptr %2, align 8
|
%3 = icmp eq ptr %1, %2
|
||||||
%3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %1, i32 0, i32 1
|
br i1 %3, label %_llgo_1, label %_llgo_2
|
||||||
store i64 3, ptr %3, align 4
|
|
||||||
%4 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %1, align 8
|
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %4)
|
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
|
||||||
%5 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 0
|
|
||||||
%6 = load ptr, ptr @main.bar, align 8
|
|
||||||
%7 = icmp eq ptr %5, %6
|
|
||||||
br i1 %7, label %_llgo_1, label %_llgo_2
|
|
||||||
|
|
||||||
_llgo_1: ; preds = %_llgo_0
|
_llgo_1: ; preds = %_llgo_0
|
||||||
%8 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 1
|
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 1
|
||||||
%9 = load %main.bar, ptr %8, align 8
|
%5 = load %"github.com/goplus/llgo/cl/internal/foo.Foo", ptr %4, align 8
|
||||||
%10 = alloca { %main.bar, i1 }, align 8
|
%6 = alloca { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 }, align 8
|
||||||
%11 = getelementptr inbounds { %main.bar, i1 }, ptr %10, i32 0, i32 0
|
%7 = getelementptr inbounds { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 }, ptr %6, i32 0, i32 0
|
||||||
store %main.bar %9, ptr %11, align 8
|
store %"github.com/goplus/llgo/cl/internal/foo.Foo" %5, ptr %7, align 8
|
||||||
%12 = getelementptr inbounds { %main.bar, i1 }, ptr %10, i32 0, i32 1
|
%8 = getelementptr inbounds { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 }, ptr %6, i32 0, i32 1
|
||||||
store i1 true, ptr %12, align 1
|
store i1 true, ptr %8, align 1
|
||||||
%13 = load { %main.bar, i1 }, ptr %10, align 8
|
%9 = load { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 }, ptr %6, align 8
|
||||||
br label %_llgo_3
|
br label %_llgo_3
|
||||||
|
|
||||||
_llgo_2: ; preds = %_llgo_0
|
_llgo_2: ; preds = %_llgo_0
|
||||||
%14 = alloca { %main.bar, i1 }, align 8
|
%10 = alloca { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 }, align 8
|
||||||
%15 = getelementptr inbounds { %main.bar, i1 }, ptr %14, i32 0, i32 0
|
%11 = getelementptr inbounds { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 }, ptr %10, i32 0, i32 0
|
||||||
store { ptr, double } zeroinitializer, ptr %15, align 8
|
store { ptr, double } zeroinitializer, ptr %11, align 8
|
||||||
%16 = getelementptr inbounds { %main.bar, i1 }, ptr %14, i32 0, i32 1
|
%12 = getelementptr inbounds { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 }, ptr %10, i32 0, i32 1
|
||||||
store i1 false, ptr %16, align 1
|
store i1 false, ptr %12, align 1
|
||||||
%17 = load { %main.bar, i1 }, ptr %14, align 8
|
%13 = load { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 }, ptr %10, align 8
|
||||||
br label %_llgo_3
|
br label %_llgo_3
|
||||||
|
|
||||||
_llgo_3: ; preds = %_llgo_2, %_llgo_1
|
_llgo_3: ; preds = %_llgo_2, %_llgo_1
|
||||||
%18 = phi { %main.bar, i1 } [ %13, %_llgo_1 ], [ %17, %_llgo_2 ]
|
%14 = phi { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } [ %9, %_llgo_1 ], [ %13, %_llgo_2 ]
|
||||||
%19 = extractvalue { %main.bar, i1 } %18, 0
|
%15 = extractvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %14, 0
|
||||||
%20 = extractvalue { %main.bar, i1 } %18, 1
|
%16 = extractvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %14, 1
|
||||||
%21 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
%mrv = insertvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } poison, %"github.com/goplus/llgo/cl/internal/foo.Foo" %15, 0
|
||||||
%22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %21, i32 0, i32 0
|
%mrv1 = insertvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %mrv, i1 %16, 1
|
||||||
store ptr @1, ptr %22, align 8
|
ret { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %mrv1
|
||||||
%23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %21, i32 0, i32 1
|
}
|
||||||
store i64 8, ptr %23, align 4
|
|
||||||
%24 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %21, align 8
|
define { %main.bar, i1 } @main.Foo(%"github.com/goplus/llgo/internal/runtime.eface" %0) {
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %24)
|
_llgo_0:
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
%1 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 0
|
||||||
%mrv = insertvalue { %main.bar, i1 } poison, %main.bar %19, 0
|
%2 = load ptr, ptr @main.bar, align 8
|
||||||
%mrv1 = insertvalue { %main.bar, i1 } %mrv, i1 %20, 1
|
%3 = icmp eq ptr %1, %2
|
||||||
|
br i1 %3, label %_llgo_1, label %_llgo_2
|
||||||
|
|
||||||
|
_llgo_1: ; preds = %_llgo_0
|
||||||
|
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 1
|
||||||
|
%5 = load %main.bar, ptr %4, align 8
|
||||||
|
%6 = alloca { %main.bar, i1 }, align 8
|
||||||
|
%7 = getelementptr inbounds { %main.bar, i1 }, ptr %6, i32 0, i32 0
|
||||||
|
store %main.bar %5, ptr %7, align 8
|
||||||
|
%8 = getelementptr inbounds { %main.bar, i1 }, ptr %6, i32 0, i32 1
|
||||||
|
store i1 true, ptr %8, align 1
|
||||||
|
%9 = load { %main.bar, i1 }, ptr %6, align 8
|
||||||
|
br label %_llgo_3
|
||||||
|
|
||||||
|
_llgo_2: ; preds = %_llgo_0
|
||||||
|
%10 = alloca { %main.bar, i1 }, align 8
|
||||||
|
%11 = getelementptr inbounds { %main.bar, i1 }, ptr %10, i32 0, i32 0
|
||||||
|
store { ptr, double } zeroinitializer, ptr %11, align 8
|
||||||
|
%12 = getelementptr inbounds { %main.bar, i1 }, ptr %10, i32 0, i32 1
|
||||||
|
store i1 false, ptr %12, align 1
|
||||||
|
%13 = load { %main.bar, i1 }, ptr %10, align 8
|
||||||
|
br label %_llgo_3
|
||||||
|
|
||||||
|
_llgo_3: ; preds = %_llgo_2, %_llgo_1
|
||||||
|
%14 = phi { %main.bar, i1 } [ %9, %_llgo_1 ], [ %13, %_llgo_2 ]
|
||||||
|
%15 = extractvalue { %main.bar, i1 } %14, 0
|
||||||
|
%16 = extractvalue { %main.bar, i1 } %14, 1
|
||||||
|
%mrv = insertvalue { %main.bar, i1 } poison, %main.bar %15, 0
|
||||||
|
%mrv1 = insertvalue { %main.bar, i1 } %mrv, i1 %16, 1
|
||||||
ret { %main.bar, i1 } %mrv1
|
ret { %main.bar, i1 } %mrv1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,6 +109,7 @@ _llgo_0:
|
|||||||
|
|
||||||
_llgo_1: ; preds = %_llgo_0
|
_llgo_1: ; preds = %_llgo_0
|
||||||
store i1 true, ptr @"main.init$guard", align 1
|
store i1 true, ptr @"main.init$guard", align 1
|
||||||
|
call void @"github.com/goplus/llgo/cl/internal/foo.init"()
|
||||||
call void @"main.init$abi"()
|
call void @"main.init$abi"()
|
||||||
br label %_llgo_2
|
br label %_llgo_2
|
||||||
|
|
||||||
@@ -95,46 +123,62 @@ _llgo_0:
|
|||||||
store ptr %1, ptr @__llgo_argv, align 8
|
store ptr %1, ptr @__llgo_argv, align 8
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||||
call void @main.init()
|
call void @main.init()
|
||||||
%2 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
%2 = alloca %main.bar, align 8
|
||||||
%3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 0
|
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %2, i64 16)
|
||||||
store ptr @2, ptr %3, align 8
|
%4 = call { %main.bar, i1 } @main.Foo(%"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer)
|
||||||
%4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 1
|
%5 = extractvalue { %main.bar, i1 } %4, 0
|
||||||
store i64 4, ptr %4, align 4
|
store %main.bar %5, ptr %3, align 8
|
||||||
%5 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %2, align 8
|
%6 = extractvalue { %main.bar, i1 } %4, 1
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %5)
|
%7 = getelementptr inbounds %main.bar, ptr %3, i32 0, i32 0
|
||||||
|
%8 = load ptr, ptr %7, align 8
|
||||||
|
%9 = getelementptr inbounds %main.bar, ptr %3, i32 0, i32 1
|
||||||
|
%10 = load float, ptr %9, align 4
|
||||||
|
%11 = xor i1 %6, true
|
||||||
|
%12 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
|
%13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %12, i32 0, i32 0
|
||||||
|
store ptr @0, ptr %13, align 8
|
||||||
|
%14 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %12, i32 0, i32 1
|
||||||
|
store i64 6, ptr %14, align 4
|
||||||
|
%15 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %12, align 8
|
||||||
|
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %8)
|
||||||
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||||
|
%16 = fpext float %10 to double
|
||||||
|
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %16)
|
||||||
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||||
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %15)
|
||||||
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||||
|
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %11)
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||||
%6 = alloca %main.bar, align 8
|
%17 = alloca %"github.com/goplus/llgo/cl/internal/foo.Foo", align 8
|
||||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %6, i64 16)
|
%18 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %17, i64 16)
|
||||||
%8 = call { %main.bar, i1 } @main.Foo(%"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer)
|
%19 = load ptr, ptr @"github.com/goplus/llgo/cl/internal/foo.Foo", align 8
|
||||||
%9 = extractvalue { %main.bar, i1 } %8, 0
|
%20 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||||
store %main.bar %9, ptr %7, align 8
|
store %"github.com/goplus/llgo/cl/internal/foo.Foo" zeroinitializer, ptr %20, align 8
|
||||||
%10 = extractvalue { %main.bar, i1 } %8, 1
|
%21 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
||||||
%11 = getelementptr inbounds %main.bar, ptr %7, i32 0, i32 0
|
%22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %21, i32 0, i32 0
|
||||||
%12 = load ptr, ptr %11, align 8
|
store ptr %19, ptr %22, align 8
|
||||||
%13 = getelementptr inbounds %main.bar, ptr %7, i32 0, i32 1
|
%23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %21, i32 0, i32 1
|
||||||
%14 = load float, ptr %13, align 4
|
store ptr %20, ptr %23, align 8
|
||||||
%15 = xor i1 %10, true
|
%24 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %21, align 8
|
||||||
%16 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
%25 = call { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } @main.Bar(%"github.com/goplus/llgo/internal/runtime.eface" %24)
|
||||||
%17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 0
|
%26 = extractvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %25, 0
|
||||||
store ptr @3, ptr %17, align 8
|
store %"github.com/goplus/llgo/cl/internal/foo.Foo" %26, ptr %18, align 8
|
||||||
%18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 1
|
%27 = extractvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %25, 1
|
||||||
store i64 6, ptr %18, align 4
|
%28 = load %"github.com/goplus/llgo/cl/internal/foo.Foo", ptr %18, align 8
|
||||||
%19 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %16, align 8
|
%29 = call ptr @"(github.com/goplus/llgo/cl/internal/foo.Foo).Pb"(%"github.com/goplus/llgo/cl/internal/foo.Foo" %28)
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %12)
|
%30 = getelementptr inbounds %"github.com/goplus/llgo/cl/internal/foo.Foo", ptr %18, i32 0, i32 1
|
||||||
|
%31 = load float, ptr %30, align 4
|
||||||
|
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %29)
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||||
%20 = fpext float %14 to double
|
%32 = fpext float %31 to double
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %20)
|
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %32)
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %19)
|
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %27)
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %15)
|
|
||||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||||
ret i32 0
|
ret i32 0
|
||||||
}
|
}
|
||||||
|
|
||||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
declare void @"github.com/goplus/llgo/cl/internal/foo.init"()
|
||||||
|
|
||||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
|
||||||
|
|
||||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||||
|
|
||||||
@@ -142,68 +186,152 @@ declare ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr, i64)
|
|||||||
|
|
||||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
|
||||||
|
|
||||||
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||||
|
|
||||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double)
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double)
|
||||||
|
|
||||||
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||||
|
|
||||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
||||||
|
|
||||||
|
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||||
|
|
||||||
|
declare ptr @"(github.com/goplus/llgo/cl/internal/foo.Foo).Pb"(%"github.com/goplus/llgo/cl/internal/foo.Foo")
|
||||||
|
|
||||||
define void @"main.init$abi"() {
|
define void @"main.init$abi"() {
|
||||||
_llgo_0:
|
_llgo_0:
|
||||||
%0 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
%0 = load ptr, ptr @"github.com/goplus/llgo/cl/internal/foo.Foo", align 8
|
||||||
%1 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 0
|
%1 = icmp eq ptr %0, null
|
||||||
store ptr @4, ptr %1, align 8
|
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||||
%2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 1
|
|
||||||
store i64 2, ptr %2, align 4
|
_llgo_1: ; preds = %_llgo_0
|
||||||
%3 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %0, align 8
|
%2 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
%4 = load ptr, ptr @"*_llgo_byte", align 8
|
%3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 0
|
||||||
%5 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
store ptr @1, ptr %3, align 8
|
||||||
%6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %5, i32 0, i32 0
|
%4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 1
|
||||||
store ptr @5, ptr %6, align 8
|
store i64 2, ptr %4, align 4
|
||||||
%7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %5, i32 0, i32 1
|
%5 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %2, align 8
|
||||||
store i64 0, ptr %7, align 4
|
%6 = load ptr, ptr @"*_llgo_byte", align 8
|
||||||
%8 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %5, align 8
|
%7 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
%9 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %3, ptr %4, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %8, i1 false)
|
%8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %7, i32 0, i32 0
|
||||||
%10 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
store ptr @2, ptr %8, align 8
|
||||||
%11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %10, i32 0, i32 0
|
%9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %7, i32 0, i32 1
|
||||||
store ptr @6, ptr %11, align 8
|
store i64 0, ptr %9, align 4
|
||||||
%12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %10, i32 0, i32 1
|
%10 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %7, align 8
|
||||||
store i64 1, ptr %12, align 4
|
%11 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %5, ptr %6, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %10, i1 false)
|
||||||
%13 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %10, align 8
|
%12 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 13)
|
%13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %12, i32 0, i32 0
|
||||||
%15 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
store ptr @3, ptr %13, align 8
|
||||||
%16 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %15, i32 0, i32 0
|
%14 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %12, i32 0, i32 1
|
||||||
store ptr @7, ptr %16, align 8
|
store i64 1, ptr %14, align 4
|
||||||
%17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %15, i32 0, i32 1
|
%15 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %12, align 8
|
||||||
store i64 0, ptr %17, align 4
|
%16 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 13)
|
||||||
%18 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %15, align 8
|
%17 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
%19 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %13, ptr %14, i64 8, %"github.com/goplus/llgo/internal/runtime.String" %18, i1 false)
|
%18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %17, i32 0, i32 0
|
||||||
%20 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
store ptr @4, ptr %18, align 8
|
||||||
%21 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 0
|
%19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %17, i32 0, i32 1
|
||||||
store ptr @8, ptr %21, align 8
|
store i64 0, ptr %19, align 4
|
||||||
%22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 1
|
%20 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %17, align 8
|
||||||
store i64 4, ptr %22, align 4
|
%21 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %15, ptr %16, i64 8, %"github.com/goplus/llgo/internal/runtime.String" %20, i1 false)
|
||||||
%23 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %20, align 8
|
%22 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
%24 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
%23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %22, i32 0, i32 0
|
||||||
%25 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %24, i64 0
|
store ptr @5, ptr %23, align 8
|
||||||
store %"github.com/goplus/llgo/internal/abi.StructField" %9, ptr %25, align 8
|
%24 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %22, i32 0, i32 1
|
||||||
%26 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %24, i64 1
|
store i64 4, ptr %24, align 4
|
||||||
store %"github.com/goplus/llgo/internal/abi.StructField" %19, ptr %26, align 8
|
%25 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %22, align 8
|
||||||
%27 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
%26 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
||||||
%28 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %27, i32 0, i32 0
|
%27 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %26, i64 0
|
||||||
store ptr %24, ptr %28, align 8
|
store %"github.com/goplus/llgo/internal/abi.StructField" %11, ptr %27, align 8
|
||||||
%29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %27, i32 0, i32 1
|
%28 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %26, i64 1
|
||||||
store i64 2, ptr %29, align 4
|
store %"github.com/goplus/llgo/internal/abi.StructField" %21, ptr %28, align 8
|
||||||
%30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %27, i32 0, i32 2
|
%29 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
||||||
store i64 2, ptr %30, align 4
|
%30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %29, i32 0, i32 0
|
||||||
%31 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %27, align 8
|
store ptr %26, ptr %30, align 8
|
||||||
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %23, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %31)
|
%31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %29, i32 0, i32 1
|
||||||
%33 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
store i64 2, ptr %31, align 4
|
||||||
%34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %33, i32 0, i32 0
|
%32 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %29, i32 0, i32 2
|
||||||
store ptr @9, ptr %34, align 8
|
store i64 2, ptr %32, align 4
|
||||||
%35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %33, i32 0, i32 1
|
%33 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %29, align 8
|
||||||
store i64 8, ptr %35, align 4
|
%34 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %25, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %33)
|
||||||
%36 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %33, align 8
|
%35 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
%37 = call ptr @"github.com/goplus/llgo/internal/runtime.Named"(%"github.com/goplus/llgo/internal/runtime.String" %36, ptr %32)
|
%36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %35, i32 0, i32 0
|
||||||
store ptr %37, ptr @main.bar, align 8
|
store ptr @6, ptr %36, align 8
|
||||||
|
%37 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %35, i32 0, i32 1
|
||||||
|
store i64 4, ptr %37, align 4
|
||||||
|
%38 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %35, align 8
|
||||||
|
%39 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
|
%40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %39, i32 0, i32 0
|
||||||
|
store ptr @7, ptr %40, align 8
|
||||||
|
%41 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %39, i32 0, i32 1
|
||||||
|
store i64 42, ptr %41, align 4
|
||||||
|
%42 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %39, align 8
|
||||||
|
%43 = call ptr @"github.com/goplus/llgo/internal/runtime.Named"(%"github.com/goplus/llgo/internal/runtime.String" %38, %"github.com/goplus/llgo/internal/runtime.String" %42, ptr %34, { ptr, i64, i64 } zeroinitializer)
|
||||||
|
store ptr %43, ptr @"github.com/goplus/llgo/cl/internal/foo.Foo", align 8
|
||||||
|
br label %_llgo_2
|
||||||
|
|
||||||
|
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||||
|
%44 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
|
%45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %44, i32 0, i32 0
|
||||||
|
store ptr @8, ptr %45, align 8
|
||||||
|
%46 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %44, i32 0, i32 1
|
||||||
|
store i64 2, ptr %46, align 4
|
||||||
|
%47 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %44, align 8
|
||||||
|
%48 = load ptr, ptr @"*_llgo_byte", align 8
|
||||||
|
%49 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
|
%50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %49, i32 0, i32 0
|
||||||
|
store ptr @9, ptr %50, align 8
|
||||||
|
%51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %49, i32 0, i32 1
|
||||||
|
store i64 0, ptr %51, align 4
|
||||||
|
%52 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %49, align 8
|
||||||
|
%53 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %47, ptr %48, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %52, i1 false)
|
||||||
|
%54 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
|
%55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %54, i32 0, i32 0
|
||||||
|
store ptr @10, ptr %55, align 8
|
||||||
|
%56 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %54, i32 0, i32 1
|
||||||
|
store i64 1, ptr %56, align 4
|
||||||
|
%57 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %54, align 8
|
||||||
|
%58 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 13)
|
||||||
|
%59 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
|
%60 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %59, i32 0, i32 0
|
||||||
|
store ptr @11, ptr %60, align 8
|
||||||
|
%61 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %59, i32 0, i32 1
|
||||||
|
store i64 0, ptr %61, align 4
|
||||||
|
%62 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %59, align 8
|
||||||
|
%63 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %57, ptr %58, i64 8, %"github.com/goplus/llgo/internal/runtime.String" %62, i1 false)
|
||||||
|
%64 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
|
%65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %64, i32 0, i32 0
|
||||||
|
store ptr @12, ptr %65, align 8
|
||||||
|
%66 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %64, i32 0, i32 1
|
||||||
|
store i64 4, ptr %66, align 4
|
||||||
|
%67 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %64, align 8
|
||||||
|
%68 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
||||||
|
%69 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %68, i64 0
|
||||||
|
store %"github.com/goplus/llgo/internal/abi.StructField" %53, ptr %69, align 8
|
||||||
|
%70 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %68, i64 1
|
||||||
|
store %"github.com/goplus/llgo/internal/abi.StructField" %63, ptr %70, align 8
|
||||||
|
%71 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
||||||
|
%72 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %71, i32 0, i32 0
|
||||||
|
store ptr %68, ptr %72, align 8
|
||||||
|
%73 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %71, i32 0, i32 1
|
||||||
|
store i64 2, ptr %73, align 4
|
||||||
|
%74 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %71, i32 0, i32 2
|
||||||
|
store i64 2, ptr %74, align 4
|
||||||
|
%75 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %71, align 8
|
||||||
|
%76 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %67, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %75)
|
||||||
|
%77 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
|
%78 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %77, i32 0, i32 0
|
||||||
|
store ptr @13, ptr %78, align 8
|
||||||
|
%79 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %77, i32 0, i32 1
|
||||||
|
store i64 4, ptr %79, align 4
|
||||||
|
%80 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %77, align 8
|
||||||
|
%81 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
||||||
|
%82 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %81, i32 0, i32 0
|
||||||
|
store ptr @14, ptr %82, align 8
|
||||||
|
%83 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %81, i32 0, i32 1
|
||||||
|
store i64 8, ptr %83, align 4
|
||||||
|
%84 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %81, align 8
|
||||||
|
%85 = call ptr @"github.com/goplus/llgo/internal/runtime.Named"(%"github.com/goplus/llgo/internal/runtime.String" %80, %"github.com/goplus/llgo/internal/runtime.String" %84, ptr %76, { ptr, i64, i64 } zeroinitializer)
|
||||||
|
store ptr %85, ptr @main.bar, align 8
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,6 +341,4 @@ declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/l
|
|||||||
|
|
||||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||||
|
|
||||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
|
||||||
|
|
||||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Named"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", ptr, %"github.com/goplus/llgo/internal/runtime.Slice")
|
declare ptr @"github.com/goplus/llgo/internal/runtime.Named"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", ptr, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
; ModuleID = 'main'
|
; ModuleID = 'main'
|
||||||
source_filename = "main"
|
source_filename = "main"
|
||||||
|
|
||||||
%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/abi.Name", ptr }
|
%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr }
|
||||||
%"github.com/goplus/llgo/internal/abi.Name" = type { ptr }
|
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||||
|
|
||||||
@main.basicTypes = global [25 x ptr] undef
|
@main.basicTypes = global [25 x ptr] undef
|
||||||
@"main.init$guard" = global ptr null
|
@"main.init$guard" = global ptr null
|
||||||
@@ -20,7 +20,7 @@ _llgo_0:
|
|||||||
|
|
||||||
define ptr @main.basicType(i64 %0) {
|
define ptr @main.basicType(i64 %0) {
|
||||||
_llgo_0:
|
_llgo_0:
|
||||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 64)
|
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 72)
|
||||||
%2 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %1, i32 0, i32 0
|
%2 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %1, i32 0, i32 0
|
||||||
%3 = getelementptr inbounds i64, ptr @main.sizeBasicTypes, i64 %0
|
%3 = getelementptr inbounds i64, ptr @main.sizeBasicTypes, i64 %0
|
||||||
%4 = load i64, ptr %3, align 4
|
%4 = load i64, ptr %3, align 4
|
||||||
|
|||||||
Reference in New Issue
Block a user