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
|
; ModuleID = 'LFortran'
source_filename = "LFortran"
%string_descriptor = type <{ i8*, i64 }>
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@string_const_data = private constant [4 x i8] c"Dr. "
@string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data, i32 0, i32 0), i64 4 }>
@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
@string_const_data.1 = private constant [7 x i8] c"Fortran"
@string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([7 x i8], [7 x i8]* @string_const_data.1, i32 0, i32 0), i64 7 }>
@3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
define void @__module_dr_fortran_cb_print_dr() {
.entry:
%0 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8
call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %0, i32 4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
br label %return
return: ; preds = %.entry
br label %FINALIZE_SYMTABLE_print_dr
FINALIZE_SYMTABLE_print_dr: ; preds = %return
ret void
}
define void @__module_dr_fortran_cb_print_dr_fortran(void ()* %title_or_name) {
.entry:
call void %title_or_name()
br label %return
return: ; preds = %.entry
br label %FINALIZE_SYMTABLE_print_dr_fortran
FINALIZE_SYMTABLE_print_dr_fortran: ; preds = %return
ret void
}
declare void @title_or_name()
define void @__module_dr_fortran_cb_print_fortran() {
.entry:
%0 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8
call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %0, i32 7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
br label %return
return: ; preds = %.entry
br label %FINALIZE_SYMTABLE_print_fortran
FINALIZE_SYMTABLE_print_fortran: ; preds = %return
ret void
}
declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32)
define i32 @main(i32 %0, i8** %1) {
.entry:
call void @_lpython_call_initial_functions(i32 %0, i8** %1)
call void @__module_dr_fortran_cb_print_dr_fortran(void ()* @__module_dr_fortran_cb_print_dr)
call void @__module_dr_fortran_cb_print_dr_fortran(void ()* @__module_dr_fortran_cb_print_fortran)
call void @_lpython_free_argv()
br label %return
return: ; preds = %.entry
br label %FINALIZE_SYMTABLE_main
FINALIZE_SYMTABLE_main: ; preds = %return
ret i32 0
}
declare void @_lpython_call_initial_functions(i32, i8**)
declare void @_lpython_free_argv()
|