Skip to content

Instantly share code, notes, and snippets.

@JeffBezanson
Created May 9, 2018 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffBezanson/09ffede3648a980ba397b4f5435392c1 to your computer and use it in GitHub Desktop.
Save JeffBezanson/09ffede3648a980ba397b4f5435392c1 to your computer and use it in GitHub Desktop.
; ModuleID = 'convert'
source_filename = "convert"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:10:11:12"
target triple = "x86_64-unknown-linux-gnu"
%jl_value_t = type opaque
@llvm.compiler.used = appending global [2 x i8*] [i8* bitcast (%jl_value_t addrspace(10)* (i8*, i32, i32)* @jl_gc_pool_alloc to i8*), i8* bitcast (%jl_value_t addrspace(10)* (i8*, i64)* @jl_gc_big_alloc to i8*)], section "llvm.metadata"
; Function Attrs: sspstrong
define { i8, i8 } @julia_convert_35606(%jl_value_t addrspace(10)*, i64) #0 !dbg !9 {
top:
%2 = call %jl_value_t*** @julia.ptls_states()
call void @llvm.dbg.value(metadata i64 %1, metadata !24, metadata !DIExpression()), !dbg !27
call void @llvm.dbg.value(metadata i8 %5, metadata !25, metadata !DIExpression()), !dbg !27
%sext = shl i64 %1, 56, !dbg !28
%3 = ashr exact i64 %sext, 56, !dbg !28
call void @llvm.dbg.value(metadata i64 %3, metadata !26, metadata !DIExpression()), !dbg !27
%4 = icmp eq i64 %3, %1, !dbg !40
br i1 %4, label %L15, label %L13, !dbg !40
L13: ; preds = %top
call void @julia_throw_inexacterror_21587(%jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737032372512 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737125579824 to %jl_value_t*) to %jl_value_t addrspace(10)*), i64 %1), !dbg !40
call void @llvm.trap(), !dbg !40
unreachable, !dbg !40
L15: ; preds = %top
%5 = trunc i64 %1 to i8, !dbg !41
%6 = call { i8, i8 } @julia_Type_35607(%jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737038479296 to %jl_value_t*) to %jl_value_t addrspace(10)*), i8 %5, i8 1), !dbg !38
%.fca.0.extract = extractvalue { i8, i8 } %6, 0, !dbg !38
%.fca.1.extract = extractvalue { i8, i8 } %6, 1, !dbg !38
ret { i8, i8 } %6, !dbg !27
}
define nonnull %jl_value_t addrspace(10)* @jfptr_convert_35607(%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)**, i32) #1 {
top:
%3 = call %jl_value_t*** @julia.ptls_states()
%4 = getelementptr %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %1, i64 1
%5 = load %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %4, align 8, !nonnull !4
%6 = getelementptr %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %1, i64 2
%7 = bitcast %jl_value_t addrspace(10)** %6 to i64 addrspace(10)**
%8 = load i64 addrspace(10)*, i64 addrspace(10)** %7, align 8, !nonnull !4, !dereferenceable !42
%9 = addrspacecast i64 addrspace(10)* %8 to i64 addrspace(11)*
%10 = load i64, i64 addrspace(11)* %9, align 8
%11 = call { i8, i8 } @julia_convert_35606(%jl_value_t addrspace(10)* nonnull %5, i64 %10)
%.fca.0.extract = extractvalue { i8, i8 } %11, 0
%.fca.1.extract = extractvalue { i8, i8 } %11, 1
%12 = bitcast %jl_value_t*** %3 to i8*
%13 = call noalias nonnull %jl_value_t addrspace(10)* @julia.gc_alloc_obj(i8* %12, i64 2, %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737038479296 to %jl_value_t*) to %jl_value_t addrspace(10)*))
%.sroa.0.0..sroa_raw_cast = bitcast %jl_value_t addrspace(10)* %13 to i8 addrspace(10)*
store i8 %.fca.0.extract, i8 addrspace(10)* %.sroa.0.0..sroa_raw_cast, align 8
%.sroa.2.0..sroa_raw_idx = getelementptr inbounds i8, i8 addrspace(10)* %.sroa.0.0..sroa_raw_cast, i64 1
store i8 %.fca.1.extract, i8 addrspace(10)* %.sroa.2.0..sroa_raw_idx, align 1
ret %jl_value_t addrspace(10)* %13
}
declare %jl_value_t*** @julia.ptls_states()
declare noalias nonnull %jl_value_t addrspace(10)* @julia.gc_alloc_obj(i8*, i64, %jl_value_t addrspace(10)*)
; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p10i8.p0i8.i64(i8 addrspace(10)* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) #2
; Function Attrs: nounwind readnone speculatable
declare void @llvm.dbg.declare(metadata, metadata, metadata) #3
declare void @julia_throw_inexacterror_21587(%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, i64)
; Function Attrs: noreturn nounwind
declare void @llvm.trap() #4
; Function Attrs: sspstrong
define i8 @julia_gcd_35608(i8, i8) #0 !dbg !43 {
top:
%2 = call %jl_value_t*** @julia.ptls_states()
call void @llvm.dbg.value(metadata i8 %0, metadata !49, metadata !DIExpression()), !dbg !59
call void @llvm.dbg.value(metadata i8 %1, metadata !50, metadata !DIExpression()), !dbg !59
call void @llvm.dbg.value(metadata i8 %1, metadata !53, metadata !DIExpression()), !dbg !59
call void @llvm.dbg.value(metadata i8 %0, metadata !52, metadata !DIExpression()), !dbg !59
br label %L3, !dbg !59
L3: ; preds = %after_srem, %top
%b.0 = phi i8 [ %1, %top ], [ %9, %after_srem ]
%a.0 = phi i8 [ %0, %top ], [ %b.0, %after_srem ]
call void @llvm.dbg.value(metadata i8 %a.0, metadata !52, metadata !DIExpression()), !dbg !59
call void @llvm.dbg.value(metadata i8 %b.0, metadata !53, metadata !DIExpression()), !dbg !59
%3 = icmp eq i8 %b.0, 0, !dbg !60
br i1 %3, label %L31, label %if, !dbg !59
L31: ; preds = %L3
%4 = icmp sgt i8 %a.0, -1, !dbg !68
%5 = sub i8 0, %a.0, !dbg !77
%6 = select i1 %4, i8 %a.0, i8 %5, !dbg !79
%7 = icmp sgt i8 %6, -1, !dbg !81
br i1 %7, label %L74, label %if3, !dbg !85
if: ; preds = %L3
call void @llvm.dbg.value(metadata i8 %b.0, metadata !51, metadata !DIExpression()), !dbg !59
switch i8 %b.0, label %oksrem [
i8 0, label %fail
i8 -1, label %after_srem
], !dbg !86
fail: ; preds = %if
call void @jl_throw(%jl_value_t addrspace(12)* addrspacecast (%jl_value_t* inttoptr (i64 140737173949264 to %jl_value_t*) to %jl_value_t addrspace(12)*)), !dbg !86
unreachable, !dbg !86
oksrem: ; preds = %if
%8 = srem i8 %a.0, %b.0, !dbg !86
br label %after_srem, !dbg !86
after_srem: ; preds = %if, %oksrem
%9 = phi i8 [ %8, %oksrem ], [ 0, %if ], !dbg !86
call void @llvm.dbg.value(metadata i8 %9, metadata !53, metadata !DIExpression()), !dbg !59
call void @llvm.dbg.value(metadata i8 %b.0, metadata !52, metadata !DIExpression()), !dbg !59
br label %L3, !dbg !89
L74: ; preds = %L31
ret i8 %6, !dbg !76
if3: ; preds = %L31
%10 = call %jl_value_t addrspace(10)* @jl_box_int8(i8 signext %a.0), !dbg !90
%11 = call cc37 nonnull %jl_value_t addrspace(10)* bitcast (%jl_value_t addrspace(10)* (%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)**, i32)* @"japi1_#print_to_string#359_34520" to %jl_value_t addrspace(10)* (%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*)*)(%jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737167297232 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737032282120 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737129164048 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737165353120 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* %10, %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737165353184 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737125579824 to %jl_value_t*) to %jl_value_t addrspace(10)*)), !dbg !90
%12 = bitcast %jl_value_t*** %2 to i8*, !dbg !95
%13 = call noalias nonnull %jl_value_t addrspace(10)* @julia.gc_alloc_obj(i8* %12, i64 8, %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737144135296 to %jl_value_t*) to %jl_value_t addrspace(10)*)), !dbg !95
%14 = addrspacecast %jl_value_t addrspace(10)* %13 to %jl_value_t addrspace(11)*, !dbg !95
%15 = bitcast %jl_value_t addrspace(11)* %14 to %jl_value_t addrspace(10)* addrspace(11)*, !dbg !95
store %jl_value_t addrspace(10)* null, %jl_value_t addrspace(10)* addrspace(11)* %15, align 8, !dbg !95, !tbaa !97
%16 = bitcast %jl_value_t addrspace(10)* %13 to %jl_value_t addrspace(10)* addrspace(10)*, !dbg !95
store %jl_value_t addrspace(10)* %11, %jl_value_t addrspace(10)* addrspace(10)* %16, align 8, !dbg !95, !tbaa !97
%17 = addrspacecast %jl_value_t addrspace(10)* %13 to %jl_value_t addrspace(12)*, !dbg !85
call void @jl_throw(%jl_value_t addrspace(12)* %17), !dbg !85
unreachable, !dbg !85
}
define nonnull %jl_value_t addrspace(10)* @jfptr_gcd_35609(%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)**, i32) #1 {
top:
%3 = call %jl_value_t*** @julia.ptls_states()
%4 = getelementptr %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %1, i64 1
%5 = bitcast %jl_value_t addrspace(10)** %4 to i8 addrspace(10)**
%6 = load i8 addrspace(10)*, i8 addrspace(10)** %5, align 8, !nonnull !4, !dereferenceable !102
%7 = addrspacecast i8 addrspace(10)* %6 to i8 addrspace(11)*
%8 = load i8, i8 addrspace(11)* %7, align 1
%9 = getelementptr %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %1, i64 2
%10 = bitcast %jl_value_t addrspace(10)** %9 to i8 addrspace(10)**
%11 = load i8 addrspace(10)*, i8 addrspace(10)** %10, align 8, !nonnull !4, !dereferenceable !102
%12 = addrspacecast i8 addrspace(10)* %11 to i8 addrspace(11)*
%13 = load i8, i8 addrspace(11)* %12, align 1
%14 = call i8 @julia_gcd_35608(i8 %8, i8 %13)
%15 = call %jl_value_t addrspace(10)* @jl_box_int8(i8 signext %14)
ret %jl_value_t addrspace(10)* %15
}
declare %jl_value_t addrspace(10)* @jl_box_int8(i8)
; Function Attrs: noreturn
declare void @jl_throw(%jl_value_t addrspace(12)*) #5
declare nonnull %jl_value_t addrspace(10)* @"japi1_#print_to_string#359_34520"(%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)**, i32) #1
; Function Attrs: sspstrong
define { i8, i8 } @julia_Type_35607(%jl_value_t addrspace(10)*, i8, i8) #0 !dbg !103 {
top:
%3 = alloca i16, align 2
%tmpcast = bitcast i16* %3 to [2 x i8]*
%4 = alloca [2 x i8], align 1
%5 = call %jl_value_t*** @julia.ptls_states()
call void @llvm.dbg.value(metadata i8 %1, metadata !108, metadata !DIExpression()), !dbg !116
call void @llvm.dbg.value(metadata i8 %2, metadata !109, metadata !DIExpression()), !dbg !116
%6 = icmp eq i8 %1, %2, !dbg !117
br i1 %6, label %if, label %L10, !dbg !116
L10: ; preds = %top
br label %L12, !dbg !116
if: ; preds = %top
%7 = icmp ne i8 %2, 0, !dbg !119
br label %L12, !dbg !116
L12: ; preds = %L10, %if
%"#temp#.0" = phi i1 [ true, %L10 ], [ %7, %if ]
br i1 %"#temp#.0", label %L25, label %if3, !dbg !116
L25: ; preds = %L12
%8 = icmp sgt i8 %2, -1, !dbg !121
%9 = icmp sgt i8 %2, -1, !dbg !128
br i1 %9, label %L88, label %if4, !dbg !127
if3: ; preds = %L12
%10 = call cc37 nonnull %jl_value_t addrspace(10)* bitcast (%jl_value_t addrspace(10)* (%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)**, i32)* @"japi1_#print_to_string#359_34520" to %jl_value_t addrspace(10)* (%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)*)*)(%jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737167297232 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737032282120 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737129164048 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737189077952 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737125579824 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737189078000 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737125579824 to %jl_value_t*) to %jl_value_t addrspace(10)*), %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737189078032 to %jl_value_t*) to %jl_value_t addrspace(10)*)), !dbg !130
%11 = bitcast %jl_value_t*** %5 to i8*, !dbg !134
%12 = call noalias nonnull %jl_value_t addrspace(10)* @julia.gc_alloc_obj(i8* %11, i64 8, %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737125600864 to %jl_value_t*) to %jl_value_t addrspace(10)*)), !dbg !134
%13 = addrspacecast %jl_value_t addrspace(10)* %12 to %jl_value_t addrspace(11)*, !dbg !134
%14 = bitcast %jl_value_t addrspace(11)* %13 to %jl_value_t addrspace(10)* addrspace(11)*, !dbg !134
store %jl_value_t addrspace(10)* null, %jl_value_t addrspace(10)* addrspace(11)* %14, align 8, !dbg !134, !tbaa !97
%15 = bitcast %jl_value_t addrspace(10)* %12 to %jl_value_t addrspace(10)* addrspace(10)*, !dbg !134
store %jl_value_t addrspace(10)* %10, %jl_value_t addrspace(10)* addrspace(10)* %15, align 8, !dbg !134, !tbaa !97
%16 = addrspacecast %jl_value_t addrspace(10)* %12 to %jl_value_t addrspace(12)*, !dbg !116
call void @jl_throw(%jl_value_t addrspace(12)* %16), !dbg !116
unreachable, !dbg !116
L88: ; preds = %L25
%17 = call i8 @julia_gcd_35608(i8 %1, i8 %2), !dbg !136
call void @llvm.dbg.value(metadata i8 %17, metadata !115, metadata !DIExpression()), !dbg !116
%18 = icmp ne i8 %1, -128, !dbg !138
%19 = icmp ne i8 %17, -1, !dbg !138
%20 = or i1 %19, %18, !dbg !138
%21 = icmp ne i8 %17, 0, !dbg !138
%22 = and i1 %21, %20, !dbg !138
br i1 %22, label %pass8, label %fail7, !dbg !138
if4: ; preds = %L25
%23 = sub i8 0, %1, !dbg !141
%24 = sub i8 0, %2, !dbg !143
%25 = call i8 @julia_gcd_35608(i8 %23, i8 %24), !dbg !145
call void @llvm.dbg.value(metadata i8 %25, metadata !115, metadata !DIExpression()), !dbg !116
%26 = icmp ne i8 %23, -128, !dbg !147
%27 = icmp ne i8 %25, -1, !dbg !147
%28 = or i1 %27, %26, !dbg !147
%29 = icmp ne i8 %25, 0, !dbg !147
%30 = and i1 %29, %28, !dbg !147
br i1 %30, label %pass, label %fail, !dbg !147
fail: ; preds = %if4
call void @jl_throw(%jl_value_t addrspace(12)* addrspacecast (%jl_value_t* inttoptr (i64 140737173949264 to %jl_value_t*) to %jl_value_t addrspace(12)*)), !dbg !147
unreachable, !dbg !147
pass: ; preds = %if4
%31 = icmp ne i8 %24, -128, !dbg !150
%32 = icmp ne i8 %25, -1, !dbg !150
%33 = or i1 %32, %31, !dbg !150
%34 = icmp ne i8 %25, 0, !dbg !150
%35 = and i1 %34, %33, !dbg !150
br i1 %35, label %pass6, label %fail5, !dbg !150
fail5: ; preds = %pass
call void @jl_throw(%jl_value_t addrspace(12)* addrspacecast (%jl_value_t* inttoptr (i64 140737173949264 to %jl_value_t*) to %jl_value_t addrspace(12)*)), !dbg !150
unreachable, !dbg !150
pass6: ; preds = %pass
%36 = sdiv i8 %23, %25, !dbg !147
%37 = sdiv i8 %24, %25, !dbg !150
%.sroa.221.0.insert.ext = zext i8 %37 to i16, !dbg !127
%.sroa.221.0.insert.shift = shl nuw i16 %.sroa.221.0.insert.ext, 8, !dbg !127
%.sroa.020.0.insert.ext = zext i8 %36 to i16, !dbg !127
%.sroa.020.0.insert.insert = or i16 %.sroa.221.0.insert.shift, %.sroa.020.0.insert.ext, !dbg !127
br label %L101, !dbg !127
L101: ; preds = %pass10, %pass6
%"#temp#1.sroa.0.0" = phi i16 [ %.sroa.0.0.insert.insert, %pass10 ], [ %.sroa.020.0.insert.insert, %pass6 ]
store i16 %"#temp#1.sroa.0.0", i16* %3, align 2, !dbg !127
%38 = bitcast i16* %3 to i8*, !dbg !152
%39 = addrspacecast i8* %38 to i8 addrspace(11)*, !dbg !152
%40 = addrspacecast [2 x i8]* %tmpcast to [2 x i8] addrspace(11)*, !dbg !157
%41 = getelementptr [2 x i8], [2 x i8] addrspace(11)* %40, i64 0, i64 1, !dbg !157
%42 = load i8, i8 addrspace(11)* %39, align 1, !dbg !161, !tbaa !162
%43 = load i8, i8 addrspace(11)* %41, align 1, !dbg !161, !tbaa !162
%.fca.0.insert = insertvalue { i8, i8 } undef, i8 %42, 0, !dbg !161
%.fca.1.insert = insertvalue { i8, i8 } %.fca.0.insert, i8 %43, 1, !dbg !161
ret { i8, i8 } %.fca.1.insert, !dbg !161
fail7: ; preds = %L88
call void @jl_throw(%jl_value_t addrspace(12)* addrspacecast (%jl_value_t* inttoptr (i64 140737173949264 to %jl_value_t*) to %jl_value_t addrspace(12)*)), !dbg !138
unreachable, !dbg !138
pass8: ; preds = %L88
%44 = sdiv i8 %1, %17, !dbg !138
%45 = icmp ne i8 %2, -128, !dbg !164
%46 = icmp ne i8 %17, -1, !dbg !164
%47 = or i1 %46, %45, !dbg !164
%48 = icmp ne i8 %17, 0, !dbg !164
%49 = and i1 %48, %47, !dbg !164
br i1 %49, label %pass10, label %fail9, !dbg !164
fail9: ; preds = %pass8
call void @jl_throw(%jl_value_t addrspace(12)* addrspacecast (%jl_value_t* inttoptr (i64 140737173949264 to %jl_value_t*) to %jl_value_t addrspace(12)*)), !dbg !164
unreachable, !dbg !164
pass10: ; preds = %pass8
%50 = sdiv i8 %2, %17, !dbg !164
%.sroa.2.0.insert.ext = zext i8 %50 to i16, !dbg !127
%.sroa.2.0.insert.shift = shl i16 %.sroa.2.0.insert.ext, 8, !dbg !127
%.sroa.2.0.insert.insert = or i16 0, %.sroa.2.0.insert.shift, !dbg !127
%.sroa.0.0.insert.ext = zext i8 %44 to i16, !dbg !127
%.sroa.0.0.insert.mask = and i16 %.sroa.2.0.insert.insert, -256, !dbg !127
%.sroa.0.0.insert.insert = or i16 %.sroa.0.0.insert.mask, %.sroa.0.0.insert.ext, !dbg !127
br label %L101, !dbg !127
}
define nonnull %jl_value_t addrspace(10)* @jfptr_Type_35608(%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)**, i32) #1 {
top:
%3 = alloca { i8, i8 }
%4 = call %jl_value_t*** @julia.ptls_states()
%5 = bitcast %jl_value_t*** %4 to %jl_value_t addrspace(10)**
%6 = getelementptr %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %5, i64 3
%7 = bitcast %jl_value_t addrspace(10)** %6 to i64**
%8 = load i64*, i64** %7, !tbaa !166
%9 = getelementptr %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %1, i64 0
%10 = load %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %9, !nonnull !4
%11 = getelementptr %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %1, i64 1
%12 = load %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %11, !nonnull !4, !dereferenceable !102
%13 = bitcast %jl_value_t addrspace(10)* %12 to i8 addrspace(10)*
%14 = addrspacecast i8 addrspace(10)* %13 to i8 addrspace(11)*
%15 = load i8, i8 addrspace(11)* %14, align 1
%16 = getelementptr %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %1, i64 2
%17 = load %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %16, !nonnull !4, !dereferenceable !102
%18 = bitcast %jl_value_t addrspace(10)* %17 to i8 addrspace(10)*
%19 = addrspacecast i8 addrspace(10)* %18 to i8 addrspace(11)*
%20 = load i8, i8 addrspace(11)* %19, align 1
%21 = call { i8, i8 } @julia_Type_35607(%jl_value_t addrspace(10)* %10, i8 %15, i8 %20)
store { i8, i8 } %21, { i8, i8 }* %3
%22 = bitcast %jl_value_t*** %4 to i8*
%23 = call noalias nonnull %jl_value_t addrspace(10)* @julia.gc_alloc_obj(i8* %22, i64 2, %jl_value_t addrspace(10)* addrspacecast (%jl_value_t* inttoptr (i64 140737038479296 to %jl_value_t*) to %jl_value_t addrspace(10)*))
%24 = bitcast %jl_value_t addrspace(10)* %23 to i8 addrspace(10)*
%25 = bitcast { i8, i8 }* %3 to i8*
call void @llvm.memcpy.p10i8.p0i8.i64(i8 addrspace(10)* %24, i8* %25, i64 2, i32 8, i1 false)
ret %jl_value_t addrspace(10)* %23
}
; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) #2
declare noalias nonnull %jl_value_t addrspace(10)* @jl_gc_pool_alloc(i8*, i32, i32)
declare noalias nonnull %jl_value_t addrspace(10)* @jl_gc_big_alloc(i8*, i64)
; Function Attrs: nounwind readnone speculatable
declare void @llvm.dbg.value(metadata, metadata, metadata) #3
attributes #0 = { sspstrong }
attributes #1 = { "thunk" }
attributes #2 = { argmemonly nounwind }
attributes #3 = { nounwind readnone speculatable }
attributes #4 = { noreturn nounwind }
attributes #5 = { noreturn }
!llvm.module.flags = !{!0, !1}
!llvm.dbg.cu = !{!2, !5, !7}
!0 = !{i32 2, !"Dwarf Version", i32 4}
!1 = !{i32 1, !"Debug Info Version", i32 3}
!2 = distinct !DICompileUnit(language: DW_LANG_C89, file: !3, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4)
!3 = !DIFile(filename: "number.jl", directory: ".")
!4 = !{}
!5 = distinct !DICompileUnit(language: DW_LANG_C89, file: !6, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4)
!6 = !DIFile(filename: "intfuncs.jl", directory: ".")
!7 = distinct !DICompileUnit(language: DW_LANG_C89, file: !8, producer: "julia", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4)
!8 = !DIFile(filename: "rational.jl", directory: ".")
!9 = distinct !DISubprogram(name: "convert", linkageName: "julia_convert_35606", scope: null, file: !3, line: 7, type: !10, isLocal: false, isDefinition: true, scopeLine: 7, isOptimized: true, unit: !2, variables: !21)
!10 = !DISubroutineType(types: !11)
!11 = !{!12, !15, !20}
!12 = !DICompositeType(tag: DW_TAG_structure_type, name: "Rational", size: 16, align: 8, elements: !13, runtimeLang: DW_LANG_Julia, identifier: "40985")
!13 = !{!14, !14}
!14 = !DIBasicType(name: "Int8", size: 8, encoding: DW_ATE_unsigned)
!15 = !DIDerivedType(tag: DW_TAG_typedef, name: "Type", baseType: !16)
!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !17, size: 64, align: 64)
!17 = !DICompositeType(tag: DW_TAG_structure_type, name: "jl_value_t", file: !18, line: 71, align: 64, elements: !19)
!18 = !DIFile(filename: "julia.h", directory: "")
!19 = !{!16}
!20 = !DIBasicType(name: "Int64", size: 64, encoding: DW_ATE_unsigned)
!21 = !{!22, !24, !25, !26}
!22 = !DILocalVariable(name: "#self#", arg: 1, scope: !9, file: !3, line: 7, type: !23)
!23 = !DICompositeType(tag: DW_TAG_structure_type, name: "#convert", align: 8, elements: !4, runtimeLang: DW_LANG_Julia, identifier: "6264")
!24 = !DILocalVariable(name: "x", arg: 3, scope: !9, file: !3, line: 7, type: !20)
!25 = !DILocalVariable(name: "y", scope: !9, file: !3, line: 7, type: !14)
!26 = !DILocalVariable(name: "back", scope: !9, file: !3, line: 7, type: !20)
!27 = !DILocation(line: 7, scope: !9)
!28 = !DILocation(line: 592, scope: !29, inlinedAt: !32)
!29 = distinct !DISubprogram(name: "checked_trunc_sint;", linkageName: "checked_trunc_sint", scope: !30, file: !30, line: 591, type: !31, isLocal: false, isDefinition: true, scopeLine: 591, isOptimized: true, unit: !2, variables: !4)
!30 = !DIFile(filename: "boot.jl", directory: ".")
!31 = !DISubroutineType(types: !4)
!32 = !DILocation(line: 608, scope: !33, inlinedAt: !34)
!33 = distinct !DISubprogram(name: "toInt8;", linkageName: "toInt8", scope: !30, file: !30, line: 608, type: !31, isLocal: false, isDefinition: true, scopeLine: 608, isOptimized: true, unit: !2, variables: !4)
!34 = !DILocation(line: 718, scope: !35, inlinedAt: !36)
!35 = distinct !DISubprogram(name: "Type;", linkageName: "Type", scope: !30, file: !30, line: 718, type: !31, isLocal: false, isDefinition: true, scopeLine: 718, isOptimized: true, unit: !2, variables: !4)
!36 = !DILocation(line: 7, scope: !37, inlinedAt: !38)
!37 = distinct !DISubprogram(name: "convert;", linkageName: "convert", scope: !3, file: !3, line: 7, type: !31, isLocal: false, isDefinition: true, scopeLine: 7, isOptimized: true, unit: !2, variables: !4)
!38 = !DILocation(line: 78, scope: !39, inlinedAt: !27)
!39 = distinct !DISubprogram(name: "Type;", linkageName: "Type", scope: !8, file: !8, line: 78, type: !31, isLocal: false, isDefinition: true, scopeLine: 78, isOptimized: true, unit: !2, variables: !4)
!40 = !DILocation(line: 593, scope: !29, inlinedAt: !32)
!41 = !DILocation(line: 591, scope: !29, inlinedAt: !32)
!42 = !{i64 8}
!43 = distinct !DISubprogram(name: "gcd", linkageName: "julia_gcd_35608", scope: null, file: !6, line: 20, type: !44, isLocal: false, isDefinition: true, scopeLine: 20, isOptimized: true, unit: !5, variables: !46)
!44 = !DISubroutineType(types: !45)
!45 = !{!14, !14, !14}
!46 = !{!47, !49, !50, !51, !52, !53, !54, !55, !56, !58, !54, !55, !56, !54, !55, !56}
!47 = !DILocalVariable(name: "#self#", arg: 1, scope: !43, file: !6, line: 20, type: !48)
!48 = !DICompositeType(tag: DW_TAG_structure_type, name: "#gcd", align: 8, elements: !4, runtimeLang: DW_LANG_Julia, identifier: "8609")
!49 = !DILocalVariable(name: "a", arg: 2, scope: !43, file: !6, line: 20, type: !14)
!50 = !DILocalVariable(name: "b", arg: 3, scope: !43, file: !6, line: 20, type: !14)
!51 = !DILocalVariable(name: "t", scope: !43, file: !6, line: 20, type: !14)
!52 = !DILocalVariable(name: "a", scope: !43, file: !6, line: 20, type: !14)
!53 = !DILocalVariable(name: "b", scope: !43, file: !6, line: 20, type: !14)
!54 = !DILocalVariable(name: "px", scope: !43, file: !6, line: 20, type: !20)
!55 = !DILocalVariable(name: "py", scope: !43, file: !6, line: 20, type: !20)
!56 = !DILocalVariable(name: "R", scope: !43, file: !6, line: 20, type: !57)
!57 = !DIDerivedType(tag: DW_TAG_typedef, name: "Any", baseType: !16)
!58 = !DILocalVariable(name: "r", scope: !43, file: !6, line: 20, type: !14)
!59 = !DILocation(line: 20, scope: !43)
!60 = !DILocation(line: 424, scope: !61, inlinedAt: !63)
!61 = distinct !DISubprogram(name: "==;", linkageName: "==", scope: !62, file: !62, line: 424, type: !31, isLocal: false, isDefinition: true, scopeLine: 424, isOptimized: true, unit: !5, variables: !4)
!62 = !DIFile(filename: "promotion.jl", directory: ".")
!63 = !DILocation(line: 349, scope: !64, inlinedAt: !65)
!64 = distinct !DISubprogram(name: "==;", linkageName: "==", scope: !62, file: !62, line: 349, type: !31, isLocal: false, isDefinition: true, scopeLine: 349, isOptimized: true, unit: !5, variables: !4)
!65 = !DILocation(line: 183, scope: !66, inlinedAt: !59)
!66 = distinct !DISubprogram(name: "!=;", linkageName: "!=", scope: !67, file: !67, line: 183, type: !31, isLocal: false, isDefinition: true, scopeLine: 183, isOptimized: true, unit: !5, variables: !4)
!67 = !DIFile(filename: "operators.jl", directory: ".")
!68 = !DILocation(line: 49, scope: !69, inlinedAt: !71)
!69 = distinct !DISubprogram(name: "<;", linkageName: "<", scope: !70, file: !70, line: 49, type: !31, isLocal: false, isDefinition: true, scopeLine: 49, isOptimized: true, unit: !5, variables: !4)
!70 = !DIFile(filename: "int.jl", directory: ".")
!71 = !DILocation(line: 350, scope: !72, inlinedAt: !73)
!72 = distinct !DISubprogram(name: "<;", linkageName: "<", scope: !62, file: !62, line: 350, type: !31, isLocal: false, isDefinition: true, scopeLine: 350, isOptimized: true, unit: !5, variables: !4)
!73 = !DILocation(line: 121, scope: !74, inlinedAt: !76)
!74 = distinct !DISubprogram(name: "checked_abs;", linkageName: "checked_abs", scope: !75, file: !75, line: 121, type: !31, isLocal: false, isDefinition: true, scopeLine: 121, isOptimized: true, unit: !5, variables: !4)
!75 = !DIFile(filename: "checked.jl", directory: ".")
!76 = !DILocation(line: 25, scope: !43)
!77 = !DILocation(line: 51, scope: !78, inlinedAt: !73)
!78 = distinct !DISubprogram(name: "-;", linkageName: "-", scope: !70, file: !70, line: 51, type: !31, isLocal: false, isDefinition: true, scopeLine: 51, isOptimized: true, unit: !5, variables: !4)
!79 = !DILocation(line: 351, scope: !80, inlinedAt: !73)
!80 = distinct !DISubprogram(name: "ifelse;", linkageName: "ifelse", scope: !67, file: !67, line: 351, type: !31, isLocal: false, isDefinition: true, scopeLine: 351, isOptimized: true, unit: !5, variables: !4)
!81 = !DILocation(line: 49, scope: !82, inlinedAt: !83)
!82 = distinct !DISubprogram(name: "<;", linkageName: "<", scope: !70, file: !70, line: 49, type: !31, isLocal: false, isDefinition: true, scopeLine: 49, isOptimized: true, unit: !5, variables: !4)
!83 = !DILocation(line: 350, scope: !84, inlinedAt: !85)
!84 = distinct !DISubprogram(name: "<;", linkageName: "<", scope: !62, file: !62, line: 350, type: !31, isLocal: false, isDefinition: true, scopeLine: 350, isOptimized: true, unit: !5, variables: !4)
!85 = !DILocation(line: 122, scope: !74, inlinedAt: !76)
!86 = !DILocation(line: 230, scope: !87, inlinedAt: !88)
!87 = distinct !DISubprogram(name: "rem;", linkageName: "rem", scope: !70, file: !70, line: 230, type: !31, isLocal: false, isDefinition: true, scopeLine: 230, isOptimized: true, unit: !5, variables: !4)
!88 = !DILocation(line: 22, scope: !43)
!89 = !DILocation(line: 23, scope: !43)
!90 = !DILocation(line: 110, scope: !91, inlinedAt: !93)
!91 = distinct !DISubprogram(name: "print_to_string;", linkageName: "print_to_string", scope: !92, file: !92, line: 110, type: !31, isLocal: false, isDefinition: true, scopeLine: 110, isOptimized: true, unit: !5, variables: !4)
!92 = !DIFile(filename: "strings/io.jl", directory: ".")
!93 = !DILocation(line: 141, scope: !94, inlinedAt: !85)
!94 = distinct !DISubprogram(name: "string;", linkageName: "string", scope: !92, file: !92, line: 141, type: !31, isLocal: false, isDefinition: true, scopeLine: 141, isOptimized: true, unit: !5, variables: !4)
!95 = !DILocation(line: 269, scope: !96, inlinedAt: !85)
!96 = distinct !DISubprogram(name: "Type;", linkageName: "Type", scope: !30, file: !30, line: 269, type: !31, isLocal: false, isDefinition: true, scopeLine: 269, isOptimized: true, unit: !5, variables: !4)
!97 = !{!98, !98, i64 0}
!98 = !{!"jtbaa_immut", !99, i64 0}
!99 = !{!"jtbaa_value", !100, i64 0}
!100 = !{!"jtbaa_data", !101, i64 0}
!101 = !{!"jtbaa"}
!102 = !{i64 1}
!103 = distinct !DISubprogram(name: "Type", linkageName: "julia_Type_35607", scope: null, file: !8, line: 13, type: !104, isLocal: false, isDefinition: true, scopeLine: 13, isOptimized: true, unit: !7, variables: !106)
!104 = !DISubroutineType(types: !105)
!105 = !{!12, !15, !14, !14}
!106 = !{!107, !108, !109, !110, !111, !112, !113, !114, !112, !113, !114, !112, !113, !114, !115, !115}
!107 = !DILocalVariable(name: "#self#", arg: 1, scope: !103, file: !8, line: 13, type: !15)
!108 = !DILocalVariable(name: "num", arg: 2, scope: !103, file: !8, line: 13, type: !14)
!109 = !DILocalVariable(name: "den", arg: 3, scope: !103, file: !8, line: 13, type: !14)
!110 = !DILocalVariable(name: "num2", scope: !103, file: !8, line: 13, type: !14)
!111 = !DILocalVariable(name: "den2", scope: !103, file: !8, line: 13, type: !14)
!112 = !DILocalVariable(name: "px", scope: !103, file: !8, line: 13, type: !20)
!113 = !DILocalVariable(name: "py", scope: !103, file: !8, line: 13, type: !20)
!114 = !DILocalVariable(name: "R", scope: !103, file: !8, line: 13, type: !57)
!115 = !DILocalVariable(name: "g", scope: !103, file: !8, line: 13, type: !14)
!116 = !DILocation(line: 13, scope: !103)
!117 = !DILocation(line: 424, scope: !118, inlinedAt: !116)
!118 = distinct !DISubprogram(name: "==;", linkageName: "==", scope: !62, file: !62, line: 424, type: !31, isLocal: false, isDefinition: true, scopeLine: 424, isOptimized: true, unit: !7, variables: !4)
!119 = !DILocation(line: 424, scope: !120, inlinedAt: !116)
!120 = distinct !DISubprogram(name: "==;", linkageName: "==", scope: !62, file: !62, line: 424, type: !31, isLocal: false, isDefinition: true, scopeLine: 424, isOptimized: true, unit: !7, variables: !4)
!121 = !DILocation(line: 49, scope: !122, inlinedAt: !123)
!122 = distinct !DISubprogram(name: "<;", linkageName: "<", scope: !70, file: !70, line: 49, type: !31, isLocal: false, isDefinition: true, scopeLine: 49, isOptimized: true, unit: !7, variables: !4)
!123 = !DILocation(line: 350, scope: !124, inlinedAt: !125)
!124 = distinct !DISubprogram(name: "<;", linkageName: "<", scope: !62, file: !62, line: 350, type: !31, isLocal: false, isDefinition: true, scopeLine: 350, isOptimized: true, unit: !7, variables: !4)
!125 = !DILocation(line: 126, scope: !126, inlinedAt: !127)
!126 = distinct !DISubprogram(name: "sign;", linkageName: "sign", scope: !3, file: !3, line: 126, type: !31, isLocal: false, isDefinition: true, scopeLine: 126, isOptimized: true, unit: !7, variables: !4)
!127 = !DILocation(line: 14, scope: !103)
!128 = !DILocation(line: 351, scope: !129, inlinedAt: !125)
!129 = distinct !DISubprogram(name: "ifelse;", linkageName: "ifelse", scope: !67, file: !67, line: 351, type: !31, isLocal: false, isDefinition: true, scopeLine: 351, isOptimized: true, unit: !7, variables: !4)
!130 = !DILocation(line: 110, scope: !131, inlinedAt: !132)
!131 = distinct !DISubprogram(name: "print_to_string;", linkageName: "print_to_string", scope: !92, file: !92, line: 110, type: !31, isLocal: false, isDefinition: true, scopeLine: 110, isOptimized: true, unit: !7, variables: !4)
!132 = !DILocation(line: 141, scope: !133, inlinedAt: !116)
!133 = distinct !DISubprogram(name: "string;", linkageName: "string", scope: !92, file: !92, line: 141, type: !31, isLocal: false, isDefinition: true, scopeLine: 141, isOptimized: true, unit: !7, variables: !4)
!134 = !DILocation(line: 273, scope: !135, inlinedAt: !116)
!135 = distinct !DISubprogram(name: "Type;", linkageName: "Type", scope: !30, file: !30, line: 273, type: !31, isLocal: false, isDefinition: true, scopeLine: 273, isOptimized: true, unit: !7, variables: !4)
!136 = !DILocation(line: 23, scope: !137, inlinedAt: !127)
!137 = distinct !DISubprogram(name: "divgcd;", linkageName: "divgcd", scope: !8, file: !8, line: 23, type: !31, isLocal: false, isDefinition: true, scopeLine: 23, isOptimized: true, unit: !7, variables: !4)
!138 = !DILocation(line: 229, scope: !139, inlinedAt: !140)
!139 = distinct !DISubprogram(name: "div;", linkageName: "div", scope: !70, file: !70, line: 229, type: !31, isLocal: false, isDefinition: true, scopeLine: 229, isOptimized: true, unit: !7, variables: !4)
!140 = !DILocation(line: 24, scope: !137, inlinedAt: !127)
!141 = !DILocation(line: 51, scope: !142, inlinedAt: !127)
!142 = distinct !DISubprogram(name: "-;", linkageName: "-", scope: !70, file: !70, line: 51, type: !31, isLocal: false, isDefinition: true, scopeLine: 51, isOptimized: true, unit: !7, variables: !4)
!143 = !DILocation(line: 51, scope: !144, inlinedAt: !127)
!144 = distinct !DISubprogram(name: "-;", linkageName: "-", scope: !70, file: !70, line: 51, type: !31, isLocal: false, isDefinition: true, scopeLine: 51, isOptimized: true, unit: !7, variables: !4)
!145 = !DILocation(line: 23, scope: !146, inlinedAt: !127)
!146 = distinct !DISubprogram(name: "divgcd;", linkageName: "divgcd", scope: !8, file: !8, line: 23, type: !31, isLocal: false, isDefinition: true, scopeLine: 23, isOptimized: true, unit: !7, variables: !4)
!147 = !DILocation(line: 229, scope: !148, inlinedAt: !149)
!148 = distinct !DISubprogram(name: "div;", linkageName: "div", scope: !70, file: !70, line: 229, type: !31, isLocal: false, isDefinition: true, scopeLine: 229, isOptimized: true, unit: !7, variables: !4)
!149 = !DILocation(line: 24, scope: !146, inlinedAt: !127)
!150 = !DILocation(line: 229, scope: !151, inlinedAt: !149)
!151 = distinct !DISubprogram(name: "div;", linkageName: "div", scope: !70, file: !70, line: 229, type: !31, isLocal: false, isDefinition: true, scopeLine: 229, isOptimized: true, unit: !7, variables: !4)
!152 = !DILocation(line: 22, scope: !153, inlinedAt: !155)
!153 = distinct !DISubprogram(name: "getindex;", linkageName: "getindex", scope: !154, file: !154, line: 22, type: !31, isLocal: false, isDefinition: true, scopeLine: 22, isOptimized: true, unit: !7, variables: !4)
!154 = !DIFile(filename: "tuple.jl", directory: ".")
!155 = !DILocation(line: 59, scope: !156, inlinedAt: !127)
!156 = distinct !DISubprogram(name: "indexed_next;", linkageName: "indexed_next", scope: !154, file: !154, line: 59, type: !31, isLocal: false, isDefinition: true, scopeLine: 59, isOptimized: true, unit: !7, variables: !4)
!157 = !DILocation(line: 22, scope: !158, inlinedAt: !159)
!158 = distinct !DISubprogram(name: "getindex;", linkageName: "getindex", scope: !154, file: !154, line: 22, type: !31, isLocal: false, isDefinition: true, scopeLine: 22, isOptimized: true, unit: !7, variables: !4)
!159 = !DILocation(line: 59, scope: !160, inlinedAt: !127)
!160 = distinct !DISubprogram(name: "indexed_next;", linkageName: "indexed_next", scope: !154, file: !154, line: 59, type: !31, isLocal: false, isDefinition: true, scopeLine: 59, isOptimized: true, unit: !7, variables: !4)
!161 = !DILocation(line: 15, scope: !103)
!162 = !{!163, !163, i64 0}
!163 = !{!"jtbaa_stack", !101, i64 0}
!164 = !DILocation(line: 229, scope: !165, inlinedAt: !140)
!165 = distinct !DISubprogram(name: "div;", linkageName: "div", scope: !70, file: !70, line: 229, type: !31, isLocal: false, isDefinition: true, scopeLine: 229, isOptimized: true, unit: !7, variables: !4)
!166 = !{!167, !167, i64 0, i64 1}
!167 = !{!"jtbaa_const", !101, i64 0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment