[midend-Loop-LICM][fix]检查load能否外提时其内存地址在循环中是否会被修改,需要判断函数调用对load内存地址的影响。

This commit is contained in:
rain2133
2025-08-17 17:42:19 +08:00
parent 8ca64610eb
commit f317010d76
2 changed files with 50 additions and 8 deletions

View File

@@ -161,14 +161,14 @@ void PassManager::runOptimizationPipeline(Module* moduleIR, IRBuilder* builderIR
}
// this->clearPasses();
// this->addPass(&LICM::ID);
// this->run();
this->clearPasses();
this->addPass(&LICM::ID);
this->run();
// if(DEBUG) {
// std::cout << "=== IR After LICM ===\n";
// printPasses();
// }
if(DEBUG) {
std::cout << "=== IR After LICM ===\n";
printPasses();
}
this->clearPasses();
this->addPass(&LoopStrengthReduction::ID);