mem: rename Allocator primitives to alloc_bytes/dealloc_bytes (Phase 4 naming pulled forward, Agra-approved)

This commit is contained in:
agra
2026-06-11 15:33:35 +03:00
parent ca5bd52262
commit 88bae3c9f5
58 changed files with 1536 additions and 1534 deletions

View File

@@ -1,5 +1,5 @@
@__sx_default_context = internal constant { { ptr, ptr, ptr }, ptr } { { ptr, ptr, ptr } { ptr null, ptr @__thunk_CAllocator_Allocator_alloc, ptr @__thunk_CAllocator_Allocator_dealloc }, ptr null }
@__sx_default_context = internal constant { { ptr, ptr, ptr }, ptr } { { ptr, ptr, ptr } { ptr null, ptr @__thunk_CAllocator_Allocator_alloc_bytes, ptr @__thunk_CAllocator_Allocator_dealloc_bytes }, ptr null }
@__VL__s64__IntCell__vtable = internal constant { ptr } { ptr @__thunk_IntCell_VL__s64_get }
@__VL__string__StrCell__vtable = internal constant { ptr } { ptr @__thunk_StrCell_VL__string_get }
@str = private unnamed_addr constant [2 x i8] c"0\00", align 1
@@ -269,9 +269,9 @@
@str.381 = private unnamed_addr constant [2 x i8] c"}\00", align 1
@str.382 = private unnamed_addr constant [3 x i8] c", \00", align 1
@fld.str.383 = private constant [4 x i8] c"ctx\00"
@fld.str.384 = private constant [6 x i8] c"alloc\00"
@fld.str.385 = private constant [8 x i8] c"dealloc\00"
@field_names.386 = private constant [3 x { ptr, i64 }] [{ ptr, i64 } { ptr @fld.str.383, i64 3 }, { ptr, i64 } { ptr @fld.str.384, i64 5 }, { ptr, i64 } { ptr @fld.str.385, i64 7 }]
@fld.str.384 = private constant [12 x i8] c"alloc_bytes\00"
@fld.str.385 = private constant [14 x i8] c"dealloc_bytes\00"
@field_names.386 = private constant [3 x { ptr, i64 }] [{ ptr, i64 } { ptr @fld.str.383, i64 3 }, { ptr, i64 } { ptr @fld.str.384, i64 11 }, { ptr, i64 } { ptr @fld.str.385, i64 13 }]
@str.387 = private unnamed_addr constant [3 x i8] c": \00", align 1
@str.388 = private unnamed_addr constant [6 x i8] c"Arena\00", align 1
@str.389 = private unnamed_addr constant [2 x i8] c"{\00", align 1
@@ -706,7 +706,7 @@ declare ptr @memcpy(ptr, ptr, i64)
declare ptr @memset(ptr, i32, i64)
; Function Attrs: nounwind
define internal ptr @CAllocator.alloc(ptr %0, ptr %1, i64 %2) #0 {
define internal ptr @CAllocator.alloc_bytes(ptr %0, ptr %1, i64 %2) #0 {
entry:
%alloca = alloca ptr, align 8
store ptr %1, ptr %alloca, align 8
@@ -718,7 +718,7 @@ entry:
}
; Function Attrs: nounwind
define internal void @CAllocator.dealloc(ptr %0, ptr %1, ptr %2) #0 {
define internal void @CAllocator.dealloc_bytes(ptr %0, ptr %1, ptr %2) #0 {
entry:
%alloca = alloca ptr, align 8
store ptr %1, ptr %alloca, align 8
@@ -733,10 +733,10 @@ entry:
declare i64 @GPA.init(ptr) #0
; Function Attrs: nounwind
declare ptr @GPA.alloc(ptr, ptr, i64) #0
declare ptr @GPA.alloc_bytes(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @GPA.dealloc(ptr, ptr, ptr) #0
declare void @GPA.dealloc_bytes(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare void @Arena.add_chunk(ptr, ptr, i64) #0
@@ -751,10 +751,10 @@ declare void @Arena.reset(ptr, ptr) #0
declare void @Arena.deinit(ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @Arena.alloc(ptr, ptr, i64) #0
declare ptr @Arena.alloc_bytes(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @Arena.dealloc(ptr, ptr, ptr) #0
declare void @Arena.dealloc_bytes(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @BufAlloc.init(ptr, ptr, i64) #0
@@ -763,10 +763,10 @@ declare ptr @BufAlloc.init(ptr, ptr, i64) #0
declare void @BufAlloc.reset(ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @BufAlloc.alloc(ptr, ptr, i64) #0
declare ptr @BufAlloc.alloc_bytes(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @BufAlloc.dealloc(ptr, ptr, ptr) #0
declare void @BufAlloc.dealloc_bytes(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare void @TrackingAllocator.init(ptr sret({ { ptr, ptr, ptr }, i64, i64, i64 }), ptr, ptr) #0
@@ -778,10 +778,10 @@ declare i64 @TrackingAllocator.leak_count(ptr, ptr) #0
declare void @TrackingAllocator.report(ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @TrackingAllocator.alloc(ptr, ptr, i64) #0
declare ptr @TrackingAllocator.alloc_bytes(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @TrackingAllocator.dealloc(ptr, ptr, ptr) #0
declare void @TrackingAllocator.dealloc_bytes(ptr, ptr, ptr) #0
; Function Attrs: nounwind
define internal { ptr, i64 } @cstring(ptr %0, i64 %1) #0 {
@@ -2906,19 +2906,19 @@ if.merge.36: ; preds = %if.then.35, %while.
}
; Function Attrs: nounwind
declare ptr @CAllocator.alloc.1(ptr, ptr, i64) #0
declare ptr @CAllocator.alloc_bytes.1(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @CAllocator.dealloc.2(ptr, ptr, ptr) #0
declare void @CAllocator.dealloc_bytes.2(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare i64 @GPA.init.3(ptr) #0
; Function Attrs: nounwind
declare ptr @GPA.alloc.4(ptr, ptr, i64) #0
declare ptr @GPA.alloc_bytes.4(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @GPA.dealloc.5(ptr, ptr, ptr) #0
declare void @GPA.dealloc_bytes.5(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare void @Arena.add_chunk.6(ptr, ptr, i64) #0
@@ -2933,10 +2933,10 @@ declare void @Arena.reset.8(ptr, ptr) #0
declare void @Arena.deinit.9(ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @Arena.alloc.10(ptr, ptr, i64) #0
declare ptr @Arena.alloc_bytes.10(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @Arena.dealloc.11(ptr, ptr, ptr) #0
declare void @Arena.dealloc_bytes.11(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @BufAlloc.init.12(ptr, ptr, i64) #0
@@ -2945,10 +2945,10 @@ declare ptr @BufAlloc.init.12(ptr, ptr, i64) #0
declare void @BufAlloc.reset.13(ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @BufAlloc.alloc.14(ptr, ptr, i64) #0
declare ptr @BufAlloc.alloc_bytes.14(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @BufAlloc.dealloc.15(ptr, ptr, ptr) #0
declare void @BufAlloc.dealloc_bytes.15(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare void @TrackingAllocator.init.16(ptr sret({ { ptr, ptr, ptr }, i64, i64, i64 }), ptr, ptr) #0
@@ -2960,10 +2960,10 @@ declare i64 @TrackingAllocator.leak_count.17(ptr, ptr) #0
declare void @TrackingAllocator.report.18(ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @TrackingAllocator.alloc.19(ptr, ptr, i64) #0
declare ptr @TrackingAllocator.alloc_bytes.19(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @TrackingAllocator.dealloc.20(ptr, ptr, ptr) #0
declare void @TrackingAllocator.dealloc_bytes.20(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @escape(ptr, ptr) #0
@@ -3148,19 +3148,19 @@ declare i32 @close.22(i32) #0
declare i16 @htons(ptr, i64) #0
; Function Attrs: nounwind
declare ptr @CAllocator.alloc.23(ptr, ptr, i64) #0
declare ptr @CAllocator.alloc_bytes.23(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @CAllocator.dealloc.24(ptr, ptr, ptr) #0
declare void @CAllocator.dealloc_bytes.24(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare i64 @GPA.init.25(ptr) #0
; Function Attrs: nounwind
declare ptr @GPA.alloc.26(ptr, ptr, i64) #0
declare ptr @GPA.alloc_bytes.26(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @GPA.dealloc.27(ptr, ptr, ptr) #0
declare void @GPA.dealloc_bytes.27(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare void @Arena.add_chunk.28(ptr, ptr, i64) #0
@@ -3175,10 +3175,10 @@ declare void @Arena.reset.30(ptr, ptr) #0
declare void @Arena.deinit.31(ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @Arena.alloc.32(ptr, ptr, i64) #0
declare ptr @Arena.alloc_bytes.32(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @Arena.dealloc.33(ptr, ptr, ptr) #0
declare void @Arena.dealloc_bytes.33(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @BufAlloc.init.34(ptr, ptr, i64) #0
@@ -3187,10 +3187,10 @@ declare ptr @BufAlloc.init.34(ptr, ptr, i64) #0
declare void @BufAlloc.reset.35(ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @BufAlloc.alloc.36(ptr, ptr, i64) #0
declare ptr @BufAlloc.alloc_bytes.36(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @BufAlloc.dealloc.37(ptr, ptr, ptr) #0
declare void @BufAlloc.dealloc_bytes.37(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare void @TrackingAllocator.init.38(ptr sret({ { ptr, ptr, ptr }, i64, i64, i64 }), ptr, ptr) #0
@@ -3202,10 +3202,10 @@ declare i64 @TrackingAllocator.leak_count.39(ptr, ptr) #0
declare void @TrackingAllocator.report.40(ptr, ptr) #0
; Function Attrs: nounwind
declare ptr @TrackingAllocator.alloc.41(ptr, ptr, i64) #0
declare ptr @TrackingAllocator.alloc_bytes.41(ptr, ptr, i64) #0
; Function Attrs: nounwind
declare void @TrackingAllocator.dealloc.42(ptr, ptr, ptr) #0
declare void @TrackingAllocator.dealloc_bytes.42(ptr, ptr, ptr) #0
; Function Attrs: nounwind
declare i32 @open.43(ptr, i32, ...) #0
@@ -3778,16 +3778,16 @@ entry:
}
; Function Attrs: nounwind
define internal ptr @__thunk_CAllocator_Allocator_alloc(ptr %0, ptr %1, i64 %2) #0 {
define internal ptr @__thunk_CAllocator_Allocator_alloc_bytes(ptr %0, ptr %1, i64 %2) #0 {
entry:
%call = call ptr @CAllocator.alloc(ptr %0, ptr %1, i64 %2)
%call = call ptr @CAllocator.alloc_bytes(ptr %0, ptr %1, i64 %2)
ret ptr %call
}
; Function Attrs: nounwind
define internal void @__thunk_CAllocator_Allocator_dealloc(ptr %0, ptr %1, ptr %2) #0 {
define internal void @__thunk_CAllocator_Allocator_dealloc_bytes(ptr %0, ptr %1, ptr %2) #0 {
entry:
call void @CAllocator.dealloc(ptr %0, ptr %1, ptr %2)
call void @CAllocator.dealloc_bytes(ptr %0, ptr %1, ptr %2)
ret void
}