Closed Bug 1749891 Opened 4 years ago Closed 4 years ago

Fix loop phi reduction with loops that throw inside of try blocks

Categories

(Core :: JavaScript: WebAssembly, defect, P2)

defect

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We minimize phi nodes when finishing a loop block. There is some logic for ensuring all redundant phi node uses are updated correctly, but it's missing logic for control flow patches added by throw/call statements inside of try blocks.

One reduced test case discovered from 64MiB photoshop wasm binary.

(func (local i32)
    try
      loop
        call 0
        i32.const 0
        br_if 0
      end
    catch_all
    end
  )

We minimize phi nodes when finishing a loop block. There is some
logic for ensuring all redundant phi node uses are updated correctly,
but it's missing logic for control flow patches added by throw/call
statements inside of try blocks

This commit extends the setLoopBackedge() code to fixup redundant
phi nodes that escape via landing pad patches to enclosing try
blocks.

Blocks: 1751341
Severity: -- → S2
Status: NEW → ASSIGNED
Priority: P3 → P2
Blocks: 1750040
Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/4f3a057379ab wasm: Fix loop phi reduction with loops that throw inside of try blocks. r=nbp
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
Regressions: 1751554
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: