This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Don't modify preds/succs iterators while erasing from them
ClosedPublic

Authored by aheejin on Oct 4 2018, 12:24 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

aheejin created this revision.Oct 4 2018, 12:24 PM
dschuff added inline comments.Oct 4 2018, 1:41 PM
lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
94 ↗(On Diff #168349)

Could you just copy the Predecessors in the constructor, the way you do with WL?

dschuff accepted this revision.Oct 4 2018, 1:44 PM

Otherwise LGTM, and I verified that it fixes the expensive checks failure.

lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
94 ↗(On Diff #168349)

e.g. Preds(MBB->pred_begin(), MBB->pred_end())

This revision is now accepted and ready to land.Oct 4 2018, 1:44 PM
aheejin updated this revision to Diff 168370.Oct 4 2018, 1:55 PM
  • Use iterators within constructors / append
This revision was automatically updated to reflect the committed changes.