[midend]添加了后端中对GEP指令的支持

This commit is contained in:
Lixuanwang
2025-07-24 00:39:11 +08:00
parent 56b376914b
commit f4d231b989
2 changed files with 161 additions and 1 deletions

View File

@@ -33,6 +33,8 @@ private:
std::vector<std::unique_ptr<DAGNode>> build_dag(BasicBlock* bb);
DAGNode* get_operand_node(Value* val_ir, std::map<Value*, DAGNode*>&, std::vector<std::unique_ptr<DAGNode>>&);
DAGNode* create_node(int kind, Value* val, std::map<Value*, DAGNode*>&, std::vector<std::unique_ptr<DAGNode>>&);
// 用于计算类型大小的辅助函数
unsigned getTypeSizeInBytes(Type* type);
void print_dag(const std::vector<std::unique_ptr<DAGNode>>& dag, const std::string& bb_name);