This is an archive of the discontinued LLVM Phabricator instance.

[llvm-reduce] Fix invalid reduction in basic-blocks delta pass
ClosedPublic

Authored by dwightguth on Nov 9 2021, 7:54 AM.

Details

Summary

Previously, if the basic-blocks delta pass tried to remove a basic block
that was the last basic block in a function that did not have external
or weak linkage, the resulting IR would become invalid. Since removing
the last basic block in a function is effectively identical to removing
the function body itself, we check explicitly for this case and if we
detect it, we run the same logic as in ReduceFunctionBodies.cpp

Diff Detail

Event Timeline

dwightguth requested review of this revision.Nov 9 2021, 7:54 AM
dwightguth created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2021, 7:54 AM
dwightguth updated this revision to Diff 385840.Nov 9 2021, 8:38 AM

fix copy-paste error

could you add a test for the comdat part?

add test for comdat

fix commit message

aeubanks accepted this revision.Nov 9 2021, 10:42 AM
This revision is now accepted and ready to land.Nov 9 2021, 10:42 AM

Should be ready to commit. You should double check that the commit message is in the right format though because one of my updates to this diff seems to have messed with it by accident. I think I fixed it, but I'm not super familiar with Phabricator.

This revision was landed with ongoing or failed builds.Nov 9 2021, 10:45 AM
This revision was automatically updated to reflect the committed changes.