SingleAccretion opened PR #10570 from SingleAccretion:DI-Range to bytecodealliance:main:
How things used to work w.r.t. instruction indices (IIs):
1) In lowering:- Reversed order: IIs represented "before IP"s.
- Block args were defined one instruction too late, but this issue was masked due to how RA allocates, at least in simple examples.
- Execution order: IIs represented "after IP"s.
2) In RA:- IIs represented "before IP"s.
- Notice the mismatch.
3) In emit:- RA directions w.r.t. the explicit ProgPoint positions were not respected and always treated as "after".
How things work after this change:
1) In lowering:- Reversed order: IIs represent "after IP"s.
- Execution order: IIs represent "before IP"s.
2) In RA:- No change; mismatch fixed.
3) In emit:- ProgPoint positions now respected.
Fixes #10564, #9716.
SingleAccretion updated PR #10570.
SingleAccretion updated PR #10570.
SingleAccretion edited PR #10570:
How things used to work w.r.t. instruction indices (IIs):
1) In lowering:- Reversed order: IIs represented "before IP"s.
- Block args were defined one instruction too late, but this issue was masked due to how RA allocates, at least in simple examples.
- Execution order: IIs represented "after IP"s.
2) In RA:- IIs represented "before IP"s.
- Notice the mismatch.
3) In emit:- RA directions w.r.t. the explicit ProgPoint positions were not respected and always treated as "after".
How things work after this change:
1) In lowering:- Reversed order: IIs represent "after IP"s.
- Execution order: IIs represent "before IP"s.
2) In RA:- No change; mismatch fixed.
3) In emit:- ProgPoint positions now respected.
Fixes #9716.
Fixes #10564.
SingleAccretion edited PR #10570:
How things used to work w.r.t. instruction indices (IIs):
1) In lowering:- Reversed order: IIs represented "before IP"s.
- Block args were defined one instruction too late, but this issue was masked due to how RA allocates, at least in simple examples.
- Execution order: IIs represented "after IP"s.
2) In RA:- IIs represented "before IP"s.
- Notice the mismatch.
3) In emit:- RA directions w.r.t. the explicit ProgPoint positions were not respected and always treated as "after".
How things work after this change:
1) In lowering:- Reversed order: IIs represent "after IP"s.
- Execution order: IIs represent "before IP"s.
2) In RA:- No change; mismatch fixed.
3) In emit:- ProgPoint positions now respected.
Fixes #9716.
Contributes to #10564.
SingleAccretion updated PR #10570.
SingleAccretion has marked PR #10570 as ready for review.
SingleAccretion requested wasmtime-compiler-reviewers for a review on PR #10570.
SingleAccretion requested abrown for a review on PR #10570.
SingleAccretion requested pchickey for a review on PR #10570.
SingleAccretion requested wasmtime-core-reviewers for a review on PR #10570.
alexcrichton submitted PR review:
Thanks for this!
alexcrichton merged PR #10570.
SingleAccretion edited PR #10570:
How things used to work w.r.t. instruction indices (IIs):
1) In lowering:- Reversed order: IIs represented "before IP"s.
- Block args were defined one instruction too late, but this issue was masked due to how RA allocates, at least in simple examples.
- Execution order: IIs represented "after IP"s.
2) In RA:- IIs represented "before IP"s.
- Notice the mismatch.
3) In emit:- RA directions w.r.t. the explicit ProgPoint positions were not respected and always treated as "after".
How things work after this change:
1) In lowering:- Reversed order: IIs represent "after IP"s.
- Execution order: IIs represent "before IP"s.
2) In RA:- No change; mismatch fixed.
3) In emit:- ProgPoint positions now respected.
Fixes #9716.
Fixes #10564.
Last updated: Dec 06 2025 at 06:05 UTC