diff --git a/furc/src/front/ssa.cpp b/furc/src/front/ssa.cpp index 1ed0a0e..c3090ff 100644 --- a/furc/src/front/ssa.cpp +++ b/furc/src/front/ssa.cpp @@ -25,7 +25,6 @@ void ssa::optimize(const std::unique_ptr& func) { block_map_t successors; std::unordered_map> regSites; - std::unordered_map> regUses; std::unordered_map idoms; @@ -42,11 +41,6 @@ void ssa::optimize(const std::unique_ptr& func) { regSites[instr->destination().reg()].insert(i); } } - - for (const furlang::ir::operand* src : instr->sources()) { - if (src->type() != furlang::ir::operand_t::Register) continue; - regUses[i].insert(src->reg()); - } } const auto& exit = block->exit(); @@ -161,8 +155,6 @@ void ssa::optimize(const std::unique_ptr& func) { const auto& preds = predecessors[i]; for (auto reg : phis[i]) { - if (regUses[i].find(reg) == regUses[i].end()) continue; - auto phiInstr = std::make_unique(reg); for (auto pred : preds) { phiInstr->labels().emplace_back(furlang::ir::operand::new_reg(reg), pred);