File: llvm-string_10-ef0078f.stdout

package info (click to toggle)
lfortran 0.60.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 58,412 kB
  • sloc: cpp: 173,406; f90: 80,491; python: 17,586; ansic: 9,610; yacc: 2,356; sh: 1,401; fortran: 895; makefile: 37; javascript: 15
file content (272 lines) | stat: -rw-r--r-- 17,649 bytes parent folder | download | duplicates (2)
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
270
271
272
; ModuleID = 'LFortran'
source_filename = "LFortran"

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

@c_data = private global [2 x i8] c"BC"
@c = private global %string_descriptor <{ i8* getelementptr inbounds ([2 x i8], [2 x i8]* @c_data, i32 0, i32 0), i64 2 }>
@string_const_data = private constant [1 x i8] c"A"
@string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data, i32 0, i32 0), i64 1 }>
@string_const_data.1 = private constant [1 x i8] c"Z"
@string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.1, i32 0, i32 0), i64 1 }>
@string_const_data.3 = private constant [1 x i8] c"a"
@string_const.4 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.3, i32 0, i32 0), i64 1 }>
@string_const_data.5 = private constant [1 x i8] c"z"
@string_const.6 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.5, i32 0, i32 0), i64 1 }>
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [2 x i8] c"L\00", align 1
@1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@string_const_data.7 = private constant [2 x i8] c"@a"
@string_const.8 = private global %string_descriptor <{ i8* getelementptr inbounds ([2 x i8], [2 x i8]* @string_const_data.7, i32 0, i32 0), i64 2 }>
@string_const_data.9 = private constant [1 x i8] c"A"
@string_const.10 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.9, i32 0, i32 0), i64 1 }>
@string_const_data.11 = private constant [1 x i8] c"Z"
@string_const.12 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.11, i32 0, i32 0), i64 1 }>
@string_const_data.13 = private constant [1 x i8] c"a"
@string_const.14 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.13, i32 0, i32 0), i64 1 }>
@string_const_data.15 = private constant [1 x i8] c"z"
@string_const.16 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.15, i32 0, i32 0), i64 1 }>
@2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info.17 = private unnamed_addr constant [2 x i8] c"L\00", align 1
@3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@string_const_data.18 = private constant [2 x i8] c"a@"
@string_const.19 = private global %string_descriptor <{ i8* getelementptr inbounds ([2 x i8], [2 x i8]* @string_const_data.18, i32 0, i32 0), i64 2 }>
@string_const_data.20 = private constant [1 x i8] c"A"
@string_const.21 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.20, i32 0, i32 0), i64 1 }>
@string_const_data.22 = private constant [1 x i8] c"Z"
@string_const.23 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.22, i32 0, i32 0), i64 1 }>
@string_const_data.24 = private constant [1 x i8] c"a"
@string_const.25 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.24, i32 0, i32 0), i64 1 }>
@string_const_data.26 = private constant [1 x i8] c"z"
@string_const.27 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.26, i32 0, i32 0), i64 1 }>
@4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info.28 = private unnamed_addr constant [2 x i8] c"L\00", align 1
@5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@string_const_data.29 = private constant [3 x i8] c"sbs"
@string_const.30 = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data.29, i32 0, i32 0), i64 3 }>
@string_const_data.31 = private constant [3 x i8] c"sbs"
@string_const.32 = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data.31, i32 0, i32 0), i64 3 }>
@"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@7 = 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)
  %is_alpha = alloca i1, align 1
  %num = alloca %string_descriptor, align 8
  store %string_descriptor zeroinitializer, %string_descriptor* %num, align 1
  %2 = getelementptr %string_descriptor, %string_descriptor* %num, i32 0, i32 1
  store i64 3, i64* %2, align 4
  %3 = getelementptr %string_descriptor, %string_descriptor* %num, i32 0, i32 0
  %4 = call i8* @_lfortran_malloc(i64 3)
  store i8* %4, i8** %3, align 8
  %5 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %6 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8
  %7 = call i32 @str_compare(i8* %5, i64 2, i8* %6, i64 1)
  %8 = icmp sge i32 %7, 0
  %9 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %10 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8
  %11 = call i32 @str_compare(i8* %9, i64 2, i8* %10, i64 1)
  %12 = icmp sle i32 %11, 0
  %13 = icmp eq i1 %8, false
  %14 = select i1 %13, i1 %8, i1 %12
  %15 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %16 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.4, i32 0, i32 0), align 8
  %17 = call i32 @str_compare(i8* %15, i64 2, i8* %16, i64 1)
  %18 = icmp sge i32 %17, 0
  %19 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %20 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.6, i32 0, i32 0), align 8
  %21 = call i32 @str_compare(i8* %19, i64 2, i8* %20, i64 1)
  %22 = icmp sle i32 %21, 0
  %23 = icmp eq i1 %18, false
  %24 = select i1 %23, i1 %18, i1 %22
  %25 = icmp eq i1 %14, false
  %26 = select i1 %25, i1 %24, i1 %14
  store i1 %26, i1* %is_alpha, align 1
  %27 = alloca i64, align 8
  %28 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @serialization_info, i32 0, i32 0), i64* %27, i32 0, i32 0, i1* %is_alpha)
  %29 = load i64, i64* %27, align 4
  %stringFormat_desc = alloca %string_descriptor, align 8
  %30 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %28, i8** %30, align 8
  %31 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %29, i64* %31, align 4
  %32 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %33 = load i8*, i8** %32, align 8
  %34 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %35 = load i64, i64* %34, align 4
  %36 = trunc i64 %35 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %33, i32 %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  %37 = icmp eq i8* %28, null
  br i1 %37, label %free_done, label %free_nonnull

free_nonnull:                                     ; preds = %.entry
  call void @_lfortran_free(i8* %28)
  br label %free_done

free_done:                                        ; preds = %free_nonnull, %.entry
  %38 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.8, i32 0, i32 0), align 8
  call void @_lfortran_strcpy(i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), i64* getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 1), i8 0, i8 0, i8* %38, i64 2)
  %39 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %40 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.10, i32 0, i32 0), align 8
  %41 = call i32 @str_compare(i8* %39, i64 2, i8* %40, i64 1)
  %42 = icmp sge i32 %41, 0
  %43 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %44 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.12, i32 0, i32 0), align 8
  %45 = call i32 @str_compare(i8* %43, i64 2, i8* %44, i64 1)
  %46 = icmp sle i32 %45, 0
  %47 = icmp eq i1 %42, false
  %48 = select i1 %47, i1 %42, i1 %46
  %49 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %50 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.14, i32 0, i32 0), align 8
  %51 = call i32 @str_compare(i8* %49, i64 2, i8* %50, i64 1)
  %52 = icmp sge i32 %51, 0
  %53 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %54 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.16, i32 0, i32 0), align 8
  %55 = call i32 @str_compare(i8* %53, i64 2, i8* %54, i64 1)
  %56 = icmp sle i32 %55, 0
  %57 = icmp eq i1 %52, false
  %58 = select i1 %57, i1 %52, i1 %56
  %59 = icmp eq i1 %48, false
  %60 = select i1 %59, i1 %58, i1 %48
  store i1 %60, i1* %is_alpha, align 1
  %61 = alloca i64, align 8
  %62 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @serialization_info.17, i32 0, i32 0), i64* %61, i32 0, i32 0, i1* %is_alpha)
  %63 = load i64, i64* %61, align 4
  %stringFormat_desc1 = alloca %string_descriptor, align 8
  %64 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  store i8* %62, i8** %64, align 8
  %65 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  store i64 %63, i64* %65, align 4
  %66 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  %67 = load i8*, i8** %66, align 8
  %68 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  %69 = load i64, i64* %68, align 4
  %70 = trunc i64 %69 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %67, i32 %70, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
  %71 = icmp eq i8* %62, null
  br i1 %71, label %free_done3, label %free_nonnull2

free_nonnull2:                                    ; preds = %free_done
  call void @_lfortran_free(i8* %62)
  br label %free_done3

free_done3:                                       ; preds = %free_nonnull2, %free_done
  %72 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.19, i32 0, i32 0), align 8
  call void @_lfortran_strcpy(i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), i64* getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 1), i8 0, i8 0, i8* %72, i64 2)
  %73 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %74 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.21, i32 0, i32 0), align 8
  %75 = call i32 @str_compare(i8* %73, i64 2, i8* %74, i64 1)
  %76 = icmp sge i32 %75, 0
  %77 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %78 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.23, i32 0, i32 0), align 8
  %79 = call i32 @str_compare(i8* %77, i64 2, i8* %78, i64 1)
  %80 = icmp sle i32 %79, 0
  %81 = icmp eq i1 %76, false
  %82 = select i1 %81, i1 %76, i1 %80
  %83 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %84 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.25, i32 0, i32 0), align 8
  %85 = call i32 @str_compare(i8* %83, i64 2, i8* %84, i64 1)
  %86 = icmp sge i32 %85, 0
  %87 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8
  %88 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.27, i32 0, i32 0), align 8
  %89 = call i32 @str_compare(i8* %87, i64 2, i8* %88, i64 1)
  %90 = icmp sle i32 %89, 0
  %91 = icmp eq i1 %86, false
  %92 = select i1 %91, i1 %86, i1 %90
  %93 = icmp eq i1 %82, false
  %94 = select i1 %93, i1 %92, i1 %82
  store i1 %94, i1* %is_alpha, align 1
  %95 = alloca i64, align 8
  %96 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @serialization_info.28, i32 0, i32 0), i64* %95, i32 0, i32 0, i1* %is_alpha)
  %97 = load i64, i64* %95, align 4
  %stringFormat_desc4 = alloca %string_descriptor, align 8
  %98 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0
  store i8* %96, i8** %98, align 8
  %99 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1
  store i64 %97, i64* %99, align 4
  %100 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0
  %101 = load i8*, i8** %100, align 8
  %102 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1
  %103 = load i64, i64* %102, align 4
  %104 = trunc i64 %103 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %101, i32 %104, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1)
  %105 = icmp eq i8* %96, null
  br i1 %105, label %free_done6, label %free_nonnull5

free_nonnull5:                                    ; preds = %free_done3
  call void @_lfortran_free(i8* %96)
  br label %free_done6

free_done6:                                       ; preds = %free_nonnull5, %free_done3
  %106 = getelementptr %string_descriptor, %string_descriptor* %num, i32 0, i32 0
  %107 = load i8*, i8** %106, align 8
  %StrSliceGEP = getelementptr i8, i8* %107, i64 0
  %StrSlice_StrView = alloca %string_descriptor, align 8
  %108 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0
  store i8* %StrSliceGEP, i8** %108, align 8
  %109 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1
  store i64 3, i64* %109, align 4
  %110 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0
  %111 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1
  %112 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.30, i32 0, i32 0), align 8
  call void @_lfortran_strcpy(i8** %110, i64* %111, i8 0, i8 0, i8* %112, i64 3)
  %113 = getelementptr %string_descriptor, %string_descriptor* %num, i32 0, i32 0
  %114 = load i8*, i8** %113, align 8
  %115 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.32, i32 0, i32 0), align 8
  %116 = call i32 @str_compare(i8* %114, i64 3, i8* %115, i64 3)
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %then, label %else

then:                                             ; preds = %free_done6
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont

else:                                             ; preds = %free_done6
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  call void @_lpython_free_argv()
  br label %return

return:                                           ; preds = %ifcont
  br label %FINALIZE_SYMTABLE_string_10

FINALIZE_SYMTABLE_string_10:                      ; preds = %return
  br label %Finalize_Variable_num

Finalize_Variable_num:                            ; preds = %FINALIZE_SYMTABLE_string_10
  %118 = getelementptr %string_descriptor, %string_descriptor* %num, i32 0, i32 0
  %119 = load i8*, i8** %118, align 8
  %120 = icmp eq i8* %119, null
  br i1 %120, label %free_done8, label %free_nonnull7

free_nonnull7:                                    ; preds = %Finalize_Variable_num
  call void @_lfortran_free(i8* %119)
  br label %free_done8

free_done8:                                       ; preds = %free_nonnull7, %Finalize_Variable_num
  ret i32 0
}

declare void @_lpython_call_initial_functions(i32, i8**)

declare i8* @_lfortran_malloc(i64)

declare i32 @str_compare(i8*, i64, 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 @_lfortran_strcpy(i8**, i64*, i8, i8, i8*, i64)

declare void @_lcompilers_print_error(i8*, ...)

declare void @exit(i32)

declare void @_lpython_free_argv()