@@ -10,21 +10,21 @@ target triple = "@CFG_TARGET_TRIPLE@"
10
10
%struct.rust_vec = type { i32, i32, [0 x i8] }
11
11
%struct.rust_fn = type { i32*, %struct.rust_box* }
12
12
%struct.rust_box = type opaque
13
- %struct.rust_task = type { %struct.rust_task_user, i32, %class.context, %struct.stk_seg*, i32, %struct.rust_scheduler*, %class.rust_crate_cache*, %class.rust_kernel*, i8*, %class.rust_task_list*, %struct.rust_cond*, i8*, %struct.rust_task*, i32, i32, %class.timer, i32*, i32, i32, %class.memory_region, i8, i8, i8, %class.lock_and_signal, %class.hash_map.4, %class.rust_obstack, %"class.std::map", i32, %"class.debug::task_debug_info" }
13
+ %struct.rust_task = type { %struct.rust_task_user, i32, [8 x i8], %class.context, %struct.stk_seg*, i32, %struct.rust_scheduler*, %class.rust_crate_cache*, %class.rust_kernel*, i8*, %class.rust_task_list*, %struct.rust_cond*, i8*, %struct.rust_task*, i32, i32, %class.timer, i32*, i32, i32, %class.memory_region, %class.boxed_region, i8, i8, i8, %class.lock_and_signal, %class.hash_map.4, %class.rust_obstack, i32, %"class.debug::task_debug_info", i32, [8 x i8] }
14
14
%struct.rust_task_user = type { i32, i32, %struct.chan_handle, i32 }
15
15
%struct.chan_handle = type { i32, i32 }
16
- %class.context = type { %struct.registers_t, %class.context* }
17
- %struct.registers_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i32, i32 }
18
- %struct.stk_seg = type { %struct.stk_seg*, i32, i32, i32, [0 x i8] }
19
- %struct.rust_scheduler = type { %class.rust_thread, i32, i32, %class.rust_log, i32, %class.rust_srv*, i8*, %class.rust_task_list, %class.rust_task_list, %class.rust_task_list, %class.rust_task_list, %class.rust_crate_cache, %struct.randctx, %class.rust_kernel*, i32, i32, %class.lock_and_signal, i32, %union.pthread_attr_t, %struct.rust_env*, %class.context }
16
+ %class.context = type { %struct.registers_t, %class.context*, [12 x i8] }
17
+ %struct.registers_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i32, i32, [12 x i8] }
18
+ %struct.stk_seg = type { %struct.stk_seg*, %struct.stk_seg*, i32, i32, i32, [0 x i8] }
19
+ %struct.rust_scheduler = type { %class.rust_thread, i32, i32, %class.rust_log, i32, %class.rust_srv*, i8*, %class.rust_task_list, %class.rust_task_list, %class.rust_task_list, %class.rust_task_list, %class.rust_crate_cache, %struct.randctx, %class.rust_kernel*, i32, i32, %class.lock_and_signal, i32, %union.pthread_attr_t, %struct.rust_env*, [8 x i8], %class.context }
20
20
%class.rust_thread = type { i32 (...)**, i8, i32 }
21
21
%class.rust_log = type { i32 (...)**, %class.rust_srv*, %struct.rust_scheduler*, i8 }
22
22
%class.rust_srv = type { i32 (...)**, %struct.rust_env*, %class.memory_region }
23
- %struct.rust_env = type { i32, i32, i8*, i8, i8, i8* }
23
+ %struct.rust_env = type { i32, i32, i32, i8*, i8, i8, i8* }
24
24
%class.memory_region = type { i32 (...)**, %class.rust_srv*, %class.memory_region*, i32, %class.array_list, i8, i8, %class.lock_and_signal }
25
25
%class.array_list = type { i32, %"struct.memory_region::alloc_header"**, i32 }
26
26
%"struct.memory_region::alloc_header" = type { i8 }
27
- %class.lock_and_signal = type { i32 (...)**, %union.pthread_cond_t, %union.pthread_mutex_t, i32, i8, i8 }
27
+ %class.lock_and_signal = type { i32 (...)**, %union.pthread_cond_t, %union.pthread_mutex_t, i32 }
28
28
%union.pthread_cond_t = type { %struct.anon, [4 x i8] }
29
29
%struct.anon = type { i32, i32, i64, i64, i64, i8*, i32, i32 }
30
30
%union.pthread_mutex_t = type { %"struct.<anonymous union>::__pthread_mutex_s" }
@@ -33,7 +33,8 @@ target triple = "@CFG_TARGET_TRIPLE@"
33
33
%class.rust_task_list = type { %class.indexed_list, %struct.rust_scheduler*, i8* }
34
34
%class.indexed_list = type { i32 (...)**, %class.array_list.1 }
35
35
%class.array_list.1 = type { i32, %struct.rust_task**, i32 }
36
- %class.rust_crate_cache = type { %struct.type_desc*, %struct.rust_scheduler*, i32 }
36
+ %class.rust_crate_cache = type { %struct.type_desc*, %struct.rust_hashable_dict*, %struct.rust_scheduler*, i32 }
37
+ %struct.rust_hashable_dict = type { %struct.UT_hash_handle, [0 x i8*] }
37
38
%struct.randctx = type { i32, [256 x i32], [256 x i32], i32, i32, i32 }
38
39
%class.rust_kernel = type { i32 (...)**, %class.memory_region, %class.rust_log, %class.rust_srv*, %class.lock_and_signal, %class.array_list.3, %struct.randctx, i32, %class.hash_map, i32, i32, i32, %struct.rust_env* }
39
40
%class.array_list.3 = type { i32, %struct.rust_scheduler**, i32 }
@@ -42,72 +43,78 @@ target triple = "@CFG_TARGET_TRIPLE@"
42
43
%union.pthread_attr_t = type { i32, [32 x i8] }
43
44
%struct.rust_cond = type { i8 }
44
45
%class.timer = type { i32 (...)**, i64, i64 }
46
+ %class.boxed_region = type { %class.memory_region*, %struct.rust_opaque_box* }
47
+ %struct.rust_opaque_box = type { i32, %struct.type_desc*, %struct.rust_opaque_box*, %struct.rust_opaque_box* }
45
48
%class.hash_map.4 = type { %"struct.hash_map<int, rust_port *>::map_entry"* }
46
49
%"struct.hash_map<int, rust_port *>::map_entry" = type opaque
47
50
%class.rust_obstack = type { %struct.rust_obstack_chunk*, %struct.rust_task* }
48
51
%struct.rust_obstack_chunk = type { %struct.rust_obstack_chunk*, i32, i32, i32, [0 x i8] }
52
+ %"class.debug::task_debug_info" = type { %"class.std::map" }
49
53
%"class.std::map" = type { %"class.std::_Rb_tree" }
50
- %"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<void *, std::pair<void *const, const type_desc * >, std::_Select1st<std::pair<void *const, const type_desc * > >, std::less<void *>, std::allocator<std::pair<void *const, const type_desc * > > >::_Rb_tree_impl" }
51
- %"struct.std::_Rb_tree<void *, std::pair<void *const, const type_desc * >, std::_Select1st<std::pair<void *const, const type_desc * > >, std::less<void *>, std::allocator<std::pair<void *const, const type_desc * > > >::_Rb_tree_impl" = type { %"struct.std::less", %"struct.std::_Rb_tree_node_base", i32 }
54
+ %"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<void *, std::pair<void *const, std::basic_string<char> >, std::_Select1st<std::pair<void *const, std::basic_string<char> > >, std::less<void *>, std::allocator<std::pair<void *const, std::basic_string<char> > > >::_Rb_tree_impl" }
55
+ %"struct.std::_Rb_tree<void *, std::pair<void *const, std::basic_string<char> >, std::_Select1st<std::pair<void *const, std::basic_string<char> > >, std::less<void *>, std::allocator<std::pair<void *const, std::basic_string<char> > > >::_Rb_tree_impl" = type { %"struct.std::less", %"struct.std::_Rb_tree_node_base", i32 }
52
56
%"struct.std::less" = type { i8 }
53
57
%"struct.std::_Rb_tree_node_base" = type { i32, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
54
- %"class.debug::task_debug_info" = type { %"class.std::map.5" }
55
- %"class.std::map.5" = type { %"class.std::_Rb_tree.6" }
56
- %"class.std::_Rb_tree.6" = type { %"struct.std::_Rb_tree<void *, std::pair<void *const, std::basic_string<char> >, std::_Select1st<std::pair<void *const, std::basic_string<char> > >, std::less<void *>, std::allocator<std::pair<void *const, std::basic_string<char> > > >::_Rb_tree_impl" }
57
- %"struct.std::_Rb_tree<void *, std::pair<void *const, std::basic_string<char> >, std::_Select1st<std::pair<void *const, std::basic_string<char> > >, std::less<void *>, std::allocator<std::pair<void *const, std::basic_string<char> > > >::_Rb_tree_impl" = type { %"struct.std::less", %"struct.std::_Rb_tree_node_base", i32 }
58
58
59
59
define void @rust_intrinsic_vec_len(i32* nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, %struct.rust_vec** nocapture %vp) nounwind {
60
- %1 = load %struct.rust_vec** %vp, align 4, !tbaa !0
61
- %2 = getelementptr inbounds %struct.rust_vec* %1, i32 0, i32 0
62
- %3 = load i32* %2, align 4, !tbaa !3
63
- %4 = getelementptr inbounds %struct.type_desc* %ty, i32 0, i32 1
64
- %5 = load i32* %4, align 4, !tbaa !3
65
- %6 = udiv i32 %3, %5
66
- store i32 %6, i32* %retptr, align 4, !tbaa !3
60
+ entry:
61
+ %0 = load %struct.rust_vec** %vp, align 4, !tbaa !0
62
+ %fill = getelementptr inbounds %struct.rust_vec* %0, i32 0, i32 0
63
+ %1 = load i32* %fill, align 4, !tbaa !3
64
+ %size = getelementptr inbounds %struct.type_desc* %ty, i32 0, i32 1
65
+ %2 = load i32* %size, align 4, !tbaa !3
66
+ %div = udiv i32 %1, %2
67
+ store i32 %div, i32* %retptr, align 4, !tbaa !3
67
68
ret void
68
69
}
69
70
70
71
define void @rust_intrinsic_ptr_offset(i8** nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, i8* %ptr, i32 %count) nounwind {
71
- %1 = getelementptr inbounds %struct.type_desc* %ty, i32 0, i32 1
72
- %2 = load i32* %1, align 4, !tbaa !3
73
- %3 = mul i32 %2, %count
74
- %4 = getelementptr inbounds i8* %ptr, i32 %3
75
- store i8* %4, i8** %retptr, align 4, !tbaa !0
72
+ entry:
73
+ %size = getelementptr inbounds %struct.type_desc* %ty, i32 0, i32 1
74
+ %0 = load i32* %size, align 4, !tbaa !3
75
+ %mul = mul i32 %0, %count
76
+ %arrayidx = getelementptr inbounds i8* %ptr, i32 %mul
77
+ store i8* %arrayidx, i8** %retptr, align 4, !tbaa !0
76
78
ret void
77
79
}
78
80
79
81
define void @rust_intrinsic_cast(i8* nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %t1, %struct.type_desc* nocapture %t2, i8* nocapture %src) nounwind {
80
- %1 = getelementptr inbounds %struct.type_desc* %t1, i32 0, i32 1
81
- %2 = load i32* %1, align 4, !tbaa !3
82
- tail call void @llvm.memmove.p0i8.p0i8.i32(i8* %retptr, i8* %src, i32 %2, i32 1, i1 false)
82
+ entry:
83
+ %size = getelementptr inbounds %struct.type_desc* %t1, i32 0, i32 1
84
+ %0 = load i32* %size, align 4, !tbaa !3
85
+ tail call void @llvm.memmove.p0i8.p0i8.i32(i8* %retptr, i8* %src, i32 %0, i32 1, i1 false)
83
86
ret void
84
87
}
85
88
86
89
declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
87
90
88
91
define void @rust_intrinsic_addr_of(i8** nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, i8* %valptr) nounwind {
92
+ entry:
89
93
store i8* %valptr, i8** %retptr, align 4, !tbaa !0
90
94
ret void
91
95
}
92
96
93
97
define void @rust_intrinsic_call_with_retptr(i8** %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, %struct.rust_fn* nocapture %recvfn) {
94
- %1 = getelementptr inbounds %struct.rust_fn* %recvfn, i32 0, i32 0
95
- %2 = load i32** %1, align 4, !tbaa !0
96
- %3 = bitcast i32* %2 to void (i8**, i8*, i8**)*
97
- %4 = getelementptr inbounds %struct.rust_fn* %recvfn, i32 0, i32 1
98
- %5 = load %struct.rust_box** %4, align 4, !tbaa !0
99
- %6 = bitcast %struct.rust_box* %5 to i8*
100
- tail call void %3(i8** null, i8* %6, i8** %retptr)
98
+ entry:
99
+ %fn1 = getelementptr inbounds %struct.rust_fn* %recvfn, i32 0, i32 0
100
+ %0 = load i32** %fn1, align 4, !tbaa !0
101
+ %1 = bitcast i32* %0 to void (i8**, i8*, i8**)*
102
+ %env2 = getelementptr inbounds %struct.rust_fn* %recvfn, i32 0, i32 1
103
+ %2 = load %struct.rust_box** %env2, align 4, !tbaa !0
104
+ %3 = bitcast %struct.rust_box* %2 to i8*
105
+ tail call void %1(i8** null, i8* %3, i8** %retptr)
101
106
ret void
102
107
}
103
108
104
109
define void @rust_intrinsic_get_type_desc(i8** nocapture %retptr, i8* nocapture %env, %struct.type_desc* %ty) nounwind {
110
+ entry:
105
111
%ty.c = bitcast %struct.type_desc* %ty to i8*
106
112
store i8* %ty.c, i8** %retptr, align 4, !tbaa !0
107
113
ret void
108
114
}
109
115
110
116
define void @rust_intrinsic_task_sleep(i8** nocapture %retptr, i8* nocapture %env, %struct.rust_task* %task, i32 %time_in_us, i8* %killed) {
117
+ entry:
111
118
tail call void @rust_task_sleep(%struct.rust_task* %task, i32 %time_in_us, i8* %killed)
112
119
ret void
113
120
}
0 commit comments