[backend] modified some comments and created a shell srcipt for test inside riscv64-vms

This commit is contained in:
Lixuanwang
2025-06-25 20:59:40 +08:00
parent d06c5efae1
commit 34ffa39b8a
3 changed files with 210 additions and 10 deletions

View File

@@ -6,7 +6,7 @@
#include <iomanip>
#include <functional>
#define DEBUG 1
#define DEBUG 0
#define DEEPDEBUG 0
namespace sysy {
@@ -491,7 +491,7 @@ std::vector<std::unique_ptr<RISCv64CodeGen::DAGNode>> RISCv64CodeGen::build_dag(
arg_node->users.push_back(call_node);
}
} else if (auto ret = dynamic_cast<ReturnInst*>(inst)) {
std::cout << "处理 RETURN 指令: " << ret->getName() << "\n"; // 调试输出
if (DEBUG) std::cerr << "处理 RETURN 指令: " << ret->getName() << "\n"; // 调试输出
auto ret_node = create_node(DAGNode::RETURN, ret, value_to_node, nodes_storage); // 传递参数
if (ret->hasReturnValue()) {
auto val_ir = ret->getReturnValue();