Stream: git-wasmtime

Topic: wasmtime / PR #10570 [DI] Fix live range tracking off-by-...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 11 2025 at 20:29):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 11 2025 at 20:40):

SingleAccretion updated PR #10570.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 11 2025 at 20:47):

SingleAccretion updated PR #10570.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 11 2025 at 20:48):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2025 at 17:27):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2025 at 18:10):

SingleAccretion updated PR #10570.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2025 at 18:37):

SingleAccretion has marked PR #10570 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2025 at 18:37):

SingleAccretion requested wasmtime-compiler-reviewers for a review on PR #10570.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2025 at 18:37):

SingleAccretion requested abrown for a review on PR #10570.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2025 at 18:37):

SingleAccretion requested pchickey for a review on PR #10570.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2025 at 18:37):

SingleAccretion requested wasmtime-core-reviewers for a review on PR #10570.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2025 at 20:15):

alexcrichton submitted PR review:

Thanks for this!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2025 at 20:36):

alexcrichton merged PR #10570.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2025 at 21:16):

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