[backend]尝试在寄存器分配逻辑中区分调用者保存、被调用者保存寄存器

This commit is contained in:
Lixuanwang
2025-07-26 21:45:01 +08:00
parent 9bea4d5343
commit af318b6c0e
6 changed files with 133 additions and 37 deletions

View File

@@ -17,6 +17,8 @@ public:
// 公开接口以便后续模块如RegAlloc可以查询或创建vreg
unsigned getVReg(Value* val);
unsigned getNewVReg() { return vreg_counter++; }
// 获取 vreg_map 的公共接口
const std::map<Value*, unsigned>& getVRegMap() const { return vreg_map; }
private:
// DAG节点定义作为ISel的内部实现细节