aboutsummaryrefslogtreecommitdiff
path: root/src/arch/wasm/CodeGen.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2023-04-09 01:32:53 +0100
committermlugg <mlugg@mlugg.co.uk>2023-04-20 20:28:04 +0100
commit8258530c39c347ca83fdbe7575460712960a83f3 (patch)
treebb7ddf85cdb42341f09b6d1812e32938165645b2 /src/arch/wasm/CodeGen.zig
parentfac120bc3ad58a10ab80952e42becd0084aec059 (diff)
downloadzig-8258530c39c347ca83fdbe7575460712960a83f3.tar.gz
zig-8258530c39c347ca83fdbe7575460712960a83f3.zip
Liveness: control flow analysis
This is a partial rewrite of Liveness, so has some other notable changes: - A proper multi-pass system to prevent code duplication - Better logging - Minor bugfixes
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
-rw-r--r--src/arch/wasm/CodeGen.zig6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index 83af640b82..960b0ebf15 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -3183,7 +3183,6 @@ fn airLoop(func: *CodeGen, inst: Air.Inst.Index) InnerError!void {
const ty_pl = func.air.instructions.items(.data)[inst].ty_pl;
const loop = func.air.extraData(Air.Block, ty_pl.payload);
const body = func.air.extra[loop.end..][0..loop.data.body_len];
- const liveness_loop = func.liveness.getLoop(inst);
// result type of loop is always 'noreturn', meaning we can always
// emit the wasm type 'block_empty'.
@@ -3194,11 +3193,6 @@ fn airLoop(func: *CodeGen, inst: Air.Inst.Index) InnerError!void {
try func.addLabel(.br, 0);
try func.endBlock();
- try func.currentBranch().values.ensureUnusedCapacity(func.gpa, @intCast(u32, liveness_loop.deaths.len));
- for (liveness_loop.deaths) |death| {
- func.processDeath(Air.indexToRef(death));
- }
-
func.finishAir(inst, .none, &.{});
}