authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-04-19 01:58:39+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-04-20 20:49:34+01:00
log6f09a7041ecf328f761df60fae007c800ee1e2ec
tree4083f83a3f90e1e4725026243eb1b7bc64b3f977
parente0886506531d662067ae42ade9f099ff9c940f58
signature Commit is signed but in an unrecognized format.

Begin integrating new liveness analysis into remaining backends


6 files changed, 30 insertions(+), 0 deletions(-)

src/arch/aarch64/CodeGen.zig+5
......@@ -655,6 +655,11 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
655655 const air_tags = self.air.instructions.items(.tag);
656656
657657 for (body) |inst| {
658 // TODO: remove now-redundant isUnused calls from AIR handler functions
659 if (self.liveness.isUnused(inst) and !self.air.mustLower(inst)) {
660 continue;
661 }
662
658663 const old_air_bookkeeping = self.air_bookkeeping;
659664 try self.ensureProcessDeathCapacity(Liveness.bpi);
660665
src/arch/arm/CodeGen.zig+5
......@@ -639,6 +639,11 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
639639 const air_tags = self.air.instructions.items(.tag);
640640
641641 for (body) |inst| {
642 // TODO: remove now-redundant isUnused calls from AIR handler functions
643 if (self.liveness.isUnused(inst) and !self.air.mustLower(inst)) {
644 continue;
645 }
646
642647 const old_air_bookkeeping = self.air_bookkeeping;
643648 try self.ensureProcessDeathCapacity(Liveness.bpi);
644649
src/arch/riscv64/CodeGen.zig+5
......@@ -473,6 +473,11 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
473473 const air_tags = self.air.instructions.items(.tag);
474474
475475 for (body) |inst| {
476 // TODO: remove now-redundant isUnused calls from AIR handler functions
477 if (self.liveness.isUnused(inst) and !self.air.mustLower(inst)) {
478 continue;
479 }
480
476481 const old_air_bookkeeping = self.air_bookkeeping;
477482 try self.ensureProcessDeathCapacity(Liveness.bpi);
478483
src/arch/sparc64/CodeGen.zig+5
......@@ -489,6 +489,11 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
489489 const air_tags = self.air.instructions.items(.tag);
490490
491491 for (body) |inst| {
492 // TODO: remove now-redundant isUnused calls from AIR handler functions
493 if (self.liveness.isUnused(inst) and !self.air.mustLower(inst)) {
494 continue;
495 }
496
492497 const old_air_bookkeeping = self.air_bookkeeping;
493498 try self.ensureProcessDeathCapacity(Liveness.bpi);
494499
src/arch/x86_64/CodeGen.zig+5
......@@ -905,6 +905,11 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
905905 const air_tags = self.air.instructions.items(.tag);
906906
907907 for (body) |inst| {
908 // TODO: remove now-redundant isUnused calls from AIR handler functions
909 if (self.liveness.isUnused(inst) and !self.air.mustLower(inst)) {
910 continue;
911 }
912
908913 const old_air_bookkeeping = self.air_bookkeeping;
909914 try self.ensureProcessDeathCapacity(Liveness.bpi);
910915 if (builtin.mode == .Debug) {
src/codegen/spirv.zig+5
......@@ -1507,6 +1507,11 @@ pub const DeclGen = struct {
15071507 }
15081508
15091509 fn genInst(self: *DeclGen, inst: Air.Inst.Index) !void {
1510 // TODO: remove now-redundant isUnused calls from AIR handler functions
1511 if (self.liveness.isUnused(inst) and !self.air.mustLower(inst)) {
1512 return;
1513 }
1514
15101515 const air_tags = self.air.instructions.items(.tag);
15111516 const maybe_result_id: ?IdRef = switch (air_tags[inst]) {
15121517 // zig fmt: off