This is an archive of the discontinued LLVM Phabricator instance.

Fix the compilation assertion due to unreachable BB pruning not deleting the associated BB from the jump tables
ClosedPublic

Authored by NeHuang on Oct 30 2020, 2:13 PM.

Details

Summary

We encountered the same failure as https://reviews.llvm.org/D22435. Original bug tracked in https://bugs.llvm.org/show_bug.cgi?id=28102
@cperfetto provided a potential solution to remove the unreachable MBBs reference in the jump table. (Comment 27 and Comment 28)

We have confirmed the assertion issue fixed with this patch.

Diff Detail

Event Timeline

NeHuang created this revision.Oct 30 2020, 2:13 PM
NeHuang requested review of this revision.Oct 30 2020, 2:13 PM
NeHuang updated this revision to Diff 302691.Nov 3 2020, 2:34 PM

Add the test case.

jsji added a reviewer: Restricted Project.Nov 9 2020, 8:42 AM
bsaleil accepted this revision as: bsaleil.Nov 12 2020, 2:32 PM
bsaleil added a subscriber: bsaleil.

LGTM

This revision is now accepted and ready to land.Nov 12 2020, 2:32 PM
amyk accepted this revision as: amyk.Nov 12 2020, 2:42 PM
amyk added a subscriber: amyk.

Minor nit but LGTM

llvm/lib/CodeGen/MachineFunction.cpp
1053

nit: end with period (as well as the other comments in this patch that are added).

NeHuang updated this revision to Diff 305166.Nov 13 2020, 8:29 AM

Addressed review comments for the nits.

NeHuang closed this revision.Apr 21 2021, 7:08 AM