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 }
@str = private unnamed_addr constant [2 x i8] c"0\00", align 1
@str.125 = private unnamed_addr constant [2 x i8] c"0\00", align 1
@str.126 = private unnamed_addr constant [5 x i8] c"true\00", align 1
@@ -257,9 +257,9 @@
@str.369 = private unnamed_addr constant [2 x i8] c"}\00", align 1
@str.370 = private unnamed_addr constant [3 x i8] c", \00", align 1
@fld.str.371 = private constant [4 x i8] c"ctx\00"
@fld.str.372 = private constant [6 x i8] c"alloc\00"
@fld.str.373 = private constant [8 x i8] c"dealloc\00"
@field_names.374 = private constant [3 x { ptr, i64 }] [{ ptr, i64 } { ptr @fld.str.371, i64 3 }, { ptr, i64 } { ptr @fld.str.372, i64 5 }, { ptr, i64 } { ptr @fld.str.373, i64 7 }]
@fld.str.372 = private constant [12 x i8] c"alloc_bytes\00"
@fld.str.373 = private constant [14 x i8] c"dealloc_bytes\00"
@field_names.374 = private constant [3 x { ptr, i64 }] [{ ptr, i64 } { ptr @fld.str.371, i64 3 }, { ptr, i64 } { ptr @fld.str.372, i64 11 }, { ptr, i64 } { ptr @fld.str.373, i64 13 }]
@str.375 = private unnamed_addr constant [3 x i8] c": \00", align 1
@str.376 = private unnamed_addr constant [6 x i8] c"Arena\00", align 1
@str.377 = private unnamed_addr constant [2 x i8] c"{\00", align 1
@@ -629,7 +629,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
@@ -641,7 +641,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
@@ -656,10 +656,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
@@ -674,10 +674,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
@@ -686,10 +686,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
@@ -701,10 +701,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 {
@@ -2707,19 +2707,19 @@ if.merge.66: ; preds = %if.then.65, %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
@@ -2734,10 +2734,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
@@ -2746,10 +2746,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
@@ -2761,10 +2761,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
@@ -2949,19 +2949,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
@@ -2976,10 +2976,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
@@ -2988,10 +2988,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
@@ -3003,10 +3003,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
@@ -3706,16 +3706,16 @@ if.merge.23: ; preds = %if.then.22, %if.mer
}
; 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
}