[backend]完善了后端流水线

This commit is contained in:
Lixuanwang
2025-08-05 16:10:04 +08:00
parent 32684d8255
commit 167c2ac2ae
4 changed files with 82 additions and 169 deletions

View File

@@ -45,7 +45,7 @@ RISCv64RegAlloc::RISCv64RegAlloc(MachineFunction* mfunc)
}
// 主入口: 迭代运行分配算法直到无溢出
void RISCv64RegAlloc::run() {
bool RISCv64RegAlloc::run() {
if (DEBUG) std::cerr << "===== LLIR Before Running Graph Coloring Register Allocation " << MFunc->getName() << " =====\n";
std::stringstream ss_before_reg_alloc;
if (DEBUG) {
@@ -108,6 +108,7 @@ void RISCv64RegAlloc::run() {
MFunc->getFrameInfo().vreg_to_preg_map = this->color_map;
collectUsedCalleeSavedRegs();
if (DEBUG) std::cerr << "===== Finished Graph Coloring Register Allocation =====\n\n";
return true;
}
// 单次分配的核心流程