Remove dead shader instruction cycles with linear liveness traversal

This commit is contained in:
nmzik
2026-10-02 15:49:43 +04:00
parent 7804eef9b6
commit 95c89229ad
3 changed files with 63 additions and 15 deletions
@@ -152,6 +152,8 @@ public:
}
private:
friend void EliminateDeadCode(const std::vector<Block*>& blocks);
void AddUse(Inst* used, size_t operand);
void RemoveUse(Inst* used, size_t operand);
void ClearArgs();
@@ -161,6 +163,7 @@ private:
ValueOpcode opcode;
uint8_t num_args;
bool live = false;
mutable uint32_t evaluation_index = UINT32_MAX;
uint64_t flags;
Block* parent = nullptr;