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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
|
; ModuleID = 'LFortran'
source_filename = "LFortran"
%string_descriptor = type <{ i8*, i64 }>
@string_const_data = private constant [4 x i8] c"Mr. "
@string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data, i32 0, i32 0), i64 4 }>
@string_const_data.1 = private constant [6 x i8] c"Rowan "
@string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([6 x i8], [6 x i8]* @string_const_data.1, i32 0, i32 0), i64 6 }>
@string_const_data.3 = private constant [8 x i8] c"Atkinson"
@string_const.4 = private global %string_descriptor <{ i8* getelementptr inbounds ([8 x i8], [8 x i8]* @string_const_data.3, i32 0, i32 0), i64 8 }>
@string_const_data.5 = private constant [25 x i8] c"A big hello from Mr. Bean"
@string_const.6 = private global %string_descriptor <{ i8* getelementptr inbounds ([25 x i8], [25 x i8]* @string_const_data.5, i32 0, i32 0), i64 25 }>
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [38 x i8] c"S-DESC-8,S-DESC-6,S-DESC-15,S-DESC-15\00", align 1
@string_const_data.7 = private constant [8 x i8] c"Here is "
@string_const.8 = private global %string_descriptor <{ i8* getelementptr inbounds ([8 x i8], [8 x i8]* @string_const_data.7, i32 0, i32 0), i64 8 }>
@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
@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)
%firstname = alloca %string_descriptor, align 8
store %string_descriptor zeroinitializer, %string_descriptor* %firstname, align 1
%2 = getelementptr %string_descriptor, %string_descriptor* %firstname, i32 0, i32 1
store i64 15, i64* %2, align 4
%3 = getelementptr %string_descriptor, %string_descriptor* %firstname, i32 0, i32 0
%4 = call i8* @_lfortran_malloc(i64 15)
store i8* %4, i8** %3, align 8
%greetings = alloca %string_descriptor, align 8
store %string_descriptor zeroinitializer, %string_descriptor* %greetings, align 1
%5 = getelementptr %string_descriptor, %string_descriptor* %greetings, i32 0, i32 1
store i64 25, i64* %5, align 4
%6 = getelementptr %string_descriptor, %string_descriptor* %greetings, i32 0, i32 0
%7 = call i8* @_lfortran_malloc(i64 25)
store i8* %7, i8** %6, align 8
%surname = alloca %string_descriptor, align 8
store %string_descriptor zeroinitializer, %string_descriptor* %surname, align 1
%8 = getelementptr %string_descriptor, %string_descriptor* %surname, i32 0, i32 1
store i64 15, i64* %8, align 4
%9 = getelementptr %string_descriptor, %string_descriptor* %surname, i32 0, i32 0
%10 = call i8* @_lfortran_malloc(i64 15)
store i8* %10, i8** %9, align 8
%title = alloca %string_descriptor, align 8
store %string_descriptor zeroinitializer, %string_descriptor* %title, align 1
%11 = getelementptr %string_descriptor, %string_descriptor* %title, i32 0, i32 1
store i64 6, i64* %11, align 4
%12 = getelementptr %string_descriptor, %string_descriptor* %title, i32 0, i32 0
%13 = call i8* @_lfortran_malloc(i64 6)
store i8* %13, i8** %12, align 8
%14 = getelementptr %string_descriptor, %string_descriptor* %title, i32 0, i32 0
%15 = getelementptr %string_descriptor, %string_descriptor* %title, i32 0, i32 1
%16 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8
call void @_lfortran_strcpy(i8** %14, i64* %15, i8 0, i8 0, i8* %16, i64 4)
%17 = getelementptr %string_descriptor, %string_descriptor* %firstname, i32 0, i32 0
%18 = getelementptr %string_descriptor, %string_descriptor* %firstname, i32 0, i32 1
%19 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8
call void @_lfortran_strcpy(i8** %17, i64* %18, i8 0, i8 0, i8* %19, i64 6)
%20 = getelementptr %string_descriptor, %string_descriptor* %surname, i32 0, i32 0
%21 = getelementptr %string_descriptor, %string_descriptor* %surname, i32 0, i32 1
%22 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.4, i32 0, i32 0), align 8
call void @_lfortran_strcpy(i8** %20, i64* %21, i8 0, i8 0, i8* %22, i64 8)
%23 = getelementptr %string_descriptor, %string_descriptor* %greetings, i32 0, i32 0
%24 = getelementptr %string_descriptor, %string_descriptor* %greetings, i32 0, i32 1
%25 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.6, i32 0, i32 0), align 8
call void @_lfortran_strcpy(i8** %23, i64* %24, i8 0, i8 0, i8* %25, i64 25)
%26 = alloca i64, align 8
%27 = load %string_descriptor, %string_descriptor* %title, align 1
%28 = alloca %string_descriptor, align 8
store %string_descriptor %27, %string_descriptor* %28, align 1
%29 = load %string_descriptor, %string_descriptor* %firstname, align 1
%30 = alloca %string_descriptor, align 8
store %string_descriptor %29, %string_descriptor* %30, align 1
%31 = load %string_descriptor, %string_descriptor* %surname, align 1
%32 = alloca %string_descriptor, align 8
store %string_descriptor %31, %string_descriptor* %32, align 1
%33 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @serialization_info, i32 0, i32 0), i64* %26, i32 0, i32 0, %string_descriptor* @string_const.8, %string_descriptor* %28, %string_descriptor* %30, %string_descriptor* %32)
%34 = load i64, i64* %26, align 4
%stringFormat_desc = alloca %string_descriptor, align 8
%35 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
store i8* %33, i8** %35, align 8
%36 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
store i64 %34, i64* %36, align 4
%37 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
%38 = load i8*, i8** %37, align 8
%39 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
%40 = load i64, i64* %39, align 4
%41 = trunc i64 %40 to i32
call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %38, i32 %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
call void @_lfortran_free(i8* %33)
%42 = getelementptr %string_descriptor, %string_descriptor* %greetings, i32 0, i32 0
%43 = load i8*, i8** %42, align 8
call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %43, i32 25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
call void @_lpython_free_argv()
br label %return
return: ; preds = %.entry
br label %FINALIZE_SYMTABLE_string_02
FINALIZE_SYMTABLE_string_02: ; preds = %return
br label %Finalize_Variable_firstname
Finalize_Variable_firstname: ; preds = %FINALIZE_SYMTABLE_string_02
%44 = getelementptr %string_descriptor, %string_descriptor* %firstname, i32 0, i32 0
%45 = load i8*, i8** %44, align 8
call void @_lfortran_free(i8* %45)
br label %Finalize_Variable_greetings
Finalize_Variable_greetings: ; preds = %Finalize_Variable_firstname
%46 = getelementptr %string_descriptor, %string_descriptor* %greetings, i32 0, i32 0
%47 = load i8*, i8** %46, align 8
call void @_lfortran_free(i8* %47)
br label %Finalize_Variable_surname
Finalize_Variable_surname: ; preds = %Finalize_Variable_greetings
%48 = getelementptr %string_descriptor, %string_descriptor* %surname, i32 0, i32 0
%49 = load i8*, i8** %48, align 8
call void @_lfortran_free(i8* %49)
br label %Finalize_Variable_title
Finalize_Variable_title: ; preds = %Finalize_Variable_surname
%50 = getelementptr %string_descriptor, %string_descriptor* %title, i32 0, i32 0
%51 = load i8*, i8** %50, align 8
call void @_lfortran_free(i8* %51)
ret i32 0
}
declare void @_lpython_call_initial_functions(i32, i8**)
declare i8* @_lfortran_malloc(i64)
declare void @_lfortran_strcpy(i8**, i64*, i8, i8, i8*, i64)
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()
|