Merge remote-tracking branch 'origin/backend' into loopinfo

This commit is contained in:
rain2133
2025-07-15 13:09:55 +08:00
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