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 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
|
; ModuleID = 'LFortran'
source_filename = "LFortran"
%string_descriptor = type <{ i8*, i64 }>
@associate_03.t1 = internal global i32 2
@associate_03.t2 = internal global i32 1
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [6 x i8] c"I4,I4\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 [3 x i8] c"I4\00", align 1
@3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@5 = 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)
%i = alloca i32, align 4
%p1 = alloca i32*, align 8
store i32* null, i32** %p1, align 8
%2 = alloca i64, align 8
%3 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @serialization_info, i32 0, i32 0), i64* %2, i32 0, i32 0, i32* @associate_03.t1, i32* @associate_03.t2)
%4 = load i64, i64* %2, align 4
%stringFormat_desc = alloca %string_descriptor, align 8
%5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
store i8* %3, i8** %5, align 8
%6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
store i64 %4, i64* %6, align 4
%7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
%8 = load i8*, i8** %7, align 8
%9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
%10 = load i64, i64* %9, align 4
%11 = trunc i64 %10 to i32
call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %8, i32 %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
%12 = icmp eq i8* %3, null
br i1 %12, label %free_done, label %free_nonnull
free_nonnull: ; preds = %.entry
call void @_lfortran_free(i8* %3)
br label %free_done
free_done: ; preds = %free_nonnull, %.entry
%13 = load i32, i32* @associate_03.t1, align 4
%14 = load i32, i32* @associate_03.t2, align 4
%15 = icmp sgt i32 %13, %14
br i1 %15, label %then, label %else
then: ; preds = %free_done
store i32* @associate_03.t1, i32** %p1, align 8
br label %ifcont
else: ; preds = %free_done
store i32* @associate_03.t2, i32** %p1, align 8
br label %ifcont
ifcont: ; preds = %else, %then
%16 = alloca i64, align 8
%17 = load i32*, i32** %p1, align 8
%18 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %16, i32 0, i32 0, i32* %17)
%19 = load i64, i64* %16, align 4
%stringFormat_desc1 = alloca %string_descriptor, align 8
%20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
store i8* %18, i8** %20, align 8
%21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
store i64 %19, i64* %21, align 4
%22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
%23 = load i8*, i8** %22, align 8
%24 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
%25 = load i64, i64* %24, align 4
%26 = trunc i64 %25 to i32
call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %23, i32 %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
%27 = icmp eq i8* %18, null
br i1 %27, label %free_done3, label %free_nonnull2
free_nonnull2: ; preds = %ifcont
call void @_lfortran_free(i8* %18)
br label %free_done3
free_done3: ; preds = %free_nonnull2, %ifcont
%28 = load i32*, i32** %p1, align 8
%29 = load i32, i32* %28, align 4
store i32 %29, i32* %i, align 4
%30 = load i32, i32* %i, align 4
%31 = load i32, i32* @associate_03.t2, align 4
%32 = icmp eq i32 %30, %31
br i1 %32, label %then4, label %else5
then4: ; preds = %free_done3
call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0))
call void @exit(i32 1)
br label %ifcont6
else5: ; preds = %free_done3
br label %ifcont6
ifcont6: ; preds = %else5, %then4
call void @_lpython_free_argv()
br label %return
return: ; preds = %ifcont6
br label %FINALIZE_SYMTABLE_associate_03
FINALIZE_SYMTABLE_associate_03: ; 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 @_lcompilers_print_error(i8*, ...)
declare void @exit(i32)
declare void @_lpython_free_argv()
|