aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-09-21 15:08:32 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-09-21 15:23:29 -0700
commit5913140b6bf96e168a0167906a78e2d4aac5bd9d (patch)
tree95eba3e1ac8628e4fbba4ea8a1c222cd04555771 /src/codegen/spirv
parentaffd8f8b59d9d803f98178ec32ab9e2f6b0b30d2 (diff)
downloadzig-5913140b6bf96e168a0167906a78e2d4aac5bd9d.tar.gz
zig-5913140b6bf96e168a0167906a78e2d4aac5bd9d.zip
stage2: free Sema's arena after generating machine code
Previously, linker backends or machine code backends were able to hold on to references to inside Sema's temporary arena. However there can be large objects stored there that we want to free after machine code is generated. The primary change in this commit is to use a temporary arena for Sema of function bodies that gets freed after machine code backend finishes handling `updateFunc` (at the same time that Air and Liveness get freed). The other changes in this commit are fixing issues that fell out from the primary change. * The C linker backend is rewritten to handle updateDecl and updateFunc separately. Also, all Decl updates get access to typedefs and fwd_decls, not only functions. * The C linker backend is updated to the new API that does not depend on allocateDeclIndexes and does not have to handle garbage collected decls. * The C linker backend uses an arena for Type/Value objects that `typedefs` references. These can be garbage collected every so often after flush(), however that garbage collection code is not implemented at this time. It will be pretty simple, just allocate a new arena, copy all the Type objects to it, update the keys of the hash map, free the old arena. * Sema: fix a handful of instances of not copying Type/Value objects from the temporary arena into the appropriate Decl arena. * Type: fix some function types not reporting hasCodeGenBits() correctly.
Diffstat (limited to 'src/codegen/spirv')
0 files changed, 0 insertions, 0 deletions