@@ -3,53 +3,63 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3
3
3
target triple = "@CFG_LLVM_TRIPLE@"
4
4
5
5
%0 = type { i32, i8**, i32 }
6
- %1 = type { %" struct.hash_map< rust_task *, rust_handle<rust_task> *>::map_entry"* }
7
- %2 = type { %"struct.hash_map<rust_port *, rust_handle<rust_port > *>::map_entry"* }
8
- %3 = type { %"struct.hash_map<rust_dom *, rust_handle<rust_dom > *>::map_entry"* }
9
- %4 = type { i32, % struct.rust_dom**, i32 }
6
+ %1 = type { i32, % struct.rust_task**, i32 }
7
+ %2 = type { %"struct.hash_map<rust_task *, rust_handle<rust_task > *>::map_entry"* }
8
+ %3 = type { %"struct.hash_map<rust_port *, rust_handle<rust_port > *>::map_entry"* }
9
+ %4 = type { %" struct.hash_map< rust_dom *, rust_handle<rust_dom> *>::map_entry"* }
10
10
%5 = type { i32 (...)**, %6 }
11
- %6 = type { i32, %class.rust_message_queue**, i32 }
12
- %7 = type opaque
13
- %8 = type { %"struct.hash_map<rust_port *, rust_proxy<rust_port> *>::map_entry"* }
11
+ %6 = type { i32, %struct.rust_dom**, i32 }
12
+ %7 = type { i32 (...)**, %8 }
13
+ %8 = type { i32, %class.rust_message_queue**, i32 }
14
+ %9 = type opaque
15
+ %10 = type opaque
16
+ %11 = type { %"struct.hash_map<rust_port *, rust_proxy<rust_port> *>::map_entry"* }
14
17
%class.array_list = type { i32, %struct.maybe_proxy**, i32 }
18
+ %class.context = type { %struct.registers_t, %class.context* }
15
19
%class.hash_map = type { %"struct.hash_map<rust_task *, rust_proxy<rust_task> *>::map_entry"* }
16
- %class.indexed_list = type { i32 (...)**, %4 }
20
+ %class.indexed_list = type { i32 (...)**, %1 }
17
21
%class.lock_and_signal = type { i32 (...)**, %struct._opaque_pthread_cond_t, %struct._opaque_pthread_mutex_t }
22
+ %class.lock_free_queue = type { i32 (...)**, %"struct.lock_free_queue<rust_message *>::pointer_t", %"struct.lock_free_queue<rust_message *>::pointer_t" }
18
23
%class.memory_region = type { i32 (...)**, %class.rust_srv*, %class.memory_region*, i32, %0, i8, i8, %class.lock_and_signal }
19
- %class.ptr_vec = type { %struct.rust_dom*, i32, i32, %class.rust_crate_cache** }
20
- %class.rust_crate = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
21
- %class.rust_crate_cache = type { [4 x i8], %"class.rust_crate_cache::rust_sym"**, %"class.rust_crate_cache::c_sym"**, %"class.rust_crate_cache::lib"**, %struct.type_desc*, %class.rust_crate*, %struct.rust_dom*, i32 }
22
- %"class.rust_crate_cache::c_sym" = type { [4 x i8], i32, %"class.rust_crate_cache::lib"*, %struct.rust_dom* }
23
- %"class.rust_crate_cache::lib" = type { [4 x i8], i32, %struct.rust_dom* }
24
- %"class.rust_crate_cache::rust_sym" = type { [4 x i8], i32, %"class.rust_crate_cache::c_sym"*, %struct.rust_dom* }
24
+ %class.rust_crate_cache = type { %struct.type_desc*, %struct.rust_dom*, i32 }
25
25
%class.rust_handle = type opaque
26
- %class.rust_kernel = type { [12 x i8] , %class.memory_region*, %class.rust_log, %class.rust_srv*, %1 , %2 , %3 , i8, %class.lock_and_signal, %class.indexed_list , %5 }
26
+ %class.rust_kernel = type { %class.rust_thread , %class.memory_region*, %class.rust_log, %class.rust_srv*, %2 , %3 , %4 , i8, %class.lock_and_signal, %5 , %7 }
27
27
%class.rust_log = type { i32 (...)**, %class.rust_srv*, %struct.rust_dom*, i8, i8 }
28
- %class.rust_message_queue = type { [20 x i8] , %class.memory_region, %class.rust_kernel*, %7 *, i32 }
28
+ %class.rust_message_queue = type { %class.lock_free_queue , %class.memory_region, %class.rust_kernel*, %10 *, i32 }
29
29
%class.rust_srv = type { i32 (...)**, %class.memory_region, %class.memory_region }
30
- %class.rust_task_list = type { [16 x i8], %struct.rust_dom*, i8* }
30
+ %class.rust_task_list = type { %class.indexed_list, %struct.rust_dom*, i8* }
31
+ %class.rust_thread = type { i32 (...)**, i8, %struct._opaque_pthread_t* }
31
32
%class.timer = type { i32 (...)**, i64, i64 }
32
33
%struct.UT_hash_bucket = type { %struct.UT_hash_handle*, i32, i32 }
33
34
%struct.UT_hash_handle = type { %struct.UT_hash_table*, i8*, i8*, %struct.UT_hash_handle*, %struct.UT_hash_handle*, i8*, i32, i32 }
34
35
%struct.UT_hash_table = type { %struct.UT_hash_bucket*, i32, i32, i32, %struct.UT_hash_handle*, i32, i32, i32, i32, i32 }
36
+ %struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* }
35
37
%struct._opaque_pthread_attr_t = type { i32, [36 x i8] }
36
38
%struct._opaque_pthread_cond_t = type { i32, [24 x i8] }
37
39
%struct._opaque_pthread_mutex_t = type { i32, [40 x i8] }
40
+ %struct._opaque_pthread_t = type { i32, %struct.__darwin_pthread_handler_rec*, [596 x i8] }
38
41
%struct.gc_alloc = type { %struct.gc_alloc*, %struct.gc_alloc*, i32, [0 x i8] }
39
42
%"struct.hash_map<rust_dom *, rust_handle<rust_dom> *>::map_entry" = type opaque
40
43
%"struct.hash_map<rust_port *, rust_handle<rust_port> *>::map_entry" = type opaque
41
44
%"struct.hash_map<rust_port *, rust_proxy<rust_port> *>::map_entry" = type opaque
42
45
%"struct.hash_map<rust_task *, rust_handle<rust_task> *>::map_entry" = type opaque
43
46
%"struct.hash_map<rust_task *, rust_proxy<rust_task> *>::map_entry" = type opaque
44
- %struct.maybe_proxy = type { [4 x i8], %struct.rust_task* }
47
+ %"struct.lock_free_queue<rust_message *>::node_t" = type { %9*, %"struct.lock_free_queue<rust_message *>::pointer_t" }
48
+ %"struct.lock_free_queue<rust_message *>::pointer_t" = type { %"struct.lock_free_queue<rust_message *>::node_t"*, i32 }
49
+ %struct.maybe_proxy = type { %struct.rc_base, %struct.rust_task* }
45
50
%struct.randctx = type { i32, [256 x i32], [256 x i32], i32, i32, i32 }
51
+ %struct.rc_base = type { i32 }
52
+ %struct.registers_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i32, i32 }
46
53
%struct.rust_alarm = type { %struct.rust_task*, i32 }
47
54
%struct.rust_cond = type { i8 }
48
- %struct.rust_dom = type { [4 x i8], i32, %class.rust_crate*, %class.rust_log, i32, %class.rust_srv*, %class.memory_region, %class.memory_region, i8*, %class.rust_task_list, %class.rust_task_list, %class.rust_task_list, %class.rust_task_list, %class.ptr_vec, %struct.randctx, %struct.rust_task*, %struct.rust_task*, i32, %class.rust_kernel*, i32, %class.hash_map, %8, %class.rust_message_queue*, %struct._opaque_pthread_attr_t }
49
- %struct.rust_task = type { [8 x i8], %struct.stk_seg*, i32, i32, %struct.gc_alloc*, %struct.rust_dom*, %class.rust_crate_cache*, i8*, %class.rust_task_list*, %struct.rust_cond*, i8*, %struct.rust_task*, i32, i32, i32, %class.timer, i32*, %class.array_list, %struct.rust_alarm, %class.rust_handle* }
50
- %struct.rust_vec = type { [4 x i8], i32, i32, i32, [0 x i8] }
55
+ %struct.rust_dom = type { %struct.rc_base, i32, %class.rust_log, i32, %class.rust_srv*, %class.memory_region, %class.memory_region, i8*, %class.rust_task_list, %class.rust_task_list, %class.rust_task_list, %class.rust_task_list, %class.rust_crate_cache, %struct.randctx, %struct.rust_task*, %struct.rust_task*, i32, %class.rust_kernel*, i32, %class.hash_map, %11, %class.rust_message_queue*, %struct._opaque_pthread_attr_t }
56
+ %struct.rust_ivec = type { i32, i32, %union.rust_ivec_payload }
57
+ %struct.rust_ivec_heap = type { i32, [0 x i8] }
58
+ %struct.rust_task = type { %struct.maybe_proxy, %struct.stk_seg*, i32, i32, %struct.gc_alloc*, %struct.rust_dom*, %class.rust_crate_cache*, i8*, %class.rust_task_list*, %struct.rust_cond*, i8*, %struct.rust_task*, i32, i32, i32, %class.timer, i32*, %class.array_list, %struct.rust_alarm, %class.rust_handle*, %class.context }
59
+ %struct.rust_vec = type { %struct.rc_base, i32, i32, i32, [0 x i8] }
51
60
%struct.stk_seg = type { i32, i32, [0 x i8] }
52
- %struct.type_desc = type { %struct.type_desc**, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.UT_hash_handle, i32, [0 x %struct.type_desc*] }
61
+ %struct.type_desc = type { %struct.type_desc**, i32, i32, void (i8*, %struct.rust_task*, i8*, %struct.type_desc**, i8*)*, void (i8*, %struct.rust_task*, i8*, %struct.type_desc**, i8*)*, void (i8*, %struct.rust_task*, i8*, %struct.type_desc**, i8*)*, void (i8*, %struct.rust_task*, i8*, %struct.type_desc**, i8*)*, void (i8*, %struct.rust_task*, i8*, %struct.type_desc**, i8*)*, void (i8*, %struct.rust_task*, i8*, %struct.type_desc**, i8*)*, i32, void (i8*, %struct.rust_task*, i8*, %struct.type_desc**, i8*, i8*, i8)*, %struct.UT_hash_handle, i32, [0 x %struct.type_desc*] }
62
+ %union.rust_ivec_payload = type { %struct.rust_ivec_heap* }
53
63
54
64
define linkonce_odr i32 @rust_intrinsic_vec_len(%struct.rust_task* nocapture %task, %struct.type_desc* nocapture %ty, %struct.rust_vec* nocapture %v) nounwind readonly ssp {
55
65
entry:
@@ -61,6 +71,33 @@ entry:
61
71
ret i32 %div
62
72
}
63
73
74
+ define linkonce_odr i32 @rust_intrinsic_ivec_len(%struct.rust_task* nocapture %task, %struct.type_desc* nocapture %ty, %struct.rust_ivec* nocapture %v) nounwind readonly ssp {
75
+ entry:
76
+ %fill1 = getelementptr inbounds %struct.rust_ivec* %v, i32 0, i32 0
77
+ %tmp2 = load i32* %fill1, align 4, !tbaa !0
78
+ %tobool = icmp eq i32 %tmp2, 0
79
+ br i1 %tobool, label %if.else, label %if.end17
80
+
81
+ if.else: ; preds = %entry
82
+ %ptr = getelementptr inbounds %struct.rust_ivec* %v, i32 0, i32 2, i32 0
83
+ %tmp7 = load %struct.rust_ivec_heap** %ptr, align 4, !tbaa !3
84
+ %tobool8 = icmp eq %struct.rust_ivec_heap* %tmp7, null
85
+ br i1 %tobool8, label %if.end17, label %if.then9
86
+
87
+ if.then9: ; preds = %if.else
88
+ %fill14 = getelementptr inbounds %struct.rust_ivec_heap* %tmp7, i32 0, i32 0
89
+ %tmp15 = load i32* %fill14, align 4, !tbaa !0
90
+ br label %if.end17
91
+
92
+ if.end17: ; preds = %if.else, %entry, %if.then9
93
+ %fill.0 = phi i32 [ %tmp15, %if.then9 ], [ %tmp2, %entry ], [ 0, %if.else ]
94
+ %size = getelementptr inbounds %struct.type_desc* %ty, i32 0, i32 1
95
+ %tmp20 = load i32* %size, align 4, !tbaa !0
96
+ %div = udiv i32 %fill.0, %tmp20
97
+ ret i32 %div
98
+ }
99
+
64
100
!0 = metadata !{metadata !"long", metadata !1}
65
101
!1 = metadata !{metadata !"omnipotent char", metadata !2}
66
102
!2 = metadata !{metadata !"Simple C/C++ TBAA", null}
103
+ !3 = metadata !{metadata !"any pointer", metadata !1}
0 commit comments