File: llvm-operator_overloading_01-33c47db.stdout

package info (click to toggle)
lfortran 0.58.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 54,512 kB
  • sloc: cpp: 162,179; f90: 68,251; python: 17,476; ansic: 6,278; yacc: 2,334; sh: 1,317; fortran: 892; makefile: 33; javascript: 15
file content (269 lines) | stat: -rw-r--r-- 16,477 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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
; ModuleID = 'LFortran'
source_filename = "LFortran"

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

@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [11 x i8] c"S-DESC-4,L\00", align 1
@string_const_data = private constant [4 x i8] c"T*T:"
@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
@serialization_info.1 = private unnamed_addr constant [11 x i8] c"S-DESC-4,L\00", align 1
@string_const_data.2 = private constant [4 x i8] c"T*F:"
@string_const.3 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.2, i32 0, i32 0), i64 4 }>
@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 [11 x i8] c"S-DESC-4,L\00", align 1
@string_const_data.5 = private constant [4 x i8] c"F*T:"
@string_const.6 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.5, i32 0, i32 0), i64 4 }>
@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
@serialization_info.7 = private unnamed_addr constant [11 x i8] c"S-DESC-4,L\00", align 1
@string_const_data.8 = private constant [4 x i8] c"F*F:"
@string_const.9 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.8, i32 0, i32 0), i64 4 }>
@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.10 = private unnamed_addr constant [12 x i8] c"S-DESC-4,I4\00", align 1
@string_const_data.11 = private constant [4 x i8] c"T+T:"
@string_const.12 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.11, i32 0, i32 0), i64 4 }>
@9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info.13 = private unnamed_addr constant [12 x i8] c"S-DESC-4,I4\00", align 1
@string_const_data.14 = private constant [4 x i8] c"T+F:"
@string_const.15 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.14, i32 0, i32 0), i64 4 }>
@11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info.16 = private unnamed_addr constant [12 x i8] c"S-DESC-4,I4\00", align 1
@string_const_data.17 = private constant [4 x i8] c"F+T:"
@string_const.18 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.17, i32 0, i32 0), i64 4 }>
@13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@14 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info.19 = private unnamed_addr constant [12 x i8] c"S-DESC-4,I4\00", align 1
@string_const_data.20 = private constant [4 x i8] c"F+F:"
@string_const.21 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.20, i32 0, i32 0), i64 4 }>
@15 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @__module_operator_overloading_01_overload_asterisk_m_bin_add(i1* %log1, i1* %log2) {
.entry:
  %bin_add = alloca i32, align 4
  %0 = load i1, i1* %log1, align 1
  %1 = load i1, i1* %log2, align 1
  %2 = icmp eq i1 %0, false
  %3 = select i1 %2, i1 %0, i1 %1
  br i1 %3, label %then, label %else

then:                                             ; preds = %.entry
  store i32 2, i32* %bin_add, align 4
  br label %ifcont3

else:                                             ; preds = %.entry
  %4 = load i1, i1* %log1, align 1
  %5 = xor i1 %4, true
  %6 = load i1, i1* %log2, align 1
  %7 = xor i1 %6, true
  %8 = icmp eq i1 %5, false
  %9 = select i1 %8, i1 %5, i1 %7
  br i1 %9, label %then1, label %else2

then1:                                            ; preds = %else
  store i32 0, i32* %bin_add, align 4
  br label %ifcont

else2:                                            ; preds = %else
  store i32 1, i32* %bin_add, align 4
  br label %ifcont

ifcont:                                           ; preds = %else2, %then1
  br label %ifcont3

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

return:                                           ; preds = %ifcont3
  %10 = load i32, i32* %bin_add, align 4
  ret i32 %10
}

define i1 @__module_operator_overloading_01_overload_asterisk_m_logical_and(i1* %log1, i1* %log2) {
.entry:
  %logical_and = alloca i1, align 1
  %0 = load i1, i1* %log1, align 1
  %1 = load i1, i1* %log2, align 1
  %2 = icmp eq i1 %0, false
  %3 = select i1 %2, i1 %0, i1 %1
  store i1 %3, i1* %logical_and, align 1
  br label %return

return:                                           ; preds = %.entry
  %4 = load i1, i1* %logical_and, align 1
  ret i1 %4
}

define i32 @main(i32 %0, i8** %1) {
.entry:
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %f = alloca i1, align 1
  store i1 false, i1* %f, align 1
  %t = alloca i1, align 1
  store i1 true, i1* %t, align 1
  %2 = alloca i64, align 8
  %3 = call i1 @__module_operator_overloading_01_overload_asterisk_m_logical_and(i1* %t, i1* %t)
  %4 = alloca i1, align 1
  store i1 %3, i1* %4, align 1
  %5 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @serialization_info, i32 0, i32 0), i64* %2, i32 0, i32 0, %string_descriptor* @string_const, i1* %4)
  %6 = load i64, i64* %2, align 4
  %stringFormat_desc = alloca %string_descriptor, align 8
  %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %5, i8** %7, align 8
  %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %6, i64* %8, align 4
  %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %10 = load i8*, i8** %9, align 8
  %11 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %12 = load i64, i64* %11, align 4
  %13 = trunc i64 %12 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %10, i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %5)
  %14 = alloca i64, align 8
  %15 = call i1 @__module_operator_overloading_01_overload_asterisk_m_logical_and(i1* %t, i1* %f)
  %16 = alloca i1, align 1
  store i1 %15, i1* %16, align 1
  %17 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @serialization_info.1, i32 0, i32 0), i64* %14, i32 0, i32 0, %string_descriptor* @string_const.3, i1* %16)
  %18 = load i64, i64* %14, align 4
  %stringFormat_desc1 = alloca %string_descriptor, align 8
  %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  store i8* %17, i8** %19, align 8
  %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  store i64 %18, i64* %20, align 4
  %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  %22 = load i8*, i8** %21, align 8
  %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  %24 = load i64, i64* %23, align 4
  %25 = trunc i64 %24 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %22, i32 %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %17)
  %26 = alloca i64, align 8
  %27 = call i1 @__module_operator_overloading_01_overload_asterisk_m_logical_and(i1* %f, i1* %t)
  %28 = alloca i1, align 1
  store i1 %27, i1* %28, align 1
  %29 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @serialization_info.4, i32 0, i32 0), i64* %26, i32 0, i32 0, %string_descriptor* @string_const.6, i1* %28)
  %30 = load i64, i64* %26, align 4
  %stringFormat_desc2 = alloca %string_descriptor, align 8
  %31 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0
  store i8* %29, i8** %31, align 8
  %32 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1
  store i64 %30, i64* %32, align 4
  %33 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0
  %34 = load i8*, i8** %33, align 8
  %35 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1
  %36 = load i64, i64* %35, align 4
  %37 = trunc i64 %36 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %34, i32 %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %29)
  %38 = alloca i64, align 8
  %39 = call i1 @__module_operator_overloading_01_overload_asterisk_m_logical_and(i1* %f, i1* %f)
  %40 = alloca i1, align 1
  store i1 %39, i1* %40, align 1
  %41 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @serialization_info.7, i32 0, i32 0), i64* %38, i32 0, i32 0, %string_descriptor* @string_const.9, i1* %40)
  %42 = load i64, i64* %38, align 4
  %stringFormat_desc3 = alloca %string_descriptor, align 8
  %43 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc3, i32 0, i32 0
  store i8* %41, i8** %43, align 8
  %44 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc3, i32 0, i32 1
  store i64 %42, i64* %44, align 4
  %45 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc3, i32 0, i32 0
  %46 = load i8*, i8** %45, align 8
  %47 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc3, i32 0, i32 1
  %48 = load i64, i64* %47, align 4
  %49 = trunc i64 %48 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %46, i32 %49, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %41)
  %50 = alloca i64, align 8
  %51 = call i32 @__module_operator_overloading_01_overload_asterisk_m_bin_add(i1* %t, i1* %t)
  %52 = alloca i32, align 4
  store i32 %51, i32* %52, align 4
  %53 = 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.10, i32 0, i32 0), i64* %50, i32 0, i32 0, %string_descriptor* @string_const.12, i32* %52)
  %54 = load i64, i64* %50, align 4
  %stringFormat_desc4 = alloca %string_descriptor, align 8
  %55 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0
  store i8* %53, i8** %55, align 8
  %56 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1
  store i64 %54, i64* %56, align 4
  %57 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0
  %58 = load i8*, i8** %57, align 8
  %59 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1
  %60 = load i64, i64* %59, align 4
  %61 = trunc i64 %60 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* %58, i32 %61, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %53)
  %62 = alloca i64, align 8
  %63 = call i32 @__module_operator_overloading_01_overload_asterisk_m_bin_add(i1* %t, i1* %f)
  %64 = alloca i32, align 4
  store i32 %63, i32* %64, align 4
  %65 = 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.13, i32 0, i32 0), i64* %62, i32 0, i32 0, %string_descriptor* @string_const.15, i32* %64)
  %66 = load i64, i64* %62, align 4
  %stringFormat_desc5 = alloca %string_descriptor, align 8
  %67 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc5, i32 0, i32 0
  store i8* %65, i8** %67, align 8
  %68 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc5, i32 0, i32 1
  store i64 %66, i64* %68, align 4
  %69 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc5, i32 0, i32 0
  %70 = load i8*, i8** %69, align 8
  %71 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc5, i32 0, i32 1
  %72 = load i64, i64* %71, align 4
  %73 = trunc i64 %72 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* %70, i32 %73, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %65)
  %74 = alloca i64, align 8
  %75 = call i32 @__module_operator_overloading_01_overload_asterisk_m_bin_add(i1* %f, i1* %t)
  %76 = alloca i32, align 4
  store i32 %75, i32* %76, align 4
  %77 = 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.16, i32 0, i32 0), i64* %74, i32 0, i32 0, %string_descriptor* @string_const.18, i32* %76)
  %78 = load i64, i64* %74, align 4
  %stringFormat_desc6 = alloca %string_descriptor, align 8
  %79 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc6, i32 0, i32 0
  store i8* %77, i8** %79, align 8
  %80 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc6, i32 0, i32 1
  store i64 %78, i64* %80, align 4
  %81 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc6, i32 0, i32 0
  %82 = load i8*, i8** %81, align 8
  %83 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc6, i32 0, i32 1
  %84 = load i64, i64* %83, align 4
  %85 = trunc i64 %84 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* %82, i32 %85, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %77)
  %86 = alloca i64, align 8
  %87 = call i32 @__module_operator_overloading_01_overload_asterisk_m_bin_add(i1* %f, i1* %f)
  %88 = alloca i32, align 4
  store i32 %87, i32* %88, align 4
  %89 = 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.19, i32 0, i32 0), i64* %86, i32 0, i32 0, %string_descriptor* @string_const.21, i32* %88)
  %90 = load i64, i64* %86, align 4
  %stringFormat_desc7 = alloca %string_descriptor, align 8
  %91 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0
  store i8* %89, i8** %91, align 8
  %92 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1
  store i64 %90, i64* %92, align 4
  %93 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0
  %94 = load i8*, i8** %93, align 8
  %95 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1
  %96 = load i64, i64* %95, align 4
  %97 = trunc i64 %96 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @15, i32 0, i32 0), i8* %94, i32 %97, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @14, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %89)
  call void @_lpython_free_argv()
  br label %return

return:                                           ; preds = %.entry
  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 @_lpython_free_argv()