|
|
|
@@ -12,20 +12,22 @@ source_filename = "main"
|
|
|
|
@main.bar = global ptr null
|
|
|
|
@main.bar = global ptr null
|
|
|
|
@__llgo_argc = global ptr null
|
|
|
|
@__llgo_argc = global ptr null
|
|
|
|
@__llgo_argv = global ptr null
|
|
|
|
@__llgo_argv = global ptr null
|
|
|
|
@0 = private unnamed_addr constant [3 x i8] c"Hi\00", align 1
|
|
|
|
@0 = private unnamed_addr constant [3 x i8] c"pb\00", align 1
|
|
|
|
@1 = private unnamed_addr constant [3 x i8] c"pb\00", align 1
|
|
|
|
|
|
|
|
@"*_llgo_byte" = linkonce global ptr null
|
|
|
|
@"*_llgo_byte" = linkonce global ptr null
|
|
|
|
@2 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
|
|
|
@1 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
|
|
|
@3 = private unnamed_addr constant [2 x i8] c"f\00", align 1
|
|
|
|
@2 = private unnamed_addr constant [2 x i8] c"f\00", align 1
|
|
|
|
@4 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
|
|
|
@3 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
|
|
|
@5 = private unnamed_addr constant [5 x i8] c"main\00", align 1
|
|
|
|
@4 = private unnamed_addr constant [5 x i8] c"main\00", align 1
|
|
|
|
@6 = private unnamed_addr constant [9 x i8] c"main.bar\00", align 1
|
|
|
|
@5 = 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 { %main.bar, i1 } @main.Foo(%"github.com/goplus/llgo/internal/runtime.eface" %0) {
|
|
|
|
_llgo_0:
|
|
|
|
_llgo_0:
|
|
|
|
%1 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 0
|
|
|
|
%1 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 0
|
|
|
|
%2 = load ptr, ptr @main.bar, align 8
|
|
|
|
%2 = load ptr, ptr @main.bar, align 8
|
|
|
|
%3 = icmp eq ptr %1, %2
|
|
|
|
%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
|
|
|
|
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 1
|
|
|
|
%5 = load %main.bar, ptr %4, align 8
|
|
|
|
%5 = load %main.bar, ptr %4, align 8
|
|
|
|
%6 = alloca { %main.bar, i1 }, align 8
|
|
|
|
%6 = alloca { %main.bar, i1 }, align 8
|
|
|
|
@@ -34,13 +36,19 @@ _llgo_0:
|
|
|
|
%8 = getelementptr inbounds { %main.bar, i1 }, ptr %6, i32 0, i32 1
|
|
|
|
%8 = getelementptr inbounds { %main.bar, i1 }, ptr %6, i32 0, i32 1
|
|
|
|
store i1 true, ptr %8, align 1
|
|
|
|
store i1 true, ptr %8, align 1
|
|
|
|
%9 = load { %main.bar, i1 }, ptr %6, align 8
|
|
|
|
%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
|
|
|
|
%10 = alloca { %main.bar, i1 }, align 8
|
|
|
|
%11 = getelementptr inbounds { %main.bar, i1 }, ptr %10, i32 0, i32 0
|
|
|
|
%11 = getelementptr inbounds { %main.bar, i1 }, ptr %10, i32 0, i32 0
|
|
|
|
store { ptr, double } zeroinitializer, ptr %11, align 8
|
|
|
|
store { ptr, double } zeroinitializer, ptr %11, align 8
|
|
|
|
%12 = getelementptr inbounds { %main.bar, i1 }, ptr %10, i32 0, i32 1
|
|
|
|
%12 = getelementptr inbounds { %main.bar, i1 }, ptr %10, i32 0, i32 1
|
|
|
|
store i1 false, ptr %12, align 1
|
|
|
|
store i1 false, ptr %12, align 1
|
|
|
|
%13 = load { %main.bar, i1 }, ptr %10, align 8
|
|
|
|
%13 = load { %main.bar, i1 }, ptr %10, align 8
|
|
|
|
%14 = select i1 %3, { %main.bar, i1 } %9, { %main.bar, i1 } %13
|
|
|
|
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
|
|
|
|
%15 = extractvalue { %main.bar, i1 } %14, 0
|
|
|
|
%16 = extractvalue { %main.bar, i1 } %14, 1
|
|
|
|
%16 = extractvalue { %main.bar, i1 } %14, 1
|
|
|
|
%mrv = insertvalue { %main.bar, i1 } poison, %main.bar %15, 0
|
|
|
|
%mrv = insertvalue { %main.bar, i1 } poison, %main.bar %15, 0
|
|
|
|
@@ -74,22 +82,14 @@ _llgo_0:
|
|
|
|
%5 = extractvalue { %main.bar, i1 } %4, 0
|
|
|
|
%5 = extractvalue { %main.bar, i1 } %4, 0
|
|
|
|
store %main.bar %5, ptr %3, align 8
|
|
|
|
store %main.bar %5, ptr %3, align 8
|
|
|
|
%6 = extractvalue { %main.bar, i1 } %4, 1
|
|
|
|
%6 = extractvalue { %main.bar, i1 } %4, 1
|
|
|
|
%7 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
%7 = getelementptr inbounds %main.bar, ptr %3, i32 0, i32 0
|
|
|
|
%8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %7, i32 0, i32 0
|
|
|
|
%8 = load ptr, ptr %7, align 8
|
|
|
|
store ptr @0, ptr %8, align 8
|
|
|
|
%9 = getelementptr inbounds %main.bar, ptr %3, i32 0, i32 1
|
|
|
|
%9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %7, i32 0, i32 1
|
|
|
|
%10 = load float, ptr %9, align 4
|
|
|
|
store i64 2, ptr %9, align 4
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %8)
|
|
|
|
%10 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %7, align 8
|
|
|
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %10)
|
|
|
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
|
|
|
|
|
|
|
%11 = getelementptr inbounds %main.bar, ptr %3, i32 0, i32 0
|
|
|
|
|
|
|
|
%12 = load ptr, ptr %11, align 8
|
|
|
|
|
|
|
|
%13 = getelementptr inbounds %main.bar, ptr %3, i32 0, i32 1
|
|
|
|
|
|
|
|
%14 = load float, ptr %13, align 4
|
|
|
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %12)
|
|
|
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
|
|
|
%15 = fpext float %14 to double
|
|
|
|
%11 = fpext float %10 to double
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %15)
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %11)
|
|
|
|
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.PrintBool"(i1 %6)
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %6)
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
|
|
|
@@ -100,12 +100,10 @@ declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
|
|
|
|
|
|
|
|
|
|
|
declare ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr, i64)
|
|
|
|
declare ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr, i64)
|
|
|
|
|
|
|
|
|
|
|
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
|
|
|
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.PrintByte"(i8)
|
|
|
|
|
|
|
|
|
|
|
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.PrintBool"(i1)
|
|
|
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
|
|
|
@@ -114,35 +112,35 @@ define void @"main.init$abi"() {
|
|
|
|
_llgo_0:
|
|
|
|
_llgo_0:
|
|
|
|
%0 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
%0 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
%1 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 0
|
|
|
|
%1 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 0
|
|
|
|
store ptr @1, ptr %1, align 8
|
|
|
|
store ptr @0, ptr %1, align 8
|
|
|
|
%2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 1
|
|
|
|
%2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 1
|
|
|
|
store i64 2, ptr %2, align 4
|
|
|
|
store i64 2, ptr %2, align 4
|
|
|
|
%3 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %0, align 8
|
|
|
|
%3 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %0, align 8
|
|
|
|
%4 = load ptr, ptr @"*_llgo_byte", align 8
|
|
|
|
%4 = load ptr, ptr @"*_llgo_byte", align 8
|
|
|
|
%5 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
%5 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
%6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %5, i32 0, i32 0
|
|
|
|
%6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %5, i32 0, i32 0
|
|
|
|
store ptr @2, ptr %6, align 8
|
|
|
|
store ptr @1, ptr %6, align 8
|
|
|
|
%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, 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 @3, ptr %11, align 8
|
|
|
|
store ptr @2, 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 1, ptr %12, align 4
|
|
|
|
store i64 1, 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 ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 13)
|
|
|
|
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 13)
|
|
|
|
%15 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
%15 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
%16 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %15, i32 0, i32 0
|
|
|
|
%16 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %15, i32 0, i32 0
|
|
|
|
store ptr @4, ptr %16, align 8
|
|
|
|
store ptr @3, ptr %16, align 8
|
|
|
|
%17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %15, i32 0, i32 1
|
|
|
|
%17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %15, i32 0, i32 1
|
|
|
|
store i64 0, ptr %17, align 4
|
|
|
|
store i64 0, ptr %17, align 4
|
|
|
|
%18 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %15, align 8
|
|
|
|
%18 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %15, 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, i1 false)
|
|
|
|
%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, i1 false)
|
|
|
|
%20 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
%20 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
%21 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 0
|
|
|
|
%21 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 0
|
|
|
|
store ptr @5, ptr %21, align 8
|
|
|
|
store ptr @4, ptr %21, align 8
|
|
|
|
%22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 1
|
|
|
|
%22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 1
|
|
|
|
store i64 4, ptr %22, align 4
|
|
|
|
store i64 4, ptr %22, align 4
|
|
|
|
%23 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %20, align 8
|
|
|
|
%23 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %20, align 8
|
|
|
|
@@ -162,7 +160,7 @@ _llgo_0:
|
|
|
|
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %23, %"github.com/goplus/llgo/internal/runtime.Slice" %31)
|
|
|
|
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %23, %"github.com/goplus/llgo/internal/runtime.Slice" %31)
|
|
|
|
%33 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
%33 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
%34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %33, i32 0, i32 0
|
|
|
|
%34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %33, i32 0, i32 0
|
|
|
|
store ptr @6, ptr %34, align 8
|
|
|
|
store ptr @5, ptr %34, align 8
|
|
|
|
%35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %33, i32 0, i32 1
|
|
|
|
%35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %33, i32 0, i32 1
|
|
|
|
store i64 8, ptr %35, align 4
|
|
|
|
store i64 8, ptr %35, align 4
|
|
|
|
%36 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %33, align 8
|
|
|
|
%36 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %33, align 8
|
|
|
|
|