# stage2: Air and Liveness are passed ephemerally · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/0f38f686964664f68e013ec3c63cfe655001f165)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 0f38f686964664f68e013ec3c63cfe655001f165

Requested commit: 0f38f686964664f68e013ec3c63cfe655001f165

Commit: 0f38f686964664f68e013ec3c63cfe655001f165

Tree: e8ed5924afcce0b9783c664e8e0c4c7d04e34d6f

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: Air and Liveness are passed ephemerally

to the link infrastructure, instead of being stored with Module.Fn. This
moves towards a strategy to make more efficient use of memory by not
storing Air or Liveness data in the Fn struct, but computing it on
demand, immediately sending it to the backend, and then immediately
freeing it.

Backends which want to defer codegen until flush() such as SPIR-V
must move the Air/Liveness data upon `updateFunc` being called and keep
track of that data in the backend implementation itself.

```

## Parents

- [0ffc6b5cc300e750029c9ff22f6a1ed0596496d6](https://git.cafe/gitcafe/zig/commit/0ffc6b5cc300e750029c9ff22f6a1ed0596496d6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/0f38f686964664f68e013ec3c63cfe655001f165?format=markdown)
