Skip to content

Commit 223f601

Browse files
committed
Remove rust_intrinsic_vec_len
I just edited the ll by hand since I don't have clang on hand
1 parent 0467fa6 commit 223f601

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

src/rt/intrinsics/intrinsics.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88
extern "C" CDECL void
99
upcall_fail(rust_task *task, char const *expr, char const *file, size_t line);
1010

11-
extern "C" void
12-
rust_intrinsic_vec_len(rust_task *task, size_t *retptr, type_desc *ty,
13-
rust_evec *v)
14-
{
15-
*retptr = v->fill / ty->size;
16-
}
17-
1811
extern "C" void
1912
rust_intrinsic_ivec_len(rust_task *task, size_t *retptr, type_desc *ty,
2013
rust_ivec *v)

src/rt/intrinsics/intrinsics.ll.in

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ target triple = "@CFG_LLVM_TRIPLE@"
3939
%class.context = type { %struct.registers_t, %class.context* }
4040
%struct.registers_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i32, i32 }
4141
%"class.rust_task::wakeup_callback" = type { i32 (...)** }
42-
%struct.rust_vec = type { %struct.rc_base.5, i32, i32, i32, [0 x i8] }
4342
%struct.rc_base.5 = type { i32 }
4443
%struct.rust_ivec = type { i32, i32, %union.rust_ivec_payload }
4544
%union.rust_ivec_payload = type { %struct.rust_ivec_heap* }
@@ -54,17 +53,6 @@ target triple = "@CFG_LLVM_TRIPLE@"
5453
@.str = private unnamed_addr constant [42 x i8] c"attempt to cast values of differing sizes\00", align 1
5554
@.str1 = private unnamed_addr constant [15 x i8] c"intrinsics.cpp\00", align 1
5655

57-
define linkonce_odr void @rust_intrinsic_vec_len(%struct.rust_task* nocapture %task, i32* nocapture %retptr, %struct.type_desc* nocapture %ty, %struct.rust_vec* nocapture %v) nounwind {
58-
entry:
59-
%fill = getelementptr inbounds %struct.rust_vec* %v, i32 0, i32 2
60-
%tmp1 = load i32* %fill, align 4, !tbaa !0
61-
%size = getelementptr inbounds %struct.type_desc* %ty, i32 0, i32 1
62-
%tmp3 = load i32* %size, align 4, !tbaa !0
63-
%div = udiv i32 %tmp1, %tmp3
64-
store i32 %div, i32* %retptr, align 4, !tbaa !0
65-
ret void
66-
}
67-
6856
define linkonce_odr void @rust_intrinsic_ivec_len(%struct.rust_task* nocapture %task, i32* nocapture %retptr, %struct.type_desc* nocapture %ty, %struct.rust_ivec* nocapture %v) nounwind {
6957
entry:
7058
%fill1 = getelementptr inbounds %struct.rust_ivec* %v, i32 0, i32 0

0 commit comments

Comments
 (0)