Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ jobs:
run: |
python3.12 -m pytest tests/test_pr37_regression.py -v --tb=short

- name: Run topic17 register-allocation regressions
run: |
python3.12 -m pytest \
tests/test_regalloc_topic17.py \
tests/test_pr37_regression.py \
tests/test_topic17_regalloc_case_report.py \
-v --tb=short

- name: Generate test visualization page
if: github.ref == 'refs/heads/main'
run: |
Expand Down Expand Up @@ -218,6 +226,14 @@ jobs:
--json benchmark_reports/const_merge_report.json \
--markdown benchmark_reports/const_merge_report.md

# ── 3.1.2 课题17:寄存器分配 case 报告(greedy/linear A/B + RV32 执行等价) ──
- name: Topic 17 register-allocation case report
run: |
mkdir -p benchmark_reports
python3.12 benchmarks/run_topic17_regalloc_case.py \
--json benchmark_reports/regalloc_case_report.json \
--markdown benchmark_reports/regalloc_case_report.md

# ── 3.2 DSL 用例编译 + 模拟基准 ────────────────────────────────────
- name: DSL case compilation benchmarks
run: |
Expand Down Expand Up @@ -363,6 +379,9 @@ jobs:
if [ -f benchmark_reports/const_merge_report.md ]; then
cat benchmark_reports/const_merge_report.md >> $GITHUB_STEP_SUMMARY
fi
if [ -f benchmark_reports/regalloc_case_report.md ]; then
cat benchmark_reports/regalloc_case_report.md >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
if [ -f benchmark_reports/github_summary.md ]; then
cat benchmark_reports/github_summary.md >> $GITHUB_STEP_SUMMARY
Expand Down
10 changes: 10 additions & 0 deletions benchmarks/cases/topic17_regalloc_feature.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Topic 17 register-allocation feature case (linear scan v1.5 + frame layout).
# Deterministic short loop: i = 0..5, t = i*i, k = t + i -> k = 30.
# Deliberately low-pressure: the loop-carried values are force-spilled across
# basic blocks, but no block ever fills the physical register pool, so neither
# reload-time eviction nor high-pressure spilling is exercised.
for i = 0, 6
t = mul(i, i)
k = add(t, i)
endfor
return k
Loading
Loading