docs(doc): 完善Lab2实验说明与LLVM验证脚本说明

This commit is contained in:
jing
2026-03-03 17:49:21 +08:00
parent 730280abb8
commit 0ff3d918d9
3 changed files with 88 additions and 77 deletions

View File

@@ -33,7 +33,7 @@ sudo apt install -y build-essential cmake git openjdk-11-jre
### 2.3 安装 LLVM 工具链
`scripts/gen_ir.sh``--run` 模式下会调用 LLVM 工具链(`llc``clang`)将生成的 IR 编译并运行。
`scripts/verify_ir_with_llvm.sh``--run` 模式下会调用 LLVM 工具链(`llc``clang`)将生成的 IR 编译并运行。
```bash
sudo apt update
@@ -91,5 +91,7 @@ cmake --build build -j "$(nproc)"
(可选)生成 IR 并验证 LLVM 工具链是否可用:
```bash
./scripts/gen_ir.sh test/test_case/simple_add.sy out/ir --run
./scripts/verify_ir_with_llvm.sh test/test_case/simple_add.sy out/ir --run
```
兼容说明:`scripts/gen_ir.sh` 仍可使用,但作为兼容入口会转调 `verify_ir_with_llvm.sh`