[midend-GVN]修复GVN中部分逻辑问题,LICM有bug待修复

This commit is contained in:
rain2133
2025-08-17 00:14:47 +08:00
parent c4eb1c3980
commit e32585fd25
3 changed files with 49 additions and 6 deletions

View File

@@ -132,7 +132,6 @@ void PassManager::runOptimizationPipeline(Module* moduleIR, IRBuilder* builderIR
printPasses();
}
// 添加GVN优化遍
this->clearPasses();
this->addPass(&GVN::ID);
this->run();
@@ -154,14 +153,14 @@ void PassManager::runOptimizationPipeline(Module* moduleIR, IRBuilder* builderIR
this->clearPasses();
this->addPass(&LoopNormalizationPass::ID);
this->addPass(&InductionVariableElimination::ID);
this->addPass(&LICM::ID);
// this->addPass(&LICM::ID);
this->addPass(&LoopStrengthReduction::ID);
this->run();
if(DEBUG) {
std::cout << "=== IR After Loop Normalization, LICM, and Strength Reduction Optimizations ===\n";
printPasses();
}
// if(DEBUG) {
// std::cout << "=== IR After Loop Normalization, LICM, and Strength Reduction Optimizations ===\n";
// printPasses();
// }
// this->clearPasses();
// this->addPass(&Reg2Mem::ID);