feat(furc/ssa): add dead code elimination

Refs: #2
This commit is contained in:
2026-06-13 22:33:57 +02:00
parent d0f3637539
commit ac1e226b4b
3 changed files with 65 additions and 0 deletions
@@ -574,6 +574,8 @@ public:
*/
instruction_t type() const override { return instruction_t::Phi; }
bool has_destination() const override { return true; }
/**
* @brief Returns this instruction's destination register.
*
@@ -588,6 +590,14 @@ public:
*/
const operand& destination() const override { return m_dst; }
std::vector<const operand*> sources() const override {
std::vector<const operand*> srcs;
srcs.reserve(m_labels.size());
for (const auto& [op, _block] : m_labels)
srcs.push_back(&op);
return srcs;
}
/**
* @brief Returns this instruction's labels.
*