File: llvm-return_01-495409d.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 (79 lines) | stat: -rw-r--r-- 3,669 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
; ModuleID = 'LFortran'
source_filename = "LFortran"

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

@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@string_const_data = private constant [12 x i8] c"early return"
@string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([12 x i8], [12 x i8]* @string_const_data, i32 0, i32 0), i64 12 }>
@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
@string_const_data.1 = private constant [13 x i8] c"normal return"
@string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([13 x i8], [13 x i8]* @string_const_data.1, i32 0, i32 0), i64 13 }>
@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
@string_const_data.3 = private constant [12 x i8] c"main1 called"
@string_const.4 = private global %string_descriptor <{ i8* getelementptr inbounds ([12 x i8], [12 x i8]* @string_const_data.3, i32 0, i32 0), i64 12 }>
@5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @main(i32 %0, i8** %1) {
.entry:
  %main_out = alloca i32, align 4
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %main_out1 = alloca i32, align 4
  %2 = call i32 @main1()
  store i32 %2, i32* %main_out1, align 4
  %3 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.4, i32 0, i32 0), align 8
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %3, i32 12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1)
  call void @_lpython_free_argv()
  br label %return

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

FINALIZE_SYMTABLE_main:                           ; preds = %return
  ret i32 0
}

define i32 @main1() {
.entry:
  %i = alloca i32, align 4
  %main1 = alloca i32, align 4
  store i32 10, i32* %i, align 4
  %0 = load i32, i32* %i, align 4
  %1 = icmp sgt i32 %0, 5
  br i1 %1, label %then, label %else

then:                                             ; preds = %.entry
  %2 = load i32, i32* %i, align 4
  store i32 %2, i32* %main1, align 4
  %3 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %3, i32 12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  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 i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %4, i32 13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
  %5 = load i32, i32* %i, align 4
  store i32 %5, i32* %main1, align 4
  br label %return

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

FINALIZE_SYMTABLE_main1:                          ; preds = %return
  %6 = load i32, i32* %main1, align 4
  ret i32 %6
}

declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32)

declare void @_lpython_call_initial_functions(i32, i8**)

declare void @_lpython_free_argv()