[midend-GVN&SideEffect]修复GVN的部分问题和副作用分析的缺陷

This commit is contained in:
rain2133
2025-08-16 18:52:29 +08:00
parent d038884ffb
commit c4eb1c3980
3 changed files with 83 additions and 6 deletions

View File

@ -56,6 +56,9 @@ private:
// 检查是否可以安全地用一个值替换另一个值
bool canReplace(Instruction* original, Value* replacement);
// 检查两个load指令之间是否有store指令修改了相同的内存位置
bool hasInterveningStore(LoadInst* earlierLoad, LoadInst* laterLoad, Value* ptr);
// 生成表达式的标准化字符串
std::string getCanonicalExpression(Instruction* inst);
};