[backend]解决了数组访存地址计算问题,加入了参数控制的中端、后端调试选项

This commit is contained in:
Lixuanwang
2025-07-15 11:32:53 +08:00
parent e576f0a21e
commit a509dabbf0
4 changed files with 144 additions and 38 deletions

View File

@@ -883,6 +883,10 @@ public:
assert(false);
}
} ///< 根据指令类型进行二元计算eval template模板实现
static BinaryInst* create(Kind kind, Type *type, Value *lhs, Value *rhs, BasicBlock *parent, const std::string &name = "") {
// 后端处理数组访存操作时需要创建计算地址的指令,需要在外部构造 BinaryInst 对象所以写了个public的方法。
return new BinaryInst(kind, type, lhs, rhs, parent, name);
}
}; // class BinaryInst
//! The return statement