github.com/goplus/llgo@v0.8.3/cl/_testpy/pow/out.ll (about) 1 ; ModuleID = 'main' 2 source_filename = "main" 3 4 @"main.init$guard" = global ptr null 5 @__llgo_argc = global ptr null 6 @__llgo_argv = global ptr null 7 @__llgo_py.math.pow = linkonce global ptr null 8 @0 = private unnamed_addr constant [16 x i8] c"pow(2, 3) = %f\0A\00", align 1 9 @__llgo_py.math = external global ptr 10 @1 = private unnamed_addr constant [4 x i8] c"pow\00", align 1 11 12 define void @main.init() { 13 _llgo_0: 14 %0 = load i1, ptr @"main.init$guard", align 1 15 br i1 %0, label %_llgo_2, label %_llgo_1 16 17 _llgo_1: ; preds = %_llgo_0 18 store i1 true, ptr @"main.init$guard", align 1 19 call void @"github.com/goplus/llgo/py/math.init"() 20 %1 = load ptr, ptr @__llgo_py.math, align 8 21 call void (ptr, ...) @llgoLoadPyModSyms(ptr %1, ptr @1, ptr @__llgo_py.math.pow, ptr null) 22 br label %_llgo_2 23 24 _llgo_2: ; preds = %_llgo_1, %_llgo_0 25 ret void 26 } 27 28 define i32 @main(i32 %0, ptr %1) { 29 _llgo_0: 30 call void @Py_Initialize() 31 store i32 %0, ptr @__llgo_argc, align 4 32 store ptr %1, ptr @__llgo_argv, align 8 33 call void @"github.com/goplus/llgo/internal/runtime.init"() 34 call void @main.init() 35 %2 = call ptr @PyFloat_FromDouble(double 2.000000e+00) 36 %3 = call ptr @PyFloat_FromDouble(double 3.000000e+00) 37 %4 = load ptr, ptr @__llgo_py.math.pow, align 8 38 %5 = call ptr (ptr, ...) @PyObject_CallFunctionObjArgs(ptr %4, ptr %2, ptr %3, ptr null) 39 %6 = call double @PyFloat_AsDouble(ptr %5) 40 %7 = call i32 (ptr, ...) @printf(ptr @0, double %6) 41 ret i32 0 42 } 43 44 declare void @"github.com/goplus/llgo/py/math.init"() 45 46 declare void @"github.com/goplus/llgo/internal/runtime.init"() 47 48 declare ptr @PyFloat_FromDouble(double) 49 50 declare ptr @PyObject_CallFunctionObjArgs(ptr, ...) 51 52 declare double @PyFloat_AsDouble(ptr) 53 54 declare i32 @printf(ptr, ...) 55 56 declare void @llgoLoadPyModSyms(ptr, ...) 57 58 declare void @Py_Initialize()