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
|
; ModuleID = 'LFortran'
source_filename = "LFortran"
%abstype_class = type <{ i32 (...)**, %abstype* }>
%abstype = type {}
define void @__module_codegen_function_polymorphic_my_func(%abstype_class** %obj) {
.entry:
%0 = load %abstype_class*, %abstype_class** %obj, align 8
%1 = ptrtoint %abstype_class* %0 to i64
%2 = icmp ne i64 %1, 0
br i1 %2, label %then, label %else5
then: ; preds = %.entry
%3 = load %abstype_class*, %abstype_class** %obj, align 8
%4 = load %abstype_class*, %abstype_class** %obj, align 8
%5 = ptrtoint %abstype_class* %4 to i64
%6 = icmp ne i64 %5, 0
br i1 %6, label %then1, label %else3
then1: ; preds = %then
%7 = getelementptr %abstype_class, %abstype_class* %4, i32 0, i32 1
%8 = load %abstype*, %abstype** %7, align 8
%9 = bitcast %abstype* %8 to i8*
%10 = ptrtoint i8* %9 to i64
%11 = icmp ne i64 %10, 0
br i1 %11, label %then2, label %else
then2: ; preds = %then1
%12 = alloca i8*, align 8
store i8* %9, i8** %12, align 8
%13 = load i8*, i8** %12, align 8
call void @_lfortran_free(i8* %13)
%14 = bitcast %abstype** %7 to i8**
store i8* null, i8** %14, align 8
br label %ifcont
else: ; preds = %then1
br label %ifcont
ifcont: ; preds = %else, %then2
%15 = alloca i8*, align 8
%16 = bitcast %abstype_class* %4 to i8*
store i8* %16, i8** %15, align 8
%17 = load i8*, i8** %15, align 8
call void @_lfortran_free(i8* %17)
store %abstype_class* null, %abstype_class** %obj, align 8
br label %ifcont4
else3: ; preds = %then
br label %ifcont4
ifcont4: ; preds = %else3, %ifcont
br label %ifcont6
else5: ; preds = %.entry
br label %ifcont6
ifcont6: ; preds = %else5, %ifcont4
br label %return
return: ; preds = %ifcont6
br label %FINALIZE_SYMTABLE_my_func
FINALIZE_SYMTABLE_my_func: ; preds = %return
ret void
}
declare void @_lfortran_free(i8*)
|