File: llvm-recursion_02-76da7b3.stdout

package info (click to toggle)
lfortran 0.59.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 56,736 kB
  • sloc: cpp: 168,052; f90: 74,272; python: 17,537; ansic: 7,705; yacc: 2,345; sh: 1,334; fortran: 895; makefile: 37; javascript: 15
file content (210 lines) | stat: -rw-r--r-- 11,460 bytes parent folder | download | duplicates (3)
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
; ModuleID = 'LFortran'
source_filename = "LFortran"

%string_descriptor = type <{ i8*, i64 }>

@__module___lcompilers_created__nested_context__sub1____lcompilers_created__nested_context__sub1_x = global i32 0
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [12 x i8] c"S-DESC-7,I4\00", align 1
@string_const_data = private constant [7 x i8] c"before:"
@string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([7 x i8], [7 x i8]* @string_const_data, i32 0, i32 0), i64 7 }>
@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 [12 x i8] c"S-DESC-6,I4\00", align 1
@string_const_data.2 = private constant [6 x i8] c"after:"
@string_const.3 = private global %string_descriptor <{ i8* getelementptr inbounds ([6 x i8], [6 x i8]* @string_const_data.2, i32 0, i32 0), i64 6 }>
@3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info.4 = private unnamed_addr constant [12 x i8] c"S-DESC-9,I4\00", align 1
@string_const_data.5 = private constant [9 x i8] c"x in getx"
@string_const.6 = private global %string_descriptor <{ i8* getelementptr inbounds ([9 x i8], [9 x i8]* @string_const_data.5, i32 0, i32 0), i64 9 }>
@5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@string_const_data.7 = private constant [7 x i8] c"in sub1"
@string_const.8 = private global %string_descriptor <{ i8* getelementptr inbounds ([7 x i8], [7 x i8]* @string_const_data.7, i32 0, i32 0), i64 7 }>
@7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info.9 = private unnamed_addr constant [12 x i8] c"S-DESC-3,I4\00", align 1
@string_const_data.10 = private constant [3 x i8] c"r ="
@string_const.11 = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data.10, i32 0, i32 0), i64 3 }>
@9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @__module_recursion_02_solver(i32 ()* %f, i32* %iter) {
.entry:
  %call_arg_value1 = alloca i32, align 4
  %call_arg_value = alloca i32, align 4
  %f_val = alloca i32, align 4
  %solver = alloca i32, align 4
  %0 = call i32 %f()
  store i32 %0, i32* %f_val, align 4
  %1 = alloca i64, align 8
  %2 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, %string_descriptor* @string_const, i32* %f_val)
  %3 = load i64, i64* %1, align 4
  %stringFormat_desc = alloca %string_descriptor, align 8
  %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %2, i8** %4, align 8
  %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %3, i64* %5, align 4
  %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %7 = load i8*, i8** %6, align 8
  %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %9 = load i64, i64* %8, align 4
  %10 = trunc i64 %9 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %7, i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %2)
  store i32 2, i32* %call_arg_value, align 4
  %11 = load i32, i32* %iter, align 4
  %12 = sub i32 %11, 1
  store i32 %12, i32* %call_arg_value1, align 4
  %13 = call i32 @__module_recursion_02_sub1(i32* %call_arg_value, i32* %call_arg_value1)
  store i32 %13, i32* %solver, align 4
  %14 = call i32 %f()
  store i32 %14, i32* %f_val, align 4
  %15 = alloca i64, align 8
  %16 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.1, i32 0, i32 0), i64* %15, i32 0, i32 0, %string_descriptor* @string_const.3, i32* %f_val)
  %17 = load i64, i64* %15, align 4
  %stringFormat_desc2 = alloca %string_descriptor, align 8
  %18 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0
  store i8* %16, i8** %18, align 8
  %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1
  store i64 %17, i64* %19, align 4
  %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0
  %21 = load i8*, i8** %20, align 8
  %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1
  %23 = load i64, i64* %22, align 4
  %24 = trunc i64 %23 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %21, i32 %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %16)
  br label %return

return:                                           ; preds = %.entry
  br label %FINALIZE_SYMTABLE_solver

FINALIZE_SYMTABLE_solver:                         ; preds = %return
  %25 = load i32, i32* %solver, align 4
  ret i32 %25
}

declare i32 @f()

define i32 @__module_recursion_02_sub1(i32* %y, i32* %iter) {
.entry:
  %sub1 = alloca i32, align 4
  %tmp = alloca i32, align 4
  %x = alloca i32, align 4
  %0 = load i32, i32* %y, align 4
  store i32 %0, i32* %x, align 4
  %1 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.8, i32 0, i32 0), align 8
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %1, i32 7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1)
  %2 = load i32, i32* %iter, align 4
  %3 = icmp eq i32 %2, 1
  br i1 %3, label %then, label %else

then:                                             ; preds = %.entry
  store i32 1, i32* %sub1, align 4
  br label %return

unreachable_after_return:                         ; No predecessors!
  br label %ifcont

else:                                             ; preds = %.entry
  br label %ifcont

ifcont:                                           ; preds = %else, %unreachable_after_return
  %4 = load i32, i32* %x, align 4
  store i32 %4, i32* @__module___lcompilers_created__nested_context__sub1____lcompilers_created__nested_context__sub1_x, align 4
  %5 = call i32 @sub1.__module_recursion_02_getx()
  store i32 %5, i32* %tmp, align 4
  %6 = load i32, i32* @__module___lcompilers_created__nested_context__sub1____lcompilers_created__nested_context__sub1_x, align 4
  store i32 %6, i32* %x, align 4
  %7 = load i32, i32* %x, align 4
  store i32 %7, i32* @__module___lcompilers_created__nested_context__sub1____lcompilers_created__nested_context__sub1_x, align 4
  %8 = call i32 @__module_recursion_02_solver(i32 ()* @sub1.__module_recursion_02_getx, i32* %iter)
  store i32 %8, i32* %sub1, align 4
  %9 = load i32, i32* @__module___lcompilers_created__nested_context__sub1____lcompilers_created__nested_context__sub1_x, align 4
  store i32 %9, i32* %x, align 4
  br label %return

return:                                           ; preds = %ifcont, %then
  br label %FINALIZE_SYMTABLE_sub1

FINALIZE_SYMTABLE_sub1:                           ; preds = %return
  %10 = load i32, i32* %sub1, align 4
  ret i32 %10
}

define i32 @sub1.__module_recursion_02_getx() {
.entry:
  %getx = alloca i32, align 4
  %0 = alloca i64, align 8
  %1 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.4, i32 0, i32 0), i64* %0, i32 0, i32 0, %string_descriptor* @string_const.6, i32* @__module___lcompilers_created__nested_context__sub1____lcompilers_created__nested_context__sub1_x)
  %2 = load i64, i64* %0, align 4
  %stringFormat_desc = alloca %string_descriptor, align 8
  %3 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %1, i8** %3, align 8
  %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %2, i64* %4, align 4
  %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %6 = load i8*, i8** %5, align 8
  %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %8 = load i64, i64* %7, align 4
  %9 = trunc i64 %8 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %6, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %1)
  %10 = load i32, i32* @__module___lcompilers_created__nested_context__sub1____lcompilers_created__nested_context__sub1_x, align 4
  store i32 %10, i32* %getx, align 4
  br label %return

return:                                           ; preds = %.entry
  br label %FINALIZE_SYMTABLE_getx

FINALIZE_SYMTABLE_getx:                           ; preds = %return
  %11 = load i32, i32* %getx, align 4
  ret i32 %11
}

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*)

define i32 @main(i32 %0, i8** %1) {
.entry:
  %call_arg_value2 = alloca i32, align 4
  %call_arg_value = alloca i32, align 4
  %r = alloca i32, align 4
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %r1 = alloca i32, align 4
  store i32 3, i32* %call_arg_value, align 4
  store i32 3, i32* %call_arg_value2, align 4
  %2 = call i32 @__module_recursion_02_sub1(i32* %call_arg_value, i32* %call_arg_value2)
  store i32 %2, i32* %r1, align 4
  %3 = alloca i64, align 8
  %4 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.9, i32 0, i32 0), i64* %3, i32 0, i32 0, %string_descriptor* @string_const.11, i32* %r1)
  %5 = load i64, i64* %3, align 4
  %stringFormat_desc = alloca %string_descriptor, align 8
  %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %4, i8** %6, align 8
  %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %5, i64* %7, align 4
  %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %9 = load i8*, i8** %8, align 8
  %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %11 = load i64, i64* %10, align 4
  %12 = trunc i64 %11 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %4)
  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()