aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorCody Tapscott <topolarity@tapscott.me>2022-10-05 05:34:42 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-12-12 18:48:10 -0500
commit25d3713b07a100d8fdb349317db97fd9d0c1e366 (patch)
treee714bd6365744e115b5c5e78caceb70046469482 /src/Compilation.zig
parentd0eef26687ca2b4b206b70f001741314d4b8bae8 (diff)
downloadzig-25d3713b07a100d8fdb349317db97fd9d0c1e366.tar.gz
zig-25d3713b07a100d8fdb349317db97fd9d0c1e366.zip
stage2: Teach Liveness that safety checks do not modify memory
This change adds to Liveness a simple pattern match for the try-like `.condbr` blocks emitted by Sema's safety checks. This allows us to determine that these do not modify memory, which permits us to elide additional loads in the backend. As @Vexu points out in the main issue, this is probably not a complete solution on its own. We'll still want a way to reliably narrow the load/copy when performing several consecutive accesses, such as `foo.arr[x][y].z` Resolves https://github.com/ziglang/zig/issues/12215
Diffstat (limited to 'src/Compilation.zig')
0 files changed, 0 insertions, 0 deletions