This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Make rethrow instruction take a target BB argument
ClosedPublic

Authored by aheejin on Jun 16 2018, 7:14 PM.

Details

Summary

This patch changes the rethrow instruction to take a BB argument in LLVM
backend, like br and br_ifs. This BB is a target catch BB the
rethrow instruction unwinds to. This BB argument will be converted to an
relative depth immediate at the end of CFGStackify pass, as in the same
way of branches.

RETHROW_TO_CALLER is a codegen-only instruction that should be used when
a rethrow instruction does not have an unwind destination BB, i.e., it
should rethrow to its caller function.

Diff Detail

Repository
rL LLVM

Event Timeline

aheejin created this revision.Jun 16 2018, 7:14 PM
aheejin updated this revision to Diff 151635.Jun 17 2018, 1:21 AM
  • Printed name change
aheejin updated this revision to Diff 151697.Jun 18 2018, 5:08 AM
  • Comment for RETHROW_TO_CALLER
dschuff accepted this revision.Jun 18 2018, 3:08 PM

LGTM; I think this model definitely makes more sense in CFG-based IR.

This revision is now accepted and ready to land.Jun 18 2018, 3:08 PM
aheejin updated this revision to Diff 151805.EditedJun 18 2018, 3:27 PM

Changed to the new syntax of D48183 (rL334985)

Changed to the new syntax. PTAL

dschuff accepted this revision.Jun 18 2018, 3:55 PM

still LGTM

This revision was automatically updated to reflect the committed changes.