fix(asm,irbuf): c.Asm 输出类型收集时缓存 + 大模块 IR 缓冲 1MB→8MB
1) c.Asm 输出操作数类型改为收集时直接从 alloca 缓存(单输出 scalar、多输出按序数组 out_ptys),不再依赖从 pool AsmOperand 槽二次读回 Value.Ty.Pointee。修 atom/__atomic_test_and_set 与 vrandom rdrand*_step:此前槽读回不稳定 → ret 静默 Void → 发射带名 void asm(llc 'instructions returning void cannot have a name')或报输出操作数类型缺失。2) 超大模块 IR 截断:ast/parser.vp 的 text.ll >1MB,Phase1(PHASE1_IR_SIZE)/Phase2(PHASE_A_IR_SIZE、PBP_IR_SIZE) 写缓冲与 StubMergerBuild 读缓冲(STUB_READ_BUF_SIZE) 均 1MB 单次截断 → 合并 IR 尾部丢字(opt 'end of file in global variable name');统一提到 8MB。
This commit is contained in:
1 parent
bcedb15b23
commit
4496738a24
4 files changed
+93
-22
No files matched your search
@@ -1027,7 +1027,9 @@ def RunPhase1(mb: memhub.MemBuddy | t.CPtr, includes_dir: str, temp_dir: str,
|
||||
VLogger.error(f"内存损坏(translate后存活块, rc={post_rc}): {file_path}", "Phase1")
|
||||
|
||||
# dump stub IR(declarations only)
|
||||
PHASE1_IR_SIZE: t.CSizeT = 1048576
|
||||
# 1MB 不够:ast/parser.vp 的 text.ll 超 1MB 被截断 → 合并 IR 尾部丢字
|
||||
# (opt: "end of file in global variable name"),提至 8MB。
|
||||
PHASE1_IR_SIZE: t.CSizeT = 8388608
|
||||
stub_buf: bytes = stdlib.malloc(PHASE1_IR_SIZE)
|
||||
if stub_buf is None:
|
||||
stdlib.free(src_buf)
|
||||
|
||||
Reference in new issue
Block a user