[midend-CFGOpt]修复上一次提交的漏洞
This commit is contained in:
@ -116,7 +116,8 @@ bool SysYCFGOptUtils::SysYBlockMerge(Function *func) {
|
|||||||
// 用usedelete删除会导致use关系被删除我只希望移动指令到当前块
|
// 用usedelete删除会导致use关系被删除我只希望移动指令到当前块
|
||||||
// institer = SysYIROptUtils::usedelete(institer);
|
// institer = SysYIROptUtils::usedelete(institer);
|
||||||
// institer = nextBlock->getInstructions().erase(institer);
|
// institer = nextBlock->getInstructions().erase(institer);
|
||||||
nextBlock->moveInst(institer, block->getInstructions().end(), block);
|
institer = nextBlock->moveInst(institer, block->getInstructions().end(), block);
|
||||||
|
|
||||||
}
|
}
|
||||||
// 更新前驱后继关系,类似树节点操作
|
// 更新前驱后继关系,类似树节点操作
|
||||||
block->removeSuccessor(nextBlock);
|
block->removeSuccessor(nextBlock);
|
||||||
|
|||||||
Reference in New Issue
Block a user