File: llvm-codegen_function_polymorphic-834d4d1.stdout

package info (click to toggle)
lfortran 0.58.0-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 54,508 kB
  • sloc: cpp: 162,179; f90: 68,251; python: 17,476; ansic: 6,278; yacc: 2,334; sh: 1,317; fortran: 892; makefile: 34; javascript: 15
file content (45 lines) | stat: -rw-r--r-- 1,941 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
; ModuleID = 'LFortran'
source_filename = "LFortran"

%abstype = type { i32 (...)** }

@_Name_abstype = private unnamed_addr constant [8 x i8] c"abstype\00", align 1
@_Type_Info_abstype = linkonce_odr unnamed_addr constant { i8* } { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @_Name_abstype, i32 0, i32 0) }, align 8
@_VTable_abstype = linkonce_odr unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* bitcast ({ i8* }* @_Type_Info_abstype to i8*), i8* bitcast (void (i8*, i8*)* @_copy_codegen_function_polymorphic_abstype to i8*), i8* bitcast (void (i8**)* @_allocate_struct_codegen_function_polymorphic_abstype to i8*)] }, align 8

define void @__module_codegen_function_polymorphic_my_func(%abstype** %obj) {
.entry:
  br label %return

return:                                           ; preds = %.entry
  ret void
}

define linkonce_odr void @_copy_codegen_function_polymorphic_abstype(i8* %0, i8* %1) {
entry:
  %2 = bitcast i8* %0 to %abstype*
  %3 = bitcast i8* %1 to %abstype*
  %4 = bitcast %abstype* %2 to i32 (...)***
  %5 = load i32 (...)**, i32 (...)*** %4, align 8
  %6 = bitcast %abstype* %3 to i32 (...)***
  store i32 (...)** %5, i32 (...)*** %6, align 8
  %7 = bitcast %abstype* %3 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_abstype, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %7, align 8
  ret void
}

define linkonce_odr void @_allocate_struct_codegen_function_polymorphic_abstype(i8** %0) {
entry:
  %1 = call i8* @_lfortran_malloc(i64 8)
  call void @llvm.memset.p0i8.i32(i8* %1, i8 0, i32 8, i1 false)
  store i8* %1, i8** %0, align 8
  %2 = bitcast i8* %1 to %abstype*
  ret void
}

declare i8* @_lfortran_malloc(i64)

; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i1 immarg) #0

attributes #0 = { argmemonly nounwind willreturn writeonly }