1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
; ModuleID = 'LFortran'
source_filename = "LFortran"
%string_descriptor = type <{ i8*, i64 }>
@bindc3.idx = internal global i32 1
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [10 x i8] c"CPtr,CPtr\00", align 1
@1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info.1 = private unnamed_addr constant [10 x i8] c"CPtr,CPtr\00", align 1
@3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
define i32 @main(i32 %0, i8** %1) {
.entry:
call void @_lpython_call_initial_functions(i32 %0, i8** %1)
%queries = alloca void*, align 8
%x = alloca i16*, align 8
store i16* null, i16** %x, align 8
%y = alloca i16, align 2
%2 = load void*, void** %queries, align 8
%3 = bitcast void* %2 to i16*
store i16* %3, i16** %x, align 8
%4 = alloca i64, align 8
%5 = load i16*, i16** %x, align 8
%6 = bitcast i16* %5 to void*
%7 = alloca void*, align 8
store void* %6, void** %7, align 8
%8 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @serialization_info, i32 0, i32 0), i64* %4, i32 0, i32 0, void** %7, void** %queries)
%9 = load i64, i64* %4, align 4
%stringFormat_desc = alloca %string_descriptor, align 8
%10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
store i8* %8, i8** %10, align 8
%11 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
store i64 %9, i64* %11, align 4
%12 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
%13 = load i8*, i8** %12, align 8
%14 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
%15 = load i64, i64* %14, align 4
%16 = trunc i64 %15 to i32
call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %13, i32 %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
%17 = icmp eq i8* %8, null
br i1 %17, label %free_done, label %free_nonnull
free_nonnull: ; preds = %.entry
call void @_lfortran_free(i8* %8)
br label %free_done
free_done: ; preds = %free_nonnull, %.entry
store i16* %y, i16** %x, align 8
%18 = alloca i64, align 8
%19 = load i16*, i16** %x, align 8
%20 = bitcast i16* %19 to void*
%21 = alloca void*, align 8
store void* %20, void** %21, align 8
%22 = bitcast i16* %y to void*
%23 = alloca void*, align 8
store void* %22, void** %23, align 8
%24 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @serialization_info.1, i32 0, i32 0), i64* %18, i32 0, i32 0, void** %21, void** %23)
%25 = load i64, i64* %18, align 4
%stringFormat_desc1 = alloca %string_descriptor, align 8
%26 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
store i8* %24, i8** %26, align 8
%27 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
store i64 %25, i64* %27, align 4
%28 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
%29 = load i8*, i8** %28, align 8
%30 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
%31 = load i64, i64* %30, align 4
%32 = trunc i64 %31 to i32
call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %29, i32 %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
%33 = icmp eq i8* %24, null
br i1 %33, label %free_done3, label %free_nonnull2
free_nonnull2: ; preds = %free_done
call void @_lfortran_free(i8* %24)
br label %free_done3
free_done3: ; preds = %free_nonnull2, %free_done
call void @_lpython_free_argv()
br label %return
return: ; preds = %free_done3
br label %FINALIZE_SYMTABLE_bindc3
FINALIZE_SYMTABLE_bindc3: ; preds = %return
ret i32 0
}
declare void @_lpython_call_initial_functions(i32, i8**)
declare i8* @_lcompilers_string_format_fortran(i8*, i64, i8*, i64*, i32, i32, ...)
declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32)
declare void @_lfortran_free(i8*)
declare void @_lpython_free_argv()
|