# zig reduce: add "delete unused globals" transform · gitcafe/zig

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

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

Visibility: public

Requested revision: a2f4adbd19ffea051a4fa0318bb0154e07660e55

Requested commit: a2f4adbd19ffea051a4fa0318bb0154e07660e55

Commit: a2f4adbd19ffea051a4fa0318bb0154e07660e55

Tree: ee53ffcd4587ab34106470dd8895f8b39d26ad50

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
zig reduce: add "delete unused globals" transform

While walking the AST looking for reductions, notice if any globals are
unreferenced, and if they are, add a transformation for removing the
global.

```

## Parents

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

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