This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Handle multiple EH_LABELs in EH pad
ClosedPublic

Authored by aheejin on Feb 18 2021, 9:24 AM.

Details

Summary

Usually EH_LABELs are placed in

  • Before an invoke (which becomes calls in the backend)
  • After an invoke
  • At the start of an EH pad

I don't know exactly why, but I noticed there are cases of multiple, not
a single, EH_LABEL instructions in the beginning of an EH pad. In that
case global.set instruction placed to restore __stack_pointer ended
up between two EH_LABEL instructions before CATCH. It should follow
after the EH_LABELs and CATCH. This CL fixes that case.

Diff Detail

Event Timeline

aheejin created this revision.Feb 18 2021, 9:24 AM
aheejin requested review of this revision.Feb 18 2021, 9:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2021, 9:24 AM
dschuff accepted this revision.Feb 18 2021, 10:06 AM
This revision is now accepted and ready to land.Feb 18 2021, 10:06 AM
This revision was automatically updated to reflect the committed changes.