[backend-O1-1]调整寄存器预着色逻辑

This commit is contained in:
Lixuanwang
2025-08-20 02:13:23 +08:00
parent dd2725796a
commit 9ff1ace10e
3 changed files with 38 additions and 30 deletions

View File

@@ -181,19 +181,19 @@ void PassManager::runOptimizationPipeline(Module* moduleIR, IRBuilder* builderIR
printPasses();
}
// this->clearPasses();
// this->addPass(&LoopStrengthReduction::ID);
// this->run();
this->clearPasses();
this->addPass(&LoopStrengthReduction::ID);
this->run();
if(DEBUG) {
std::cout << "=== IR After Loop Normalization, and Strength Reduction Optimizations ===\n";
printPasses();
}
// // 全局强度削弱优化,包括代数优化和魔数除法
// this->clearPasses();
// this->addPass(&GlobalStrengthReduction::ID);
// this->run();
// 全局强度削弱优化,包括代数优化和魔数除法
this->clearPasses();
this->addPass(&GlobalStrengthReduction::ID);
this->run();
if(DEBUG) {
std::cout << "=== IR After Global Strength Reduction Optimizations ===\n";