614 lines
34 KiB
LLVM
614 lines
34 KiB
LLVM
; ModuleID = 'main'
|
|
source_filename = "main"
|
|
|
|
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
|
%main.eface = type { ptr, ptr }
|
|
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
|
%"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/runtime.Slice" = type { ptr, i64, 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 }
|
|
|
|
@"main.init$guard" = global ptr null
|
|
@0 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
|
@__llgo_argc = global ptr null
|
|
@__llgo_argv = global ptr null
|
|
@_llgo_bool = linkonce global ptr null
|
|
@_llgo_int = linkonce global ptr null
|
|
@_llgo_int8 = linkonce global ptr null
|
|
@_llgo_int16 = linkonce global ptr null
|
|
@_llgo_int32 = linkonce global ptr null
|
|
@_llgo_int64 = linkonce global ptr null
|
|
@_llgo_uint = linkonce global ptr null
|
|
@_llgo_uint8 = linkonce global ptr null
|
|
@_llgo_uint16 = linkonce global ptr null
|
|
@_llgo_uint32 = linkonce global ptr null
|
|
@_llgo_uint64 = linkonce global ptr null
|
|
@_llgo_uintptr = linkonce global ptr null
|
|
@_llgo_float32 = linkonce global ptr null
|
|
@_llgo_float64 = linkonce global ptr null
|
|
@"[10]_llgo_int" = linkonce global ptr null
|
|
@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null
|
|
@"*_llgo_int" = linkonce global ptr null
|
|
@"[]_llgo_int" = linkonce global ptr null
|
|
@1 = private unnamed_addr constant [6 x i8] c"hello\00", align 1
|
|
@_llgo_string = linkonce global ptr null
|
|
@"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM" = global ptr null
|
|
@2 = private unnamed_addr constant [2 x i8] c"x\00", align 1
|
|
@3 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
|
@4 = private unnamed_addr constant [2 x i8] c"y\00", align 1
|
|
@5 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
|
@6 = private unnamed_addr constant [2 x i8] c"z\00", align 1
|
|
@7 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
|
@8 = private unnamed_addr constant [5 x i8] c"main\00", align 1
|
|
|
|
define void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %0) {
|
|
_llgo_0:
|
|
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
|
store %"github.com/goplus/llgo/internal/runtime.eface" %0, ptr %1, align 8
|
|
%2 = getelementptr inbounds %main.eface, ptr %1, i32 0, i32 0
|
|
%3 = load ptr, ptr %2, align 8
|
|
%4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
%5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0
|
|
store ptr @0, ptr %5, align 8
|
|
%6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1
|
|
store i64 0, ptr %6, align 4
|
|
%7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8
|
|
call void @main.dumpTyp(ptr %3, %"github.com/goplus/llgo/internal/runtime.String" %7)
|
|
ret void
|
|
}
|
|
|
|
define void @main.dumpTyp(ptr %0, %"github.com/goplus/llgo/internal/runtime.String" %1) {
|
|
_llgo_0:
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %1)
|
|
%2 = call i64 @"(*github.com/goplus/llgo/internal/abi.Type).Kind"(ptr %0)
|
|
%3 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 0
|
|
%4 = load i64, ptr %3, align 4
|
|
%5 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 1
|
|
%6 = load i64, ptr %5, align 4
|
|
%7 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 2
|
|
%8 = load i32, ptr %7, align 4
|
|
%9 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 3
|
|
%10 = load i8, ptr %9, align 1
|
|
%11 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 4
|
|
%12 = load i8, ptr %11, align 1
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %2)
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %4)
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %6)
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
|
%13 = zext i32 %8 to i64
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %13)
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
|
%14 = zext i8 %10 to i64
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %14)
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
|
%15 = zext i8 %12 to i64
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %15)
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
|
ret void
|
|
}
|
|
|
|
define void @main.init() {
|
|
_llgo_0:
|
|
%0 = load i1, ptr @"main.init$guard", align 1
|
|
br i1 %0, label %_llgo_2, label %_llgo_1
|
|
|
|
_llgo_1: ; preds = %_llgo_0
|
|
store i1 true, ptr @"main.init$guard", align 1
|
|
call void @"github.com/goplus/llgo/internal/abi.init"()
|
|
call void @"main.init$abi"()
|
|
br label %_llgo_2
|
|
|
|
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
|
ret void
|
|
}
|
|
|
|
define i32 @main(i32 %0, ptr %1) {
|
|
_llgo_0:
|
|
store i32 %0, ptr @__llgo_argc, align 4
|
|
store ptr %1, ptr @__llgo_argv, align 8
|
|
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
|
call void @main.init()
|
|
%2 = load ptr, ptr @_llgo_bool, align 8
|
|
%3 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %3, i32 0, i32 0
|
|
store ptr %2, ptr %4, align 8
|
|
%5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %3, i32 0, i32 1
|
|
store ptr inttoptr (i64 -1 to ptr), ptr %5, align 8
|
|
%6 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %3, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %6)
|
|
%7 = load ptr, ptr @_llgo_int, align 8
|
|
%8 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, i32 0, i32 0
|
|
store ptr %7, ptr %9, align 8
|
|
%10 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, i32 0, i32 1
|
|
store ptr null, ptr %10, align 8
|
|
%11 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %11)
|
|
%12 = load ptr, ptr @_llgo_int8, align 8
|
|
%13 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%14 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %13, i32 0, i32 0
|
|
store ptr %12, ptr %14, align 8
|
|
%15 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %13, i32 0, i32 1
|
|
store ptr null, ptr %15, align 8
|
|
%16 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %13, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %16)
|
|
%17 = load ptr, ptr @_llgo_int16, align 8
|
|
%18 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %18, i32 0, i32 0
|
|
store ptr %17, ptr %19, align 8
|
|
%20 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %18, i32 0, i32 1
|
|
store ptr null, ptr %20, align 8
|
|
%21 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %18, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %21)
|
|
%22 = load ptr, ptr @_llgo_int32, align 8
|
|
%23 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%24 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %23, i32 0, i32 0
|
|
store ptr %22, ptr %24, align 8
|
|
%25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %23, i32 0, i32 1
|
|
store ptr null, ptr %25, align 8
|
|
%26 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %23, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %26)
|
|
%27 = load ptr, ptr @_llgo_int64, align 8
|
|
%28 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, i32 0, i32 0
|
|
store ptr %27, ptr %29, align 8
|
|
%30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, i32 0, i32 1
|
|
store ptr null, ptr %30, align 8
|
|
%31 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %31)
|
|
%32 = load ptr, ptr @_llgo_uint, align 8
|
|
%33 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %33, i32 0, i32 0
|
|
store ptr %32, ptr %34, align 8
|
|
%35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %33, i32 0, i32 1
|
|
store ptr null, ptr %35, align 8
|
|
%36 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %33, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %36)
|
|
%37 = load ptr, ptr @_llgo_uint8, align 8
|
|
%38 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%39 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %38, i32 0, i32 0
|
|
store ptr %37, ptr %39, align 8
|
|
%40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %38, i32 0, i32 1
|
|
store ptr null, ptr %40, align 8
|
|
%41 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %38, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %41)
|
|
%42 = load ptr, ptr @_llgo_uint16, align 8
|
|
%43 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %43, i32 0, i32 0
|
|
store ptr %42, ptr %44, align 8
|
|
%45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %43, i32 0, i32 1
|
|
store ptr null, ptr %45, align 8
|
|
%46 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %43, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %46)
|
|
%47 = load ptr, ptr @_llgo_uint32, align 8
|
|
%48 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%49 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %48, i32 0, i32 0
|
|
store ptr %47, ptr %49, align 8
|
|
%50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %48, i32 0, i32 1
|
|
store ptr null, ptr %50, align 8
|
|
%51 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %48, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %51)
|
|
%52 = load ptr, ptr @_llgo_uint64, align 8
|
|
%53 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, i32 0, i32 0
|
|
store ptr %52, ptr %54, align 8
|
|
%55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, i32 0, i32 1
|
|
store ptr null, ptr %55, align 8
|
|
%56 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %56)
|
|
%57 = load ptr, ptr @_llgo_uintptr, align 8
|
|
%58 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%59 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %58, i32 0, i32 0
|
|
store ptr %57, ptr %59, align 8
|
|
%60 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %58, i32 0, i32 1
|
|
store ptr null, ptr %60, align 8
|
|
%61 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %58, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %61)
|
|
%62 = load ptr, ptr @_llgo_float32, align 8
|
|
%63 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %63, i32 0, i32 0
|
|
store ptr %62, ptr %64, align 8
|
|
%65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %63, i32 0, i32 1
|
|
store ptr null, ptr %65, align 8
|
|
%66 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %63, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %66)
|
|
%67 = load ptr, ptr @_llgo_float64, align 8
|
|
%68 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%69 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i32 0, i32 0
|
|
store ptr %67, ptr %69, align 8
|
|
%70 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i32 0, i32 1
|
|
store ptr null, ptr %70, align 8
|
|
%71 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %71)
|
|
%72 = load ptr, ptr @"[10]_llgo_int", align 8
|
|
%73 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80)
|
|
store [10 x i64] zeroinitializer, ptr %73, align 4
|
|
%74 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%75 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %74, i32 0, i32 0
|
|
store ptr %72, ptr %75, align 8
|
|
%76 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %74, i32 0, i32 1
|
|
store ptr %73, ptr %76, align 8
|
|
%77 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %74, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %77)
|
|
%78 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
|
%79 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %79, i32 0, i32 0
|
|
store ptr %78, ptr %80, align 8
|
|
%81 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %79, i32 0, i32 1
|
|
store ptr @"main.main$1", ptr %81, align 8
|
|
%82 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %79, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %82)
|
|
%83 = load ptr, ptr @"*_llgo_int", align 8
|
|
%84 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %84, i32 0, i32 0
|
|
store ptr %83, ptr %85, align 8
|
|
%86 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %84, i32 0, i32 1
|
|
store ptr null, ptr %86, align 8
|
|
%87 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %84, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %87)
|
|
%88 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 0)
|
|
%89 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
|
%90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, i32 0, i32 0
|
|
store ptr %88, ptr %90, align 8
|
|
%91 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, i32 0, i32 1
|
|
store i64 0, ptr %91, align 4
|
|
%92 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, i32 0, i32 2
|
|
store i64 0, ptr %92, align 4
|
|
%93 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, align 8
|
|
%94 = load ptr, ptr @"[]_llgo_int", align 8
|
|
%95 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
|
store %"github.com/goplus/llgo/internal/runtime.Slice" %93, ptr %95, align 8
|
|
%96 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%97 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %96, i32 0, i32 0
|
|
store ptr %94, ptr %97, align 8
|
|
%98 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %96, i32 0, i32 1
|
|
store ptr %95, ptr %98, align 8
|
|
%99 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %96, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %99)
|
|
%100 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
%101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 0
|
|
store ptr @1, ptr %101, align 8
|
|
%102 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 1
|
|
store i64 5, ptr %102, align 4
|
|
%103 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %100, align 8
|
|
%104 = load ptr, ptr @_llgo_string, align 8
|
|
%105 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
|
store %"github.com/goplus/llgo/internal/runtime.String" %103, ptr %105, align 8
|
|
%106 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%107 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %106, i32 0, i32 0
|
|
store ptr %104, ptr %107, align 8
|
|
%108 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %106, i32 0, i32 1
|
|
store ptr %105, ptr %108, align 8
|
|
%109 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %106, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %109)
|
|
%110 = load ptr, ptr @"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8
|
|
%111 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
|
store { i8, i64, i64 } zeroinitializer, ptr %111, align 4
|
|
%112 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
%113 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, i32 0, i32 0
|
|
store ptr %110, ptr %113, align 8
|
|
%114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, i32 0, i32 1
|
|
store ptr %111, ptr %114, align 8
|
|
%115 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, align 8
|
|
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %115)
|
|
ret i32 0
|
|
}
|
|
|
|
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
|
|
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
|
|
|
declare i64 @"(*github.com/goplus/llgo/internal/abi.Type).Kind"(ptr)
|
|
|
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64)
|
|
|
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
|
|
|
declare void @"github.com/goplus/llgo/internal/abi.init"()
|
|
|
|
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
|
|
|
define void @"main.init$abi"() {
|
|
_llgo_0:
|
|
%0 = load ptr, ptr @_llgo_bool, align 8
|
|
%1 = icmp eq ptr %0, null
|
|
br i1 %1, label %_llgo_1, label %_llgo_2
|
|
|
|
_llgo_1: ; preds = %_llgo_0
|
|
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 1)
|
|
store ptr %2, ptr @_llgo_bool, align 8
|
|
br label %_llgo_2
|
|
|
|
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
|
%3 = load ptr, ptr @_llgo_int, align 8
|
|
%4 = icmp eq ptr %3, null
|
|
br i1 %4, label %_llgo_3, label %_llgo_4
|
|
|
|
_llgo_3: ; preds = %_llgo_2
|
|
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2)
|
|
store ptr %5, ptr @_llgo_int, align 8
|
|
br label %_llgo_4
|
|
|
|
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
|
%6 = load ptr, ptr @_llgo_int8, align 8
|
|
%7 = icmp eq ptr %6, null
|
|
br i1 %7, label %_llgo_5, label %_llgo_6
|
|
|
|
_llgo_5: ; preds = %_llgo_4
|
|
%8 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 3)
|
|
store ptr %8, ptr @_llgo_int8, align 8
|
|
br label %_llgo_6
|
|
|
|
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
|
%9 = load ptr, ptr @_llgo_int16, align 8
|
|
%10 = icmp eq ptr %9, null
|
|
br i1 %10, label %_llgo_7, label %_llgo_8
|
|
|
|
_llgo_7: ; preds = %_llgo_6
|
|
%11 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 4)
|
|
store ptr %11, ptr @_llgo_int16, align 8
|
|
br label %_llgo_8
|
|
|
|
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
|
%12 = load ptr, ptr @_llgo_int32, align 8
|
|
%13 = icmp eq ptr %12, null
|
|
br i1 %13, label %_llgo_9, label %_llgo_10
|
|
|
|
_llgo_9: ; preds = %_llgo_8
|
|
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 5)
|
|
store ptr %14, ptr @_llgo_int32, align 8
|
|
br label %_llgo_10
|
|
|
|
_llgo_10: ; preds = %_llgo_9, %_llgo_8
|
|
%15 = load ptr, ptr @_llgo_int64, align 8
|
|
%16 = icmp eq ptr %15, null
|
|
br i1 %16, label %_llgo_11, label %_llgo_12
|
|
|
|
_llgo_11: ; preds = %_llgo_10
|
|
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 6)
|
|
store ptr %17, ptr @_llgo_int64, align 8
|
|
br label %_llgo_12
|
|
|
|
_llgo_12: ; preds = %_llgo_11, %_llgo_10
|
|
%18 = load ptr, ptr @_llgo_uint, align 8
|
|
%19 = icmp eq ptr %18, null
|
|
br i1 %19, label %_llgo_13, label %_llgo_14
|
|
|
|
_llgo_13: ; preds = %_llgo_12
|
|
%20 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 7)
|
|
store ptr %20, ptr @_llgo_uint, align 8
|
|
br label %_llgo_14
|
|
|
|
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
|
%21 = load ptr, ptr @_llgo_uint8, align 8
|
|
%22 = icmp eq ptr %21, null
|
|
br i1 %22, label %_llgo_15, label %_llgo_16
|
|
|
|
_llgo_15: ; preds = %_llgo_14
|
|
%23 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 8)
|
|
store ptr %23, ptr @_llgo_uint8, align 8
|
|
br label %_llgo_16
|
|
|
|
_llgo_16: ; preds = %_llgo_15, %_llgo_14
|
|
%24 = load ptr, ptr @_llgo_uint16, align 8
|
|
%25 = icmp eq ptr %24, null
|
|
br i1 %25, label %_llgo_17, label %_llgo_18
|
|
|
|
_llgo_17: ; preds = %_llgo_16
|
|
%26 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 9)
|
|
store ptr %26, ptr @_llgo_uint16, align 8
|
|
br label %_llgo_18
|
|
|
|
_llgo_18: ; preds = %_llgo_17, %_llgo_16
|
|
%27 = load ptr, ptr @_llgo_uint32, align 8
|
|
%28 = icmp eq ptr %27, null
|
|
br i1 %28, label %_llgo_19, label %_llgo_20
|
|
|
|
_llgo_19: ; preds = %_llgo_18
|
|
%29 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 10)
|
|
store ptr %29, ptr @_llgo_uint32, align 8
|
|
br label %_llgo_20
|
|
|
|
_llgo_20: ; preds = %_llgo_19, %_llgo_18
|
|
%30 = load ptr, ptr @_llgo_uint64, align 8
|
|
%31 = icmp eq ptr %30, null
|
|
br i1 %31, label %_llgo_21, label %_llgo_22
|
|
|
|
_llgo_21: ; preds = %_llgo_20
|
|
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 11)
|
|
store ptr %32, ptr @_llgo_uint64, align 8
|
|
br label %_llgo_22
|
|
|
|
_llgo_22: ; preds = %_llgo_21, %_llgo_20
|
|
%33 = load ptr, ptr @_llgo_uintptr, align 8
|
|
%34 = icmp eq ptr %33, null
|
|
br i1 %34, label %_llgo_23, label %_llgo_24
|
|
|
|
_llgo_23: ; preds = %_llgo_22
|
|
%35 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 12)
|
|
store ptr %35, ptr @_llgo_uintptr, align 8
|
|
br label %_llgo_24
|
|
|
|
_llgo_24: ; preds = %_llgo_23, %_llgo_22
|
|
%36 = load ptr, ptr @_llgo_float32, align 8
|
|
%37 = icmp eq ptr %36, null
|
|
br i1 %37, label %_llgo_25, label %_llgo_26
|
|
|
|
_llgo_25: ; preds = %_llgo_24
|
|
%38 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 13)
|
|
store ptr %38, ptr @_llgo_float32, align 8
|
|
br label %_llgo_26
|
|
|
|
_llgo_26: ; preds = %_llgo_25, %_llgo_24
|
|
%39 = load ptr, ptr @_llgo_float64, align 8
|
|
%40 = icmp eq ptr %39, null
|
|
br i1 %40, label %_llgo_27, label %_llgo_28
|
|
|
|
_llgo_27: ; preds = %_llgo_26
|
|
%41 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 14)
|
|
store ptr %41, ptr @_llgo_float64, align 8
|
|
br label %_llgo_28
|
|
|
|
_llgo_28: ; preds = %_llgo_27, %_llgo_26
|
|
%42 = load ptr, ptr @_llgo_int, align 8
|
|
%43 = load ptr, ptr @"[10]_llgo_int", align 8
|
|
%44 = icmp eq ptr %43, null
|
|
br i1 %44, label %_llgo_29, label %_llgo_30
|
|
|
|
_llgo_29: ; preds = %_llgo_28
|
|
%45 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 10, ptr %42)
|
|
store ptr %45, ptr @"[10]_llgo_int", align 8
|
|
br label %_llgo_30
|
|
|
|
_llgo_30: ; preds = %_llgo_29, %_llgo_28
|
|
%46 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
|
%47 = icmp eq ptr %46, null
|
|
br i1 %47, label %_llgo_31, label %_llgo_32
|
|
|
|
_llgo_31: ; preds = %_llgo_30
|
|
%48 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
|
%49 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
|
%50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 0
|
|
store ptr %48, ptr %50, align 8
|
|
%51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 1
|
|
store i64 0, ptr %51, align 4
|
|
%52 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 2
|
|
store i64 0, ptr %52, align 4
|
|
%53 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, align 8
|
|
%54 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
|
%55 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
|
%56 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %55, i32 0, i32 0
|
|
store ptr %54, ptr %56, align 8
|
|
%57 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %55, i32 0, i32 1
|
|
store i64 0, ptr %57, align 4
|
|
%58 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %55, i32 0, i32 2
|
|
store i64 0, ptr %58, align 4
|
|
%59 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %55, align 8
|
|
%60 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %53, %"github.com/goplus/llgo/internal/runtime.Slice" %59, i1 false)
|
|
store ptr %60, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
|
br label %_llgo_32
|
|
|
|
_llgo_32: ; preds = %_llgo_31, %_llgo_30
|
|
%61 = load ptr, ptr @_llgo_int, align 8
|
|
%62 = load ptr, ptr @"*_llgo_int", align 8
|
|
%63 = icmp eq ptr %62, null
|
|
br i1 %63, label %_llgo_33, label %_llgo_34
|
|
|
|
_llgo_33: ; preds = %_llgo_32
|
|
%64 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %61)
|
|
store ptr %64, ptr @"*_llgo_int", align 8
|
|
br label %_llgo_34
|
|
|
|
_llgo_34: ; preds = %_llgo_33, %_llgo_32
|
|
%65 = load ptr, ptr @_llgo_int, align 8
|
|
%66 = load ptr, ptr @"[]_llgo_int", align 8
|
|
%67 = icmp eq ptr %66, null
|
|
br i1 %67, label %_llgo_35, label %_llgo_36
|
|
|
|
_llgo_35: ; preds = %_llgo_34
|
|
%68 = call ptr @"github.com/goplus/llgo/internal/runtime.SliceOf"(ptr %65)
|
|
store ptr %68, ptr @"[]_llgo_int", align 8
|
|
br label %_llgo_36
|
|
|
|
_llgo_36: ; preds = %_llgo_35, %_llgo_34
|
|
%69 = load ptr, ptr @_llgo_string, align 8
|
|
%70 = icmp eq ptr %69, null
|
|
br i1 %70, label %_llgo_37, label %_llgo_38
|
|
|
|
_llgo_37: ; preds = %_llgo_36
|
|
%71 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
|
store ptr %71, ptr @_llgo_string, align 8
|
|
br label %_llgo_38
|
|
|
|
_llgo_38: ; preds = %_llgo_37, %_llgo_36
|
|
%72 = load ptr, ptr @_llgo_int8, align 8
|
|
%73 = load ptr, ptr @_llgo_int, align 8
|
|
%74 = load ptr, ptr @_llgo_int, align 8
|
|
%75 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
%76 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %75, i32 0, i32 0
|
|
store ptr @2, ptr %76, align 8
|
|
%77 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %75, i32 0, i32 1
|
|
store i64 1, ptr %77, align 4
|
|
%78 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %75, align 8
|
|
%79 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
%80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %79, i32 0, i32 0
|
|
store ptr @3, ptr %80, align 8
|
|
%81 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %79, i32 0, i32 1
|
|
store i64 0, ptr %81, align 4
|
|
%82 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %79, align 8
|
|
%83 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %78, ptr %72, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %82, i1 false)
|
|
%84 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
%85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %84, i32 0, i32 0
|
|
store ptr @4, ptr %85, align 8
|
|
%86 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %84, i32 0, i32 1
|
|
store i64 1, ptr %86, align 4
|
|
%87 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %84, align 8
|
|
%88 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
%89 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %88, i32 0, i32 0
|
|
store ptr @5, ptr %89, align 8
|
|
%90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %88, i32 0, i32 1
|
|
store i64 0, ptr %90, align 4
|
|
%91 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %88, align 8
|
|
%92 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %87, ptr %73, i64 8, %"github.com/goplus/llgo/internal/runtime.String" %91, i1 false)
|
|
%93 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
%94 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %93, i32 0, i32 0
|
|
store ptr @6, ptr %94, align 8
|
|
%95 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %93, i32 0, i32 1
|
|
store i64 1, ptr %95, align 4
|
|
%96 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %93, align 8
|
|
%97 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
%98 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %97, i32 0, i32 0
|
|
store ptr @7, ptr %98, align 8
|
|
%99 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %97, i32 0, i32 1
|
|
store i64 0, ptr %99, align 4
|
|
%100 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %97, align 8
|
|
%101 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %96, ptr %74, i64 16, %"github.com/goplus/llgo/internal/runtime.String" %100, i1 false)
|
|
%102 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
%103 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %102, i32 0, i32 0
|
|
store ptr @8, ptr %103, align 8
|
|
%104 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %102, i32 0, i32 1
|
|
store i64 4, ptr %104, align 4
|
|
%105 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %102, align 8
|
|
%106 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 168)
|
|
%107 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %106, i64 0
|
|
store %"github.com/goplus/llgo/internal/abi.StructField" %83, ptr %107, align 8
|
|
%108 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %106, i64 1
|
|
store %"github.com/goplus/llgo/internal/abi.StructField" %92, ptr %108, align 8
|
|
%109 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %106, i64 2
|
|
store %"github.com/goplus/llgo/internal/abi.StructField" %101, ptr %109, align 8
|
|
%110 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
|
%111 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %110, i32 0, i32 0
|
|
store ptr %106, ptr %111, align 8
|
|
%112 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %110, i32 0, i32 1
|
|
store i64 3, ptr %112, align 4
|
|
%113 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %110, i32 0, i32 2
|
|
store i64 3, ptr %113, align 4
|
|
%114 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %110, align 8
|
|
%115 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %105, i64 24, %"github.com/goplus/llgo/internal/runtime.Slice" %114)
|
|
store ptr %115, ptr @"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8
|
|
ret void
|
|
}
|
|
|
|
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
|
|
|
declare ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64, ptr)
|
|
|
|
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
|
|
|
define void @"main.main$1"() {
|
|
_llgo_0:
|
|
ret void
|
|
}
|
|
|
|
declare ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice", i1)
|
|
|
|
declare ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr)
|
|
|
|
declare ptr @"github.com/goplus/llgo/internal/runtime.SliceOf"(ptr)
|
|
|
|
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)
|