[midend]适应上一次commit修改已有优化遍中相关指令删除的代码

This commit is contained in:
rain2133
2025-07-31 21:10:59 +08:00
parent ef09bc70d4
commit 9a53e1b917
4 changed files with 13 additions and 26 deletions

View File

@@ -181,8 +181,7 @@ void Reg2MemContext::rewritePhis(Function *func) {
// 实际删除 Phi 指令
for (auto phi : phisToErase) {
if (phi && phi->getParent()) {
SysYIROptUtils::usedelete(phi); // 清理 use-def 链
phi->getParent()->removeInst(phi); // 从基本块中删除
SysYIROptUtils::usedelete(phi);
}
}
}