mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
llvm: refactor llvm.Object.emit to free llvm.Object before LLVM emit
This is a refactor which I've kind of been thinking of doing for a while anyway. The LLVM backend, which emits LLVM bitcode, is now clearly separated from the libllvm API calls, which process that bitcode into an optimized IR/bitcode file, an assembly file, and/or an object file. The main benefit of this change right now is that in non-incremental compilations which use LLVM, we can now free the `llvm.Object` state after generating bitcode and before calling into libllvm, which can significantly decrease the peak RSS of such compilations. Co-authored-by: Guy Fischman <gfischman@gmail.com>
This commit is contained in:
parent
a5d66a9faa
commit
ebce4c9f21
9 changed files with 911 additions and 834 deletions
Loading…
Add table
Add a link
Reference in a new issue